From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753341AbdK3B6p (ORCPT ); Wed, 29 Nov 2017 20:58:45 -0500 Received: from mail-pf0-f194.google.com ([209.85.192.194]:42962 "EHLO mail-pf0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751943AbdK3B6n (ORCPT ); Wed, 29 Nov 2017 20:58:43 -0500 X-Google-Smtp-Source: AGs4zMa2lY4Vr41L32k53Oy15SmEKsjGDA+ZvsxbvTxgBvhaYY3TROzZMzTObFUEIPzDSCM7KfTcYA== Date: Thu, 30 Nov 2017 11:58:27 +1000 From: Nicholas Piggin To: Nick Desaulniers Cc: Sami Tolvanen , Alex Matveev , Andi Kleen , Ard Biesheuvel , Greg Hackmann , Kees Cook , linux-arm-kernel@lists.infradead.org, Linux Kbuild mailing list , LKML , Mark Rutland , Masahiro Yamada , Maxim Kuvyrkov , Michal Marek , Yury Norov , Matthias Kaehlcke Subject: Re: [PATCH 5/7] arm64: keep .altinstructions and .altinstr_replacement Message-ID: <20171130115827.709f1818@roar.ozlabs.ibm.com> In-Reply-To: References: <20171129234442.655-1-samitolvanen@google.com> <20171129234442.655-6-samitolvanen@google.com> Organization: IBM X-Mailer: Claws Mail 3.15.1-dirty (GTK+ 2.24.31; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 29 Nov 2017 15:57:53 -0800 Nick Desaulniers wrote: > On Wed, Nov 29, 2017 at 3:44 PM, Sami Tolvanen wrote: > > Make sure the linker doesn't remove .altinstructions or > > .altinstr_replacement when CONFIG_LD_DEAD_CODE_DATA_ELIMINATION is > > enabled. > > This sounds like a bug in the original implementation of > CONFIG_LD_DEAD_CODE_DATA_ELIMINATION? If so, this can likely get > merged regardless of the rest of the patchset, ie. gold support. Yes, also patch 3/7 probably (thanks for doing these, btw). The LD_DCDE option is actually been broken upstream thanks to lack of time (which is a known issue, this is why no arch enables it). Basically it just needs a bit more effort to go through and ensure nothing is discarded incorrectly, and all new sections are placed into output sections, before each arch is enabled. (Comparing `readelf -S` before/after is a way to spot bugs.) So yes please if it's not too much trouble, could you remove the "gold" name from the generic patch and put it at the front of the series with this arm64 patch. Possibly then you could also do a 3rd patch to allow arm64 to select it if it's working with gcc? Thanks, Nick