Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp1494127rwb; Thu, 10 Nov 2022 17:32:54 -0800 (PST) X-Google-Smtp-Source: AA0mqf4K9b5WHrX1GIBQCm9mambvgtKiKxq/8Oi0sxFG0MBzr8EnEe0z3Ib82eeT+R8ihNIWoUbx X-Received: by 2002:a17:906:b10d:b0:7a3:fbfa:32e5 with SMTP id u13-20020a170906b10d00b007a3fbfa32e5mr249342ejy.7.1668130374181; Thu, 10 Nov 2022 17:32:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668130374; cv=none; d=google.com; s=arc-20160816; b=RHhJjvocIvCXvtijznZj9Fbi/dLicB62hjY3KNTdjVjxrvjgZzSldEHZer/VscRdZB opqtfRImH4CXhJ9yW9r2U5cKTuvIFdew12T9GX2RoMr/Iethq4D2JvNp98sgNKWSSU5j sGL8hTiPOrDevr0lAdUjHub4zqoQN1hO9KVK9LV0mxD6BFF88crnLBaBnNRZVesSmz/Z ukP6qYV5fN/WBLhotlHoc8wBhIXcjBH5BeD2bcbWP+kLsLPOGYtFtLMDE5XCttjJs8kC qIoIbXLylIlTdsZDSTMM7igdlRUPjf7ApU7R8nO6F4P+UyHI2/Jlo+l16WR9TDuOWdZH j8/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:from:date :dkim-signature; bh=uI8TKb3LkU8ZIMrfGz9fGaxvRIB8XuniRnuXFqooLyQ=; b=YIjdCLKhcvoHbQOk/gfRbH1cZse0VnIKvChIQQVcFW6ZQ9jtzk658TaKCUjhekE1xd H/veOm9tgmhlWbwTA7XUCvblWXCreEZc3/R6LPxHIC0vuyrJXmeJ20VA2PaFQEy8BTjd IrIKokOXUk8TFCogePcm0f6R+84f13ywCVWcpoUFTc1cTVJkaTDmBAH68CpD871xDSHH lbnubrdrcwlGCdXgGjERF6tPrM7sPhusr0Rsh2Q33f5TN/4hu4SF0j4bmpK5ClDWSFSh Pf2qxBVt9c5MVBVzQFqzay5f97tHbK5ToKaiiHSboWauvK1xkRHWuK3Iki+FOhScY1Jn /bFw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nabijaczleweli.xyz header.s=202211 header.b=bymImaMa; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nabijaczleweli.xyz Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m28-20020a50d7dc000000b00459fb0c1d9esi853657edj.549.2022.11.10.17.32.32; Thu, 10 Nov 2022 17:32:54 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@nabijaczleweli.xyz header.s=202211 header.b=bymImaMa; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nabijaczleweli.xyz Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232324AbiKKBPV (ORCPT + 92 others); Thu, 10 Nov 2022 20:15:21 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40272 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231938AbiKKBOn (ORCPT ); Thu, 10 Nov 2022 20:14:43 -0500 Received: from tarta.nabijaczleweli.xyz (unknown [139.28.40.42]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 6188163CD8; Thu, 10 Nov 2022 17:14:25 -0800 (PST) Received: from tarta.nabijaczleweli.xyz (unknown [192.168.1.250]) by tarta.nabijaczleweli.xyz (Postfix) with ESMTPSA id 4097544E; Fri, 11 Nov 2022 02:14:25 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=nabijaczleweli.xyz; s=202211; t=1668129265; bh=nmJaBcatiQbJk2SzOevB7r77S2U4rVv8j6ZH//5Pk1Y=; h=Date:From:Cc:Subject:References:In-Reply-To:From; b=bymImaMattby2LwQGeq26vivsLNJfrRqmqb1o9JZZCcVcW9atR8mIq1VsCkKVfUl4 x5zl8YXjwRaGGUdJdwpWUL1H/YSx0JeascSvY+qMR4ODs839gbkS/F8T+NnEjiRC7N o9uxd7q/IyWgiSq/i3Nu0zHzuTcmQkloMCKHAOGZueWBvY0mAVsbpEYmF96Zt1RkJr QI6OFx9ddHMvg0nLO/c9qV9FyiZOpkn8iDKz0jxaCXLj2cX5acf+pCS8Uk1e7yEPtV 2p2H2KTY8N30EfwJiomJcfnoEAiR4P4RL7FWG/7Y3+q4a4PiS0EqtPnmAkafxV3Y1O KoyB7Bs9HMTAQ== Date: Fri, 11 Nov 2022 02:14:24 +0100 From: Ahelenia =?utf-8?Q?Ziemia=C5=84ska?= Cc: Jonathan Corbet , Federico Vaga , Alex Shi , Yanteng Si , Hu Haowen , Jiri Kosina , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "H. Peter Anvin" , Greg Kroah-Hartman , Jakub Kicinski , Jiri Slaby , Kees Cook , Peter Zijlstra , Josh Poimboeuf , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-doc-tw-discuss@lists.sourceforge.net Subject: [PATCH v3 09/15] x86/APM: remove APM_BIOS_MAGIC Message-ID: <8a768ea8f801a0d6b29a064df9096c2ef636859e.1668128257.git.nabijaczleweli@nabijaczleweli.xyz> References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="23ykrm4fkptot4tp" Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20220429 X-Spam-Status: No, score=1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FROM_SUSPICIOUS_NTLD, MISSING_HEADERS,PDS_OTHER_BAD_TLD,PDS_RDNS_DYNAMIC_FP,RDNS_DYNAMIC, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Level: * X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --23ykrm4fkptot4tp Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable We have largely moved away from this approach, and we have better debugging instrumentation nowadays: kill it. Link: https://lore.kernel.org/linux-doc/YyMlovoskUcHLEb7@kroah.com/ Signed-off-by: Ahelenia Ziemia=C5=84ska --- Documentation/process/magic-number.rst | 1 - .../translations/it_IT/process/magic-number.rst | 1 - .../translations/zh_CN/process/magic-number.rst | 1 - .../translations/zh_TW/process/magic-number.rst | 1 - arch/x86/kernel/apm_32.c | 9 +-------- 5 files changed, 1 insertion(+), 12 deletions(-) diff --git a/Documentation/process/magic-number.rst b/Documentation/process= /magic-number.rst index d8ffbc21872e..77a96a79c7e8 100644 --- a/Documentation/process/magic-number.rst +++ b/Documentation/process/magic-number.rst @@ -68,7 +68,6 @@ Changelog:: =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D Magic Name Number Structure File =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D -APM_BIOS_MAGIC 0x4101 apm_user ``arch/x86= /kernel/apm_32.c`` FASYNC_MAGIC 0x4601 fasync_struct ``include/= linux/fs.h`` SLIP_MAGIC 0x5302 slip ``drivers/= net/slip.h`` HDLCDRV_MAGIC 0x5ac6e778 hdlcdrv_state ``include/= linux/hdlcdrv.h`` diff --git a/Documentation/translations/it_IT/process/magic-number.rst b/Do= cumentation/translations/it_IT/process/magic-number.rst index 0e59704aa617..ef509265a3df 100644 --- a/Documentation/translations/it_IT/process/magic-number.rst +++ b/Documentation/translations/it_IT/process/magic-number.rst @@ -74,7 +74,6 @@ Registro dei cambiamenti:: =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D Nome magico Numero Struttura File =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D -APM_BIOS_MAGIC 0x4101 apm_user ``arch/x86= /kernel/apm_32.c`` FASYNC_MAGIC 0x4601 fasync_struct ``include/= linux/fs.h`` SLIP_MAGIC 0x5302 slip ``drivers/= net/slip.h`` HDLCDRV_MAGIC 0x5ac6e778 hdlcdrv_state ``include/= linux/hdlcdrv.h`` diff --git a/Documentation/translations/zh_CN/process/magic-number.rst b/Do= cumentation/translations/zh_CN/process/magic-number.rst index 17a73661ef17..6437c408dd67 100644 --- a/Documentation/translations/zh_CN/process/magic-number.rst +++ b/Documentation/translations/zh_CN/process/magic-number.rst @@ -57,7 +57,6 @@ Linux =E9=AD=94=E6=9C=AF=E6=95=B0 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D =E9=AD=94=E6=9C=AF=E6=95=B0=E5=90=8D =E6=95=B0=E5=AD=97 = =E7=BB=93=E6=9E=84 =E6=96=87=E4=BB=B6 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D -APM_BIOS_MAGIC 0x4101 apm_user ``arch/x86= /kernel/apm_32.c`` FASYNC_MAGIC 0x4601 fasync_struct ``include/= linux/fs.h`` SLIP_MAGIC 0x5302 slip ``drivers/= net/slip.h`` HDLCDRV_MAGIC 0x5ac6e778 hdlcdrv_state ``include/= linux/hdlcdrv.h`` diff --git a/Documentation/translations/zh_TW/process/magic-number.rst b/Do= cumentation/translations/zh_TW/process/magic-number.rst index 9d44d49b93bf..453cc205e6c3 100644 --- a/Documentation/translations/zh_TW/process/magic-number.rst +++ b/Documentation/translations/zh_TW/process/magic-number.rst @@ -60,7 +60,6 @@ Linux =E9=AD=94=E8=A1=93=E6=95=B8 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D =E9=AD=94=E8=A1=93=E6=95=B8=E5=90=8D =E6=95=B8=E5=AD=97 = =E7=B5=90=E6=A7=8B =E6=96=87=E4=BB=B6 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D -APM_BIOS_MAGIC 0x4101 apm_user ``arch/x86= /kernel/apm_32.c`` FASYNC_MAGIC 0x4601 fasync_struct ``include/= linux/fs.h`` SLIP_MAGIC 0x5302 slip ``drivers/= net/slip.h`` HDLCDRV_MAGIC 0x5ac6e778 hdlcdrv_state ``include/= linux/hdlcdrv.h`` diff --git a/arch/x86/kernel/apm_32.c b/arch/x86/kernel/apm_32.c index 60e330cdbd17..f3dd21dc56b7 100644 --- a/arch/x86/kernel/apm_32.c +++ b/arch/x86/kernel/apm_32.c @@ -330,7 +330,6 @@ extern int (*console_blank_hook)(int); * The per-file APM data */ struct apm_user { - int magic; struct apm_user *next; unsigned int suser: 1; unsigned int writer: 1; @@ -346,11 +345,6 @@ struct apm_user { apm_event_t events[APM_MAX_EVENTS]; }; =20 -/* - * The magic number in apm_user - */ -#define APM_BIOS_MAGIC 0x4101 - /* * idle percentage above which bios idle calls are done */ @@ -1459,7 +1453,7 @@ static void apm_mainloop(void) =20 static int check_apm_user(struct apm_user *as, const char *func) { - if (as =3D=3D NULL || as->magic !=3D APM_BIOS_MAGIC) { + if (as =3D=3D NULL) { pr_err("%s passed bad filp\n", func); return 1; } @@ -1616,7 +1610,6 @@ static int do_open(struct inode *inode, struct file *= filp) if (as =3D=3D NULL) return -ENOMEM; =20 - as->magic =3D APM_BIOS_MAGIC; as->event_tail =3D as->event_head =3D 0; as->suspends_pending =3D as->standbys_pending =3D 0; as->suspends_read =3D as->standbys_read =3D 0; --=20 2.30.2 --23ykrm4fkptot4tp Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEfWlHToQCjFzAxEFjvP0LAY0mWPEFAmNtoe8ACgkQvP0LAY0m WPF/sw/8DTVbertRLwNERv49YnqkHbCEEjxPD+iXHmMiUVsnmSp/1ixzlUgpGYXh Kzzh2yl2hCO8oDirg1wcxdQfw53EIGKEI7BP8f9TTSwRf8BYOUHBu5QvB+R4VGwM 7+3EDmVjFRJQAclL6mTurTjBslsr5q8Kj6umodjNOXLRUWOD4KgqV8LcvSchAtjn 5UrOUQyxP9aWODii+cwYDc4cnHfy9Hsk3a4oqyJUwcOyGpKR5UuFwrEen3j5rBge jICFcfL1NK0G9lBFtSFnp6iWKPSBy3h0Zb+TnxAKEY37trWJJ1CGLxghBTFNxmcK oJF2eAKGMu/sGWqjTGQI1iEXfhoA66DTOy7+DnkvYGk+6Zl97SXHsyBWPtITVxrx MEz/fe8k+sK4M/vVJjqCechV3IPcbq6aRkd2aYp/iIyi1JESarf97x7ZDdHVlolm 1K+zvNT7B6t6LfYn4U2ORsxpCLw9sdYlpOngJwGmU4DzCm3GhZk/QDxtM0/9zonr M9QaU79nVeCAVccGtZ9OWp/8liItyJLti+h9EW4jL8IofRD0TWnP7b6eAai5J0MR oAPf+HRURwvOXh88o6PRj3LH+cmdTBpSW/QiLJElkqm3yNH/CGx+qMU/H4jBne8a a7I0uxuaCNX7yCgVORdvhWcXBI0NM16tSwHLBgYFlInK3NE7sXk= =wWR4 -----END PGP SIGNATURE----- --23ykrm4fkptot4tp--