Message ID | 20171115213428.22559-8-samitolvanen@google.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org> 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 7E78760231 for <patchwork-linux-arm@patchwork.kernel.org>; Wed, 15 Nov 2017 21:37:19 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6C6492A2DA for <patchwork-linux-arm@patchwork.kernel.org>; Wed, 15 Nov 2017 21:37:19 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6084F2A31D; Wed, 15 Nov 2017 21:37:19 +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 EF0F22A2DA for <patchwork-linux-arm@patchwork.kernel.org>; Wed, 15 Nov 2017 21:37:18 +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=J1pu0cmh3+ux1TUy08o6LtfhNv7634fIAwzQ4d7JMUw=; b=lSH1TzLpy6wrDHwT5wFOOQRzne ukuh3iaw296eIq+p3ohgLk/71oLTbV5+Hmo4QMgLIs+TpdukxsEHV/7vNvqBL5NyS8OOYC65klwdU uBuT5KRajjDrZO7XWw4sFWuJcPKGME9OxkobJ3uL82eykqzV3HEFvXeaQt+/RxZvXTwnmHHXqk5B3 YFyEVQJM1PvMpB7kqI9nLUEeESohW106CUgzPz+xmJq9SDCCo1heufSDpje3TzEnCzKK9zh1/SBee w6pE1hW7dylOKH1eGh+rUiu8FYWAogWpJ1+nWVr9pE1evE3VdRSQF5SdaI/a7aD1gyV+I3yLA9u0V TMTeLcHg==; 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 1eF5Mz-0002c4-Nw; Wed, 15 Nov 2017 21:37:17 +0000 Received: from mail-io0-x242.google.com ([2607:f8b0:4001:c06::242]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1eF5Kv-00089C-Eh for linux-arm-kernel@lists.infradead.org; Wed, 15 Nov 2017 21:35:18 +0000 Received: by mail-io0-x242.google.com with SMTP id 71so3090626ior.7 for <linux-arm-kernel@lists.infradead.org>; Wed, 15 Nov 2017 13:34:53 -0800 (PST) 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=J4a6XjdTftLUMnJbWFDNn61nLbuSomwTHle/6oFe2bI=; b=hKc82Van8inNUrTlYsUwS3QmOO6k5fiaa0MJTJNL6wVlBTfFxhQLnxkgUSGEwWLLXl 3CR7zADss6cvP31rHX9E0SL5C0XQvBp5n6HmaT9kU4gfC0ernZRQKCtB53mawtwhYFuP /2pQAikL+E8JWL0yG3MIghAokmcrgsAK5IwCUrnKHOqd8lMkkkU2Gi0HtKWBBPzBM4TK CASL0ROYf1Pb/2rjpI1NJLfDYFqI50ACouKCOxB6xMQY0djUaF4InbxW/+K5tKR+DDWc RR3xhXDLk3NQoIHxZrjIzRiPbrGjRjdVZJdeh1qI3OS6PxBAM3F8hxupzjGPCaEL6rjD bbPQ== 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=J4a6XjdTftLUMnJbWFDNn61nLbuSomwTHle/6oFe2bI=; b=i3GcGue86IPHDmU6X8QfMM7Yb4lyzvoGFOCRjBMmRUtBOb0yJfcp39DWANwxXQ3iq0 uzZxqFOtn5p2YvfjTNdqlRclbBjb8r346N8vTrYEz8VB9qBZnwOdQ+0CqU3qGbPCMb0J EfduS8PPJQmSuQR7mCO7bXL+6uUBTUIKL8gi/gSZEoLIsWyxbrMzaDSgvtNVmy5JZRZq d08PBR78TVTF9Et0d1YTYAn51AKi7pbhXRGHJghJf/Pk8DXt7gwMN99D3AGhPwkjVzHJ QqiEZxLQz0yGzAs/G5EgxI4EE97mSf5t06mMYIIblmDganxEZGmd+Zs2jFrA4IwqCPJn 3s+w== X-Gm-Message-State: AJaThX5kiQdqoPcXdIalFtcla4syJ9wuFYJyqe9VRgXByBeP2ycQT1R3 ++CeQBM/pkk1XBoRpAeyL+cEyQ== X-Google-Smtp-Source: AGs4zMb0kFRZzIRRPnFs3sts+Umqs6UbXh3NEpptmNx7EqoNFeK4F8T5T9NNJ5ELGdi3aWsn7MexJQ== X-Received: by 10.107.38.79 with SMTP id m76mr21054915iom.187.1510781692765; Wed, 15 Nov 2017 13:34:52 -0800 (PST) Received: from samitolvanen.mtv.corp.google.com ([100.98.112.14]) by smtp.gmail.com with ESMTPSA id 68sm9735197iov.2.2017.11.15.13.34.51 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 15 Nov 2017 13:34:51 -0800 (PST) From: Sami Tolvanen <samitolvanen@google.com> To: Alex Matveev <alxmtvv@gmail.com>, Andi Kleen <ak@linux.intel.com>, Ard Biesheuvel <ard.biesheuvel@linaro.org>, Greg Hackmann <ghackmann@google.com>, Kees Cook <keescook@chromium.org>, linux-arm-kernel@lists.infradead.org, linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, Mark Rutland <mark.rutland@arm.com>, Masahiro Yamada <yamada.masahiro@socionext.com>, Maxim Kuvyrkov <maxim.kuvyrkov@linaro.org>, Michal Marek <michal.lkml@markovi.net>, Nick Desaulniers <ndesaulniers@google.com>, Yury Norov <ynorov@caviumnetworks.com>, Matthias Kaehlcke <mka@chromium.org> Subject: [PATCH v2 07/18] arm64: keep .altinstructions and .altinstr_replacement Date: Wed, 15 Nov 2017 13:34:17 -0800 Message-Id: <20171115213428.22559-8-samitolvanen@google.com> X-Mailer: git-send-email 2.15.0.448.gf294e3d99a-goog In-Reply-To: <20171115213428.22559-1-samitolvanen@google.com> References: <20171115213428.22559-1-samitolvanen@google.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20171115_133509_943526_989A9C61 X-CRM114-Status: UNSURE ( 9.91 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: <linux-arm-kernel.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/> List-Post: <mailto:linux-arm-kernel@lists.infradead.org> List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe> Cc: Sami Tolvanen <samitolvanen@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org> Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP |
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);
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 <samitolvanen@google.com> --- arch/arm64/kernel/vmlinux.lds.S | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)