From patchwork Fri Nov 3 17:11:54 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sami Tolvanen X-Patchwork-Id: 10040875 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 9A132602D8 for ; Fri, 3 Nov 2017 17:22:45 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 80BC62971E for ; Fri, 3 Nov 2017 17:22:45 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 758362974D; Fri, 3 Nov 2017 17:22:45 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, DKIM_VALID, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id EF7402971E for ; Fri, 3 Nov 2017 17:22:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=WCZzpQ9B7ZZpUREvxxJZ807uoSxPzcq/nqRgFbqW94U=; b=oEml2trsA/5/QxqwqPJauagpbF zj2Rf3DZPwzDPa2jo26n0I/xTE4dHP38Dp7J1vzjXNRPOjYdoRhSwl0GN5zH784CRvgU/m4BWrVs0 K4h5JdzPYdU9k//U+j9rXNRjFZqacAwVNrKQmnXjiyH3fm6ft9vvzPdk8j0JUFKP0hx8YbIkwiMM0 YeRgTuqVWmE6nHWtELzmUcRk3xU4mFfyezt1mROxTMtgh4gglHAzFBSO8Ls4FmbbJokVseUK7rOHG h7CYjUQ7ZCbLLZtE0IUDbYOJIKcBhsogyV/K5qfowf/SCkZhyp7IUNXcIUN7NI/V5EAjkk8v/lG7Z 1MCG4Aeg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1eAfg2-0000pc-Iy; Fri, 03 Nov 2017 17:22:42 +0000 Received: from casper.infradead.org ([85.118.1.10]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1eAff0-0007HN-IK for linux-arm-kernel@bombadil.infradead.org; Fri, 03 Nov 2017 17:21:38 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=References:In-Reply-To:Message-Id:Date: Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=McQpOniXbcKKtgnEg+Yt3KG4TjIxyMhgiJS7CSZuu8w=; b=mtkUnlaWut6GwmdM/ja1LVaoj IMleLxfqbO1xmCrPSItXpKisumDDcNI/qz0tUExcmVNvT37FxYQSrU7ONKhCSfxmLhpt+nKHItV8R 7idskM5Jufxu36MlS2BQWJCJwMhWUnYE5IZHHhjT7IQm+k0qLE7XuZPHKr4WOVeVHGzwtRiJsnnBW hJJ7r6VcPyFVUWfeSAnnnCe0zAbnQRwPOqj9t4bvknqGO9nP4C5aNqOMF6HkDCccMLhyjjga/3QrL bgk4XLdwSZpD4jc1+pzk2g3nrZLdDwI8vQxpUDgL2UhWgVTLpBrGmRRrk/qwFycL5l5EDBiC9TWdN eq3HPllQQ==; Received: from mail-io0-x241.google.com ([2607:f8b0:4001:c06::241]) by casper.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1eAfWs-0003sl-CV for linux-arm-kernel@lists.infradead.org; Fri, 03 Nov 2017 17:13:16 +0000 Received: by mail-io0-x241.google.com with SMTP id b186so7735381iof.8 for ; Fri, 03 Nov 2017 10:12:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=McQpOniXbcKKtgnEg+Yt3KG4TjIxyMhgiJS7CSZuu8w=; b=EPHJ7NgabSZMTrR/2xxYqa9z7Ke/KMdiMycp00udABCnV3TxanJL/qXEFKlFnkwAJg lEZZJ5KSvzLdgPxQppMkSUvN92nhWzPrqLl3y2Mu5vxffXnM7jnPdgizSX+Txb3vgelJ bIE3YJBxoJ4XF8T0V9BLznb4QJFd992T79NvNrftez/rfkn3kRNnwuhpQeUeJHAUIsg5 XYlX4GHi3v4C70tp4Y9Ht1glf2rwLrilsgbNHh1pV3DxcQ1j9gBPau/wggsF8jju21WS FT4/LWsVjiILVv5We91d2T5Ts6BWA1NXvLY2gbJyiTeUlcASynhjlKX8puNgYONsViEk 7nfw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=McQpOniXbcKKtgnEg+Yt3KG4TjIxyMhgiJS7CSZuu8w=; b=eaGnbUqSVDsTWoH/xyS4r04kYfZbaFY5hVhHnbHLqkQA2dGbl4pJSVXwWKi2Wd1Khi UhzblCE3nrZadCzE0R5QI2m36pwyM9iS2giPOVQ4AH9UJhnHwT7cJxczKrra5oqiG2y+ JEYFzDxJpXqbEyJ2yDb1dBB5uI6maK2QDUoRDOY2LbT2Y0jSa09TgkfVn1iK4NNhFmVV xv2G2JuB+H1uPDyZb27RX+8EyJYgZ0dD95VL0Y+nVItOjopAXQ2di1ndEZ1yuLRAwWO3 egdkIeaBRZCqiQoD//fQvPqGmKUG+9kBw1FDm/XfN2tHF7NHKBlH2oEiLKhZYoHhQmCX Wrzw== X-Gm-Message-State: AJaThX7j+pUlTDc5zRZiXtkoQjjOuppswu+Jlcq2l/RMUd1S2FG+HWL7 5TZcoz3DaM73btqPYnnXq4GiGg== X-Google-Smtp-Source: ABhQp+TKJHehauGNueztQ1h3clhPbnagOFXinpd1lIuYAK8AzZOPXYdTZnOB8ZMhbAJIU7LMsEEhgg== X-Received: by 10.36.254.140 with SMTP id w134mr687687ith.73.1509729172603; Fri, 03 Nov 2017 10:12:52 -0700 (PDT) Received: from samitolvanen.mtv.corp.google.com ([100.98.112.14]) by smtp.gmail.com with ESMTPSA id d186sm1370787itd.38.2017.11.03.10.12.51 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 03 Nov 2017 10:12:51 -0700 (PDT) From: Sami Tolvanen To: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH 09/15] arm64: keep .altinstructions and .altinstr_replacement Date: Fri, 3 Nov 2017 10:11:54 -0700 Message-Id: <20171103171203.107569-11-samitolvanen@google.com> X-Mailer: git-send-email 2.15.0.403.gc27cc4dac6-goog In-Reply-To: <20171103171203.107569-1-samitolvanen@google.com> References: <20171103171203.107569-1-samitolvanen@google.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20171103_171314_531521_CC8317F6 X-CRM114-Status: GOOD ( 11.32 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Sami Tolvanen , Matthias Kaehlcke , Nick Desaulniers , Kees Cook , Greg Hackmann MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Make sure the linker doesn't remove .altinstructions or .altinstr_replacement when CONFIG_LD_DEAD_CODE_DATA_ELIMINATION is enabled. Signed-off-by: Sami Tolvanen --- arch/arm64/kernel/vmlinux.lds.S | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm64/kernel/vmlinux.lds.S b/arch/arm64/kernel/vmlinux.lds.S index 7da3e5c366a0..15479995869c 100644 --- a/arch/arm64/kernel/vmlinux.lds.S +++ b/arch/arm64/kernel/vmlinux.lds.S @@ -138,11 +138,11 @@ SECTIONS . = ALIGN(4); .altinstructions : { __alt_instructions = .; - *(.altinstructions) + KEEP(*(.altinstructions)) __alt_instructions_end = .; } .altinstr_replacement : { - *(.altinstr_replacement) + KEEP(*(.altinstr_replacement)) } . = ALIGN(PAGE_SIZE);