Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp3945440ybi; Tue, 18 Jun 2019 09:02:10 -0700 (PDT) X-Google-Smtp-Source: APXvYqx1R8SROzx80hYzT/jOs/LTJ8IhBjiOonNZQfs1xgCcO0x0oY9Oozki7q+X5cQUA6xoBbwK X-Received: by 2002:a17:90a:380d:: with SMTP id w13mr5844623pjb.138.1560873730128; Tue, 18 Jun 2019 09:02:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560873730; cv=none; d=google.com; s=arc-20160816; b=DsrbKw5unYVMzQJ1fdSqK2jEjohnw7iF3L/jMCsXfnGmESa5SDgGe/nWmStHiTNtIo MzUkBK0nC3lBsNcDE59t1kdMwXLJ5agfp2b1Bih71jA8fCAYwi8mZnorZihiqHH4hFTb VPHoA9xmcHn2uHKRnpGIZ0BI/bZsb+HVbu07SdlJ/yBeeNjfT3IMWTGdE+eWhr2uXRD+ KX1YGi82q4cttj4h+mqlE7f2pRmVHbQlSr7RcRutWtRQxZyKzic9i/pV6xY9j1f8JXQ0 Mm55yRJYOfnHKisMbp79fTeNRrIrR+muwxCMfHKZD+6CDIBgOsW/OLOb7cKdNdSL/Re4 s5Jw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:date:cc:to:from:subject:message-id; bh=6E2GD28gLWT06212squaTJfa5siGlOHjnRSYK5oIen8=; b=ref569hA07YckhGkQT/0K25il7MN7yJ/nQF1XyLPoCQkkHU3irK9Pi2h4f7OmKhyDI e3c7XVdp9UpCz22ZaoenOIGcgLyQVajguAwCbL5iWqB3rWgyT8aAqNkNL0DaJHiRFLLW yzdWP7UkQ//r6fprWiKpYK+3rHyYyl6TASBfAboyWSinKh69N6NVN27lcc0aw1KI6/Yl J2SbCDUOzSo/Dvjw+9amCKS+dRzpOvG2X+hF6ws3S9UZr7xqccAj+WC+ebMT//pMD+s+ bYZbbQdp5wyMA7r52iXBc2vBy7e4MBwSFqpnusSAXGahBYLz/LjNERqEKdFDQ5pSckvm 69DQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u23si8927537pfh.177.2019.06.18.09.01.53; Tue, 18 Jun 2019 09:02:10 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729867AbfFRQBj (ORCPT + 99 others); Tue, 18 Jun 2019 12:01:39 -0400 Received: from mga05.intel.com ([192.55.52.43]:30374 "EHLO mga05.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729247AbfFRQBi (ORCPT ); Tue, 18 Jun 2019 12:01:38 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 18 Jun 2019 09:01:38 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.63,389,1557212400"; d="scan'208";a="357901271" Received: from yyu32-desk1.sc.intel.com ([10.144.153.205]) by fmsmga005.fm.intel.com with ESMTP; 18 Jun 2019 09:01:38 -0700 Message-ID: <1ca57aaae8a2121731f2dcb1a137b92eed39a0d2.camel@intel.com> Subject: Re: [PATCH v7 22/27] binfmt_elf: Extract .note.gnu.property from an ELF file From: Yu-cheng Yu 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 , Nadav Amit , Oleg Nesterov , Pavel Machek , Randy Dunlap , "Ravi V. Shankar" , Vedvyas Shanbhogue Date: Tue, 18 Jun 2019 08:53:29 -0700 In-Reply-To: <87pnna7v1d.fsf@oldenburg2.str.redhat.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> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.28.1-2 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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