From: Yu-cheng Yu Subject: Re: [PATCH v7 22/27] binfmt_elf: Extract .note.gnu.property from an ELF file Date: Tue, 18 Jun 2019 08:53:29 -0700 Message-ID: <1ca57aaae8a2121731f2dcb1a137b92eed39a0d2.camel@intel.com> References: <87lfy9cq04.fsf@oldenburg2.str.redhat.com> <20190611114109.GN28398@e103592.cambridge.arm.com> <031bc55d8dcdcf4f031e6ff27c33fd52c61d33a5.camel@intel.com> <20190612093238.GQ28398@e103592.cambridge.arm.com> <87imt4jwpt.fsf@oldenburg2.str.redhat.com> <20190618091248.GB2790@e103592.cambridge.arm.com> <20190618124122.GH3419@hirez.programming.kicks-ass.net> <87ef3r9i2j.fsf@oldenburg2.str.redhat.com> <20190618125512.GJ3419@hirez.programming.kicks-ass.net> <20190618133223.GD2790@e103592.cambridge.arm.com> <87pnna7v1d.fsf@oldenburg2.str.redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <87pnna7v1d.fsf@oldenburg2.str.redhat.com> Sender: linux-kernel-owner@vger.kernel.org To: Florian Weimer Cc: Dave Martin , Peter Zijlstra , Thomas Gleixner , x86@kernel.org, "H. Peter Anvin" , Ingo Molnar , linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, linux-mm@kvack.org, linux-arch@vger.kernel.org, linux-api@vger.kernel.org, Arnd Bergmann , Andy Lutomirski , Balbir Singh , Borislav Petkov , Cyrill Gorcunov , Dave Hansen , Eugene Syromiatnikov , "H.J. Lu" , Jann Horn , Jonathan Corbet , Kees Cook , Mike Kravetz , N List-Id: linux-api@vger.kernel.org On Tue, 2019-06-18 at 17:49 +0200, Florian Weimer wrote: > * Yu-cheng Yu: > > > The kernel looks at only ld-linux. Other applications are loaded by ld- > > linux. > > So the issues are limited to three versions of ld-linux's. Can we somehow > > update those?? > > I assumed that it would also parse the main executable and make > adjustments based on that. Yes, Linux also looks at the main executable's header, but not its NT_GNU_PROPERTY_TYPE_0 if there is a loader. > > ld.so can certainly provide whatever the kernel needs. We need to tweak > the existing loader anyway. > > No valid statically-linked binaries exist today, so this is not a > consideration at this point. So from kernel, we look at only PT_GNU_PROPERTY? Yu-cheng