Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp2463842ybi; Mon, 17 Jun 2019 05:23:05 -0700 (PDT) X-Google-Smtp-Source: APXvYqyZq66gH8w8xQw9b2NMplcpBvfZ2AkPwM6mSr1pgNVGTm2+uVDvOeJqXpKuzOdhj+BA+Lgl X-Received: by 2002:a65:6104:: with SMTP id z4mr48967408pgu.319.1560774184818; Mon, 17 Jun 2019 05:23:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560774184; cv=none; d=google.com; s=arc-20160816; b=dHX4FAfG+0NM8/y1fDbLCn2J+YOFVn7/GPhLahB9sEqiRVf8iJKx6KkqDvOiF/vEaL 3PXZqgv9FYAbFXI+csiWwpn6m3ipcpwDSuzQxaB0u2Ujmlk6xm9vwQ7vi3k0dThB8QXk LuKzhnnQBz0ywUMoTjxsv8DymhzU4gKm87Ek/42u7HvEC+7bGGvtmiLQeCWkfWqORcmm NHXjRBmj5CPaIDWE4atnuLQAis8QsXYy1niy2pVy7jVZdy45vksA6uvM/lyoEMukMAn8 Oc1KhCjnVJAgyESLx5P/8QlYy4gV8AZPXyohncdZ8gV3a+gGrtbexlq4ZtUbDk9Y6n6m C02w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date; bh=vRYAGxaAM1x7I4LWg1pgAKw5/xd0/TFo3Lt+Xd3tJPU=; b=NwjH5X02r91JXxmkiQuQ3JPatpa2d/0qedfQ+9DnDcFhzKc4DvSAUN1guXR7tSYPpa 5CJ8jK9i4TlwF4kTYqO56rBFHAVWnbHs2TWHu5KForcofhnzhOPCWc6xtaZKkK0sY3WY SaGC1NzZZ75l2kh+ogAXmqENu6kDiW4lI+H5wjmxo8vATZ1qNCgrIyvHWzPCiyL+JB0W R/SqwpFU50Zh35JcZw6oxy1gmTREeg0GFoVvt08vXXitGAykNAwfEHPgrp8+KR6ABy/g 78q3gzWSMVcZnhrX2BAJCXnuqCTGbjt2NrTfy3r3/8J6myiGs5VVl4avkd0gXFnmmBSj 38iw== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id cf7si9772856plb.435.2019.06.17.05.22.49; Mon, 17 Jun 2019 05:23:04 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727852AbfFQMUy (ORCPT + 99 others); Mon, 17 Jun 2019 08:20:54 -0400 Received: from Galois.linutronix.de ([146.0.238.70]:43602 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725973AbfFQMUx (ORCPT ); Mon, 17 Jun 2019 08:20:53 -0400 Received: from [5.158.153.52] (helo=nanos.tec.linutronix.de) by Galois.linutronix.de with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1hcqcr-0006q9-JE; Mon, 17 Jun 2019 14:20:41 +0200 Date: Mon, 17 Jun 2019 14:20:40 +0200 (CEST) From: Thomas Gleixner To: Florian Weimer cc: Dave Martin , Yu-cheng Yu , 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 , Peter Zijlstra , Randy Dunlap , "Ravi V. Shankar" , Vedvyas Shanbhogue Subject: Re: [PATCH v7 22/27] binfmt_elf: Extract .note.gnu.property from an ELF file In-Reply-To: <87imt4jwpt.fsf@oldenburg2.str.redhat.com> Message-ID: References: <20190606200646.3951-1-yu-cheng.yu@intel.com> <20190606200646.3951-23-yu-cheng.yu@intel.com> <20190607180115.GJ28398@e103592.cambridge.arm.com> <94b9c55b3b874825fda485af40ab2a6bc3dad171.camel@intel.com> <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> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 17 Jun 2019, Florian Weimer wrote: > * Dave Martin: > > On Tue, Jun 11, 2019 at 12:31:34PM -0700, Yu-cheng Yu wrote: > >> We can probably check PT_GNU_PROPERTY first, and fallback (based on ld-linux > >> version?) to PT_NOTE scanning? > > > > For arm64, we can check for PT_GNU_PROPERTY and then give up > > unconditionally. > > > > For x86, we would fall back to PT_NOTE scanning, but this will add a bit > > of cost to binaries that don't have NT_GNU_PROPERTY_TYPE_0. The ld.so > > version doesn't tell you what ELF ABI a given executable conforms to. > > > > Since this sounds like it's largely a distro-specific issue, maybe there > > could be a Kconfig option to turn the fallback PT_NOTE scanning on? > > I'm worried that this causes interop issues similarly to what we see > with VSYSCALL today. If we need both and a way to disable it, it should > be something like a personality flag which can be configured for each > process tree separately. Ideally, we'd settle on one correct approach > (i.e., either always process both, or only process PT_GNU_PROPERTY) and > enforce that. Chose one and only the one which makes technically sense and is not some horrible vehicle. Everytime we did those 'oh we need to make x fly workarounds' we regretted it sooner than later. Thanks, tglx