From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756230AbdKCSkE (ORCPT ); Fri, 3 Nov 2017 14:40:04 -0400 Received: from mail-wr0-f193.google.com ([209.85.128.193]:55748 "EHLO mail-wr0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751290AbdKCSkD (ORCPT ); Fri, 3 Nov 2017 14:40:03 -0400 X-Google-Smtp-Source: ABhQp+TchWSfG110RRAthZ0Ex8hfMytKoEL2j1+qkTY1bCMvEB2DS5/BKamq8uXJU67VI/WCmF3E+jzvGjIfP5ikaD0= MIME-Version: 1.0 In-Reply-To: <20171103171203.107569-11-samitolvanen@google.com> References: <20171103171203.107569-1-samitolvanen@google.com> <20171103171203.107569-11-samitolvanen@google.com> From: Nick Desaulniers Date: Fri, 3 Nov 2017 11:40:01 -0700 Message-ID: Subject: Re: [PATCH 09/15] arm64: keep .altinstructions and .altinstr_replacement To: Sami Tolvanen Cc: LKML , linux-arm-kernel@lists.infradead.org, Greg Hackmann , Kees Cook , Matthias Kaehlcke Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patch can likely be taken regardless of the rest of the series. It would be good to get additional review from the person who added CONFIG_LD_DEAD_CODE_DATA_ELIMINATION maybe? On Fri, Nov 3, 2017 at 10:11 AM, Sami Tolvanen wrote: > 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); > -- > 2.15.0.403.gc27cc4dac6-goog > -- Thanks, ~Nick Desaulniers