From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 45B04E77188 for ; Thu, 2 Jan 2025 14:40:44 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id A44E76B00CD; Thu, 2 Jan 2025 09:40:43 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 9F3FE6B00CE; Thu, 2 Jan 2025 09:40:43 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 8E2B86B00CF; Thu, 2 Jan 2025 09:40:43 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id 707056B00CD for ; Thu, 2 Jan 2025 09:40:43 -0500 (EST) Received: from smtpin23.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id D906A1C6B35 for ; Thu, 2 Jan 2025 14:40:42 +0000 (UTC) X-FDA: 82962771528.23.9002546 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by imf02.hostedemail.com (Postfix) with ESMTP id 152CB80005 for ; Thu, 2 Jan 2025 14:39:03 +0000 (UTC) Authentication-Results: imf02.hostedemail.com; dkim=none; dmarc=pass (policy=none) header.from=arm.com; spf=pass (imf02.hostedemail.com: domain of Dave.Martin@arm.com designates 217.140.110.172 as permitted sender) smtp.mailfrom=Dave.Martin@arm.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1735828817; a=rsa-sha256; cv=none; b=K9P2QHog9GoaUVhfLVtaRclr3fUrgUdXlASd3dausVgdCsLNh2gHJlkskTil39hdbezhCz 3SSQ4dKpScDp5wZhPFgxHofTKHfH3A5Ef9biU/ZI7Zu9CNywZ0+lhBVsJO/3p31CwFQ833 rBC27xh9tgWfcy1ADQEJwJ/+M/ygRD0= ARC-Authentication-Results: i=1; imf02.hostedemail.com; dkim=none; dmarc=pass (policy=none) header.from=arm.com; spf=pass (imf02.hostedemail.com: domain of Dave.Martin@arm.com designates 217.140.110.172 as permitted sender) smtp.mailfrom=Dave.Martin@arm.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1735828817; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=AOZdZ5yXDop6QqGSd7xkflLAyBEKsrUW2ht2JglVzHQ=; b=ws2swnpkTvh5SReTPQL4Frog1lVXC5lEYbTLVF9Q2QDdL0O3LPLJ35apTW/FKO5c98ySii hdfY2v6DYY4eKENdbO0bAHGgxf/3qX4kWq1FKVPHnDjw608iQCLZNw+mfyulwxW35n+d4e U1Bm07ommlp+uKpYluxh8jjj4PesNk8= Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 22C9911FB; Thu, 2 Jan 2025 06:41:08 -0800 (PST) Received: from e133380.arm.com (e133380.arm.com [10.1.197.41]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id DC2283F59E; Thu, 2 Jan 2025 06:40:38 -0800 (PST) Date: Thu, 2 Jan 2025 14:40:33 +0000 From: Dave Martin To: Akihiko Odaki Cc: Eric Biederman , Kees Cook , Catalin Marinas , Mark Brown , linux-mm@kvack.org, linux-kernel@vger.kernel.org, devel@daynix.com Subject: Re: [PATCH] elf: Correct note name comment Message-ID: References: <20241225-elf-v1-1-79e940350d50@daynix.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20241225-elf-v1-1-79e940350d50@daynix.com> X-Rspam-User: X-Rspamd-Server: rspam03 X-Rspamd-Queue-Id: 152CB80005 X-Stat-Signature: qrno49ixx5o6indixkmp5tjmtw9dj94w X-HE-Tag: 1735828743-252557 X-HE-Meta: U2FsdGVkX1/bukfjV2aRDGj0s0SYLrBSicw5RYLQzy6QymV0oVjq5GuWMakwYIl6V/JjghghvcrRk8hCQRsKbu62ntg8XzEKnsYcCkDGpIM59G71cMCVuuIh0O/UvemTCpYvF6HQ5xGr5PuwO2mgQAzsfjqNlYvE2Z/G34zBo3z9JRcw1Vmbf2YcBpBCpyKusniZJsmRZatqak3QrLCLGDzZ9lPkMNhQK1FkgB9bNJmuSFEWpjVqPbpKVHpZWOW9q/x4KTDun9Ew8Cez5RnMi/AzzhBr40b66ymkM9Gxt82EfL7kKXg4mgNx6/SUcdfPNGZmFGnZUyBLh54hDid7lz1GdKkiN/mglaD2guKJqQH4xmZrLybgkCsUHOKsVYB7/SNlE25RMVieS6RFfI0UAtc2x1Qk8fek6nwW4pEQQhklj9y0ReH2QW5VlsT6Njh3N9un4+pwQ/LL3VA/4x9utDn7WOqspR8/YwKemFVflV6a4aANKNvh7jBSOcHY/3bk40esFOeywCeG2aa6YTMJ05QivOOgC5D/BkiMomwnL52xGOoB+ba3DX2Vb8i4+Qvyc8ZtXC6SAoU6A/q9aOWxKtVes1xHmlR+CBpiQCizKKV2dXFZ/aaobaTrSSZzrp95GeKK39xWL5n994LGOC7mJ4ipT+scR9L/GSItosMo2P653QG4HjbE4tkQEvcAMsw8q19Vv77CxmIZReHhl9EzoHslMPcWpiENv0GTefaCcRsUCfa/rrHzaeMztMTTChoO9xmpGnB7y14XSMNIn/5QaxE4Tv7it0f6WCHQdqIaAkwpQLmnBxPm0ajxN1Y7NAiV2O1rDnA/btjZQrjStECGzU+lfWh+rzRpkzCtbiYYNlYz1q2RSW4C9k0nJG81iURJMoLuH9nAloU1BgketffZzFY1zwShUoEYDz+E57RXNTOyfizjYzm0bdHETEOt+5pDeH71YgE864DNsjEUboW tvtQeIPn /AIgyLOwjGJSRYxtM+OUeMRDHpaMXz/kwdOpDQ7NR+UQfCTGjPkJKzW/L74VrJDTvgqE2NJJD9ARXCGCl9gEGCXdkZ4mTkoCN7G5dM9ZmQNjk0iypmwTZediUK7YPRfJIx+52ewwlTC5Oj7UbZJ3xT3cNwlV8h03z20EaSQcsrHoiPzRniPPZeH+U1f/bltxSHfpHal6UG8ONG6P6qK5cthHn+8GFkMrxqQx5IlA8E91sbz+S+Qrpuzr3we1TkFPPBu4bHmfF36qz+Z4= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: Hi, On Wed, Dec 25, 2024 at 03:46:44PM +0900, Akihiko Odaki wrote: > NT_PRSTATUS note is also named "CORE". Correct the comment accordingly. > > Fixes: 00e19ceec80b ("ELF: Add ELF program property parsing support") > Signed-off-by: Akihiko Odaki > --- > include/uapi/linux/elf.h | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/include/uapi/linux/elf.h b/include/uapi/linux/elf.h > index b54b313bcf07..4f00cdca38b2 100644 > --- a/include/uapi/linux/elf.h > +++ b/include/uapi/linux/elf.h > @@ -372,8 +372,8 @@ typedef struct elf64_shdr { > * Notes used in ET_CORE. Architectures export some of the arch register sets > * using the corresponding note types via the PTRACE_GETREGSET and > * PTRACE_SETREGSET requests. > - * The note name for these types is "LINUX", except NT_PRFPREG that is named > - * "CORE". > + * The note name for these types is "LINUX", except NT_PRSTATUS and NT_PRFPREG > + * that are named "CORE". > */ > #define NT_PRSTATUS 1 > #define NT_PRFPREG 2 [...] This still seems rather confusing. It's not clear which note types are being referred to in "for these types". I think this statement was supposed to refer only to the architectural regset notes. I guess "CORE" was for generic coredump notes goverened by common specs, and LINUX was for Linux-specific stuff, but I suspect that this distinction may have bitrotted. It looks like the ELF specs never defined the core dump format, so the concept of non-OS-specific coredump notes may not make much sense. The ELF specs _do_ explicitly say [1] that the note name must be taken into account when identifying the type of a note, so the note name for each kind if note should really be documented explicitly. Is it worth adding explicit #defines for the note name of each kind of note, to make the ABI contract explicit? Cheers ---Dave [1] e.g.: System V ABI - DRAFT 24 April 2001 https://refspecs.linuxfoundation.org/elf/gabi4+/contents.html (Linked from ELF and ABI Standards, https://refspecs.linuxfoundation.org/elf/index.html )