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 AA998C07E9D for ; Mon, 26 Sep 2022 15:15:59 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id F05856B00F2; Mon, 26 Sep 2022 11:15:58 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id EB4088E0065; Mon, 26 Sep 2022 11:15:58 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id D7C478E0047; Mon, 26 Sep 2022 11:15:58 -0400 (EDT) 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 CBA846B00F2 for ; Mon, 26 Sep 2022 11:15:58 -0400 (EDT) Received: from smtpin22.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id 9CA6FAB18C for ; Mon, 26 Sep 2022 15:15:58 +0000 (UTC) X-FDA: 79954586796.22.20EF261 Received: from tarta.nabijaczleweli.xyz (unknown [139.28.40.42]) by imf05.hostedemail.com (Postfix) with ESMTP id 2768910000E for ; Mon, 26 Sep 2022 15:15:57 +0000 (UTC) Received: from tarta.nabijaczleweli.xyz (unknown [192.168.1.250]) by tarta.nabijaczleweli.xyz (Postfix) with ESMTPSA id 2CED02040; Mon, 26 Sep 2022 17:15:55 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=nabijaczleweli.xyz; s=202205; t=1664205355; bh=O6butbHEYXb4X2YTzbhHaO1UylgtvPZjvHMs4RWdSvg=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=JxiznzBra2+BR0qTR5UGFsIS055L/CO0mxcmXg0liP/AVCsFSQKoKe14LpHaJbWZq FgCcdSEqNKm2Zvscjpvz+wXc2/WNHgqWmEt6gtzVkFbn2oXSOs4oFUTTV5OdNDPbik VmLNpwl42PU4fGkCmeCPH72iCPnx9s7Au5MWnfq/4SwU1fJ/5fy4ghQ59j/BhNs/gF O0NIjhWLPooszMQD9CESnym/nwt81rkLslMJT3q5MI47CLz0/eT0wG7Ph25DCPWQmg otmjxCCN4BdkhYarHKUGCthMm17n/rJL0IVxWzqO+7nUXKBL+k2xgJzL2lDutxhiH6 A3lHbNvWfb9iAZuCuiLnOoX/DuPd3Ql64EK0O8pkOqRgqFZnO+x5/tNQtGD8ucZBmU NGLj80zd2+EX24UgFgblGYsxhE9z+VqY1nOWdHSA54utZWReTwioykSH3JpQZ9Z6lL SOajSAx/JkXbJKzXKyfACYFS5hTjqqPs01szTRAHmJMsBEZmsemjmQyD4y5yy0Cu9r fnK/vh8+NTajE8JE5O6rxw3GE9NYgv9hV47R7jKN3hmYI2VssBFbrvkR/JZp7j5TGm 7046P4UREg7FSI835qcareeyEqAYUdhinIFp3jy+LoHeR4oiV4+byeK2iRoKS2gAaV iC9wAhSX2hd6n4+6TBNeIUYA= Date: Mon, 26 Sep 2022 17:15:54 +0200 From: =?utf-8?B?0L3QsNCx?= To: Geert Uytterhoeven Cc: Greg KH , Bagas Sanjaya , Jonathan Corbet , Federico Vaga , Alex Shi , Yanteng Si , Hu Haowen , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-doc-tw-discuss@lists.sourceforge.net, Eric Biederman , Kees Cook , Alexander Viro , Linux MM Subject: Re: [PATCH v4 02/18] a.out: remove define-only CMAGIC, previously magic number Message-ID: <20220926151554.7gxd6unp5727vw3c@tarta.nabijaczleweli.xyz> References: <9cbea062df7125ef43e2e0b2a67ede6ad1c5f27e.1663280877.git.nabijaczleweli@nabijaczleweli.xyz> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="owvvegzmxe7bs6ov" Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20220429 ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1664205358; a=rsa-sha256; cv=none; b=wWwiU4ug5F4yGNSy8bDLdRJzMWnMwNpZMA5m70Gz6ECLZZhUglewLLrZ4y5tIKHQ3zGDld SI1dUKsCYievI4Vg8/zA+Yq2Er/1qUHCTZrnggj8fTLF9uw6PxbGjaHvJjnz/Oto3fmSEE Psiv53Xxcyd4yLIYqFL2plK4jmx85/w= ARC-Authentication-Results: i=1; imf05.hostedemail.com; dkim=pass header.d=nabijaczleweli.xyz header.s=202205 header.b=JxiznzBr; dmarc=pass (policy=none) header.from=nabijaczleweli.xyz; spf=pass (imf05.hostedemail.com: domain of nabijaczleweli@nabijaczleweli.xyz designates 139.28.40.42 as permitted sender) smtp.mailfrom=nabijaczleweli@nabijaczleweli.xyz ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1664205358; 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:dkim-signature; bh=aCawSWZIACOh+sm+1Ju8wbP3mtj0w8C4OmaanuoA/7U=; b=I3LTr7Olw5EV8VwnUo9yVzixIX01lMMcCE+ckFTiJRbHxB5i58KTtmemWOPdylx3tXoLJq 1gKwyZWvwLgPCGjnhviejKpjhfduYvwFjTm+CSmYFBay7nP9AW9tfvROrGunxus6MgmO+4 vq6t0AL0W7enAcQJnYewN1r0pfA7R6g= Authentication-Results: imf05.hostedemail.com; dkim=pass header.d=nabijaczleweli.xyz header.s=202205 header.b=JxiznzBr; dmarc=pass (policy=none) header.from=nabijaczleweli.xyz; spf=pass (imf05.hostedemail.com: domain of nabijaczleweli@nabijaczleweli.xyz designates 139.28.40.42 as permitted sender) smtp.mailfrom=nabijaczleweli@nabijaczleweli.xyz X-Rspam-User: X-Stat-Signature: feohmbjspbus5bhtt37jwfamuyg8h6f7 X-Rspamd-Queue-Id: 2768910000E X-Rspamd-Server: rspam06 X-HE-Tag: 1664205357-783313 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: --owvvegzmxe7bs6ov Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi! On Mon, Sep 26, 2022 at 10:16:02AM +0200, Geert Uytterhoeven wrote: > Thanks for your patch, which is now commit 53c2bd679017277f > ("a.out: remove define-only CMAGIC, previously magic number") in > driver-core/driver-core-next. >=20 > On Fri, Sep 16, 2022 at 12:40 AM =D0=BD=D0=B0=D0=B1 wrote: > > The last user was removed in 5.1 in > > commit 08300f4402ab ("a.out: remove core dumping support") > > but this is part of the UAPI headers, so this may want to either wait > > until a.out is removed entirely, or be removed from the magic number doc > > and silently remain in the header >=20 > Indeed. This is part of uapi, and might break some unknown > userspace, while the gain is limited. Do we really want to reduce > include/uapi/linux/a.out.h piecewise (e.g. N_BADMAG() seems to be > unused, too), instead of keeping it until a.out support is removed > completely? Not really, but it looked like a magic number in the magic-number.rst sense due to the field being "magic" and the unintuitive type naming: I hadn't realised it's part of the on-disk format re-examination shows that it very well may be (have been). > Anyway, even at that point, it might be wise to keep the header file > around, as people have expressed the desire to run a.out binaries > through a userspace-compatibility wrapper. Agreed. Scissor-patch that reverts the removal below. > > A cursory glance on DCS didn't show any user code actually using this > > value >=20 > What is DCS? Debian Code Search; in this case my query was: https://codesearch.debian.net/search?q=3D%5CbCMAGIC%5Cb&literal=3D0 There's a few false positives here but all results that are using CMAGIC to mean this CMAGIC (and aren't hurd code copied from linux) just re-define it. > > Documentation/process/magic-number.rst | 1 - > > Documentation/translations/it_IT/process/magic-number.rst | 1 - > > Documentation/translations/zh_CN/process/magic-number.rst | 1 - > > Documentation/translations/zh_TW/process/magic-number.rst | 1 - > > include/uapi/linux/a.out.h | 3 --- > > 5 files changed, 7 deletions(-) > >=20 > > diff --git a/include/uapi/linux/a.out.h b/include/uapi/linux/a.out.h > > index 5fafde3798e5..bb15da96df2a 100644 > > --- a/include/uapi/linux/a.out.h > > +++ b/include/uapi/linux/a.out.h > > @@ -70,9 +70,6 @@ enum machine_type { > > The first page is unmapped to help trap NULL pointer references */ > > #define QMAGIC 0314 > > > > -/* Code indicating core file. */ > > -#define CMAGIC 0421 > > - > > #if !defined (N_BADMAG) > > #define N_BADMAG(x) (N_MAGIC(x) !=3D OMAGIC \ > > && N_MAGIC(x) !=3D NMAGIC \ >=20 > Gr{oetje,eeting}s, > Geert Best, =D0=BD=D0=B0=D0=B1 -- >8 -- Subject: [PATCH] a.out: restore CMAGIC Part of UAPI and the on-disk format: this means that it's not a magic number per magic-number.rst, and it's best to leave it untouched to avoid breaking userspace and suffer the same fate as a.out in general Fixes: commit 53c2bd679017 ("a.out: remove define-only CMAGIC, previously magic number") Signed-off-by: Ahelenia Ziemia=C5=84ska --- include/uapi/linux/a.out.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/uapi/linux/a.out.h b/include/uapi/linux/a.out.h index bb15da96df2a..5fafde3798e5 100644 --- a/include/uapi/linux/a.out.h +++ b/include/uapi/linux/a.out.h @@ -70,6 +70,9 @@ enum machine_type { The first page is unmapped to help trap NULL pointer references */ #define QMAGIC 0314 =20 +/* Code indicating core file. */ +#define CMAGIC 0421 + #if !defined (N_BADMAG) #define N_BADMAG(x) (N_MAGIC(x) !=3D OMAGIC \ && N_MAGIC(x) !=3D NMAGIC \ --=20 2.30.2 --owvvegzmxe7bs6ov Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEfWlHToQCjFzAxEFjvP0LAY0mWPEFAmMxwikACgkQvP0LAY0m WPFsOg/+LbOR74Qel4hfE8PDMr9APMECOWl5vTlxh+SZqgou2UJ8HIQ6kqweyyZi ap9urcIzyiIb4lnGUWSLMyGG89H6paRIAr8pPX/wLWOkkXpukCg77CnwbqZrQCO3 etsnNxwThtjN23Y4ggMhHwZ85Nn6RnhmzFcHHZ2UsfbyYjnGT85eZHhUzh8uFjjF J2UEdff3e4dx32vGw+SRbzxre1g/fCXB1Yp8dcvvQ9vLJjxHqayK2uNVjVF3Cbmk c71dYu38EEcAymYByMwDqiV1gKpisguLzsRctH2ZK6H7k1UakLutLH9GnRAeNJ+Z 6p/rb02O6N5yFGyXzjix74ILOWhhv/+HJ8D2EFWM02ictMrttjawVCcGSkU048d0 h3hSMEXR8vAcVu9utZyW1lMotDJHvcdlPYE9hA+Mem82B/+w6qIszvkG2//JO7So HkkPkWEeel+3vWSfdilM1DhlX5aFgzdB74DrJywFbOzjwL4kYiKi53AEF0VJgCOd vEcX/vxN8oVUxaaHL7Tun0UkWYCS1hpt8A74rbrWhdflM+Oc4c7A+0d9ga8MFM4f CDygsPBClz2WthgcNV+1RfVh257MDurYIqmaLcenaQOBF5Z/6wHAnE5ne0D5oN0d uYDvV2jjjSHts0sLJssHo3QEJr78NIMxC7G1ETfF42lWzGLPRUs= =qrkH -----END PGP SIGNATURE----- --owvvegzmxe7bs6ov--