Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754227AbcKBPCK (ORCPT ); Wed, 2 Nov 2016 11:02:10 -0400 Received: from mail-oi0-f66.google.com ([209.85.218.66]:33280 "EHLO mail-oi0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752140AbcKBPCI (ORCPT ); Wed, 2 Nov 2016 11:02:08 -0400 MIME-Version: 1.0 In-Reply-To: References: <186f8242-3f8d-31cd-a8e8-9743bbc1c1fd@suse.cz> <20161017090930.GT3142@twins.programming.kicks-ass.net> <55e00c01-2da8-8d06-1d05-9ebf775736ec@oracle.com> <20161017114517.GQ3117@twins.programming.kicks-ass.net> <55b3cbe0-f8fc-6505-411d-5f050d3414cc@oracle.com> <20161018211803.GV8651@wotan.suse.de> <20161019091347.GE3102@twins.programming.kicks-ass.net> <20161019102555.GJ3102@twins.programming.kicks-ass.net> <20161102121158.GA11638@x4> From: Linus Torvalds Date: Wed, 2 Nov 2016 09:02:06 -0600 X-Google-Sender-Auth: K1bsquz52YFiWZTnnEXiN_ZN-nM Message-ID: Subject: Re: [PATCH 01/12] extarray: define helpers for arrays defined in linker scripts To: Richard Biener Cc: Markus Trippelsdorf , Peter Zijlstra , "Luis R. Rodriguez" , Vegard Nossum , Jiri Slaby , Linux Kernel Mailing List , Greg Kroah-Hartman , stable , Ming Lei , Steven Rostedt , "H. Peter Anvin" , Josh Poimboeuf , Cesar Eduardo Barros , Michael Matz , David Miller , Guenter Roeck , Fengguang Wu , Borislav Petkov , Boris Ostrovsky , Juergen Gross , Kees Cook Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 729 Lines: 16 On Wed, Nov 2, 2016 at 6:14 AM, Richard Biener wrote: > > Note while this change restored the old behavior this change was _not_ > intended to fix this particular fallout (it was to fix an inconsistency > with respect to comparing addresses of symbols that can be interposed). > It just happens that your externs can be interposed with ELF. I think it should in general work for the kernel too, since as far as I can tell, it fundamentally fixes the issue that linker scripts will set symbol addresses to possibly alias other symbols. So from a compiler standpoint, I think our "begin/end" linker script symbols can be seen as interposing a larger array and give bounds for it. No> Linus