Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp8971502ybi; Fri, 7 Jun 2019 01:01:20 -0700 (PDT) X-Google-Smtp-Source: APXvYqwdL3Cf4kJHk8BepD2W/+WM1owxKXCUHs+jZxE7bhCkKkbXNp0/9R2Kyya2h8jHTT2UMPx9 X-Received: by 2002:a65:51c7:: with SMTP id i7mr1628152pgq.211.1559894480043; Fri, 07 Jun 2019 01:01:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559894480; cv=none; d=google.com; s=arc-20160816; b=nwpmeMRyOPDRAnAc+tMR6IY2G3ns1XSUMD3zQb6WtQK8ymjY3D4hCni0Pk3uAr3ogJ lkU0EEsQmogdFgVP8E4oSeQGKmfgtZvQidIImfdsGSUWZ3pe0mWkIogIeRb8w08hvIoi br1I2r710JLroXSP7a6QYGjY83mWxLOepBBG84TIhjXNTlDlgIiz8gtw7Bau7JqN9pBd X+tQmPxNA5xhFdvOgW9GD9wHxRsPaPNndO98FFwqH8TwF5DDnUX4buRMZgmURSPB06KU vl4qiGptueL9xkgwY5egjY6y6NkF+UGTkfEjYYYdVNUSPipT87eL1Q/PZqI56KpVDCLo reTw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=Z6UrZZzp3n14Ze8Py53PCQO3uqTMikRd3FqfmNFJBQ4=; b=XwQ3s2Rc7FUhaLOBRWRw3hlRQe+ii4HpPRRJ5ddjTXBI/4IXHDHp1EFhCh0BgUnv9r j0wICwLsCc4E5z1YJB0sKp5NvFOiyk8nleGY072Gokf2YUzC/6QSojfg4QjFzBgTMXpe 9CHJ3n1CUOMz4g9/g4QJG9hBr9YLAp0BRVTjg6UhBZPRh3cZ1D2erouVtGgL7Wkr9H4C nKRent3VWwRMmv14F6+yY4Ivl5UsKUB0MhMAgvyJI6qhHbPKMb5W5uZJZM9wWsnjuOTD M9zRApfGWz9mmyvrPKIP6Fl3h2ziUbiky6UWb+/C1/D1G6cHUnlBa2KWDzkTidNpf04c wuJg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=c34v2gJu; 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 3si1147122pgt.305.2019.06.07.01.01.01; Fri, 07 Jun 2019 01:01:20 -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; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=c34v2gJu; 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 S1727402AbfFGH6x (ORCPT + 99 others); Fri, 7 Jun 2019 03:58:53 -0400 Received: from merlin.infradead.org ([205.233.59.134]:47516 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726819AbfFGH6x (ORCPT ); Fri, 7 Jun 2019 03:58:53 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=Z6UrZZzp3n14Ze8Py53PCQO3uqTMikRd3FqfmNFJBQ4=; b=c34v2gJu6/rQ2aR6lzQzkJp4R z4dwER8rHQHa20F2xwJqlwIMnaDfbzgY0t9dtmC00if5JmBXgbJwuagYcVraKs/LOpN57iEZWAQ4Z 7t7YudJFD6qIS39i+NzbtHeGLIClaVI94mba6elh0sLE+c8QjeqhvQneZ+6vITyvsC/YlzzZf7KLg os1cVnpLF3vYqwamMx9h2vPERuVOJzJBX3XIOH+7iw7eyNZ7+DeblVjqaHE45hP7O5GsCdgg/mZ2T wAwFffH77sM5O+pS21lWtrBJwviK0lHJlsAHzQKUXtTSOrZRbG9TXAL3qKQUt76wjH7Dfc5J7d7Vc 8UlJaR+SQ==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=hirez.programming.kicks-ass.net) by merlin.infradead.org with esmtpsa (Exim 4.92 #3 (Red Hat Linux)) id 1hZ9lX-0006Ov-Fa; Fri, 07 Jun 2019 07:58:23 +0000 Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 3C301202CD6B2; Fri, 7 Jun 2019 09:58:22 +0200 (CEST) Date: Fri, 7 Jun 2019 09:58:22 +0200 From: Peter Zijlstra To: Yu-cheng Yu Cc: x86@kernel.org, "H. Peter Anvin" , Thomas Gleixner , 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 , Florian Weimer , "H.J. Lu" , Jann Horn , Jonathan Corbet , Kees Cook , Mike Kravetz , Nadav Amit , Oleg Nesterov , Pavel Machek , Randy Dunlap , "Ravi V. Shankar" , Vedvyas Shanbhogue , Dave Martin Subject: Re: [PATCH v7 22/27] binfmt_elf: Extract .note.gnu.property from an ELF file Message-ID: <20190607075822.GR3419@hirez.programming.kicks-ass.net> References: <20190606200646.3951-1-yu-cheng.yu@intel.com> <20190606200646.3951-23-yu-cheng.yu@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190606200646.3951-23-yu-cheng.yu@intel.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jun 06, 2019 at 01:06:41PM -0700, Yu-cheng Yu wrote: > An ELF file's .note.gnu.property indicates features the executable file > can support. For example, the property GNU_PROPERTY_X86_FEATURE_1_AND > indicates the file supports GNU_PROPERTY_X86_FEATURE_1_IBT and/or > GNU_PROPERTY_X86_FEATURE_1_SHSTK. > > With this patch, if an arch needs to setup features from ELF properties, > it needs CONFIG_ARCH_USE_GNU_PROPERTY to be set, and a specific > arch_setup_property(). > > For example, for X86_64: > > int arch_setup_property(void *ehdr, void *phdr, struct file *f, bool inter) > { > int r; > uint32_t property; > > r = get_gnu_property(ehdr, phdr, f, GNU_PROPERTY_X86_FEATURE_1_AND, > &property); > ... > } > > Signed-off-by: H.J. Lu > Signed-off-by: Yu-cheng Yu Did HJ write this patch as suggested by that SoB chain? If so, you lost a From: line on top, if not, the SoB thing is invalid.