Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp1741214rdb; Thu, 7 Dec 2023 07:38:28 -0800 (PST) X-Google-Smtp-Source: AGHT+IFr8OtEc6/GAIwMDHbZLo/WZp/rPlcPiPUrPH0mlYfbDrgArcP3W/9opb7/VRgC9RnEjPjf X-Received: by 2002:a17:90b:1987:b0:286:c55a:d9e0 with SMTP id mv7-20020a17090b198700b00286c55ad9e0mr2545965pjb.32.1701963508146; Thu, 07 Dec 2023 07:38:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701963508; cv=none; d=google.com; s=arc-20160816; b=MbP5omI65XP0ffmYN74PTKJpUo6zGoVLks0DKGjLV82mKazDJ/xeij1BsDjzqkJ8FM u4XOVu4GaA9yWwfh+bkXaiVhyoT0+VcjFWV027K9ywI5UBp3ouVHU75fn7mR9+hojzZt K6pTnHd00PSNFt2bHS1wWdaevvhP0o2vCW2P83laPaOL2CVnkYesQi8YoahsiVcVWXWe 4SEiVfLDyHHeREYtGl4QdIu9rytpsf8LmK+M3l6Hjj4ZYLPhNDUvVnJ/3d21+krGsF5n lk2xPfnMwXguZ16sRcJo7koN7DuAv713NZvN2xtNsrMxTh0DAUXqeP+iU9DDM4xSvgGQ 07Ew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=Nr410LjwRa09HWLqQK9HePa2vMc2ognlZkUO2n5qwJY=; fh=olUnnNbCNO6oc7jUK9qAAYJGpIByyDaZzUxHnQ4XdUk=; b=uahoI9xXRiCtIYWZ8qbzRKriSnBTfIOVNqRkdQZkPxZ9DKckF3/SOHxxsGTQLeFwWo q2z2X4HJ8u4Enjo+xnIaoo/bFO1rmrBlyFAgFBhchFN45eiMtnNdJnRHgiAzOm+P+OnT VlYNM0rSQumYxILbqAxDfeudLColL6NQG3Gfd5l5z+deoYA5UomO8S5iZnR+dKSaiB+9 d0nabhg/PjjqE3IRodP+iOr2o2iGfffRH2tc79kUdQjRjcDRxgSKbrK1oScYrdpt7VsP YWM6v1dYveAAqCBQtJUSV6PelOZ3s400XYhh/cCMKUXYbC0w/ztH6b53htvkJ8t/OZvR QgGg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=BwBLlw5e; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from pete.vger.email (pete.vger.email. [2620:137:e000::3:6]) by mx.google.com with ESMTPS id w7-20020a17090a8a0700b00286ef1cde35si21190pjn.119.2023.12.07.07.38.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Dec 2023 07:38:28 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) client-ip=2620:137:e000::3:6; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=BwBLlw5e; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id 80A928083AA1; Thu, 7 Dec 2023 07:38:25 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1443537AbjLGPiI (ORCPT + 99 others); Thu, 7 Dec 2023 10:38:08 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56192 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1443495AbjLGPiI (ORCPT ); Thu, 7 Dec 2023 10:38:08 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7A1EFA9 for ; Thu, 7 Dec 2023 07:38:14 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 25A55C433CB; Thu, 7 Dec 2023 15:38:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1701963494; bh=wvVN+1YIFHu6pwuC8my2GQeLCZBlFO2tSFyxQF8MEoA=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=BwBLlw5eO1GwXbEIAOPxS00/C0TZYafXou2wc/4do1UG3aFN+nnzSSA5mXnu5gzKN ++ArkvzxIsTVYgdlDD09GaZYkw39DyQv1MnL2HE5ZYiAz9G4nwmeRvLiEHI6TF6Xyj F7Bc/ntE8UuQznRkoo3k4paYxXtP+YekIgDKu2H+MKFd34HqpLv5BmOkBcd98Pbz5/ z2/qkCKtoad7MxiAD6wrFdoxf4fJlbly5v09CObEup7PTOfw1PGFtZ+H3Nt1pTXmNL dE6ZRSVjo/L+4RdBt852KgFxEL0soBCSeoF9rDgb0+BD0qvXdOf108VvM3RvpnF5ep bJkkQ5ND3sEBQ== Received: by mail-lj1-f178.google.com with SMTP id 38308e7fff4ca-2ca0d14976aso11119651fa.2; Thu, 07 Dec 2023 07:38:14 -0800 (PST) X-Gm-Message-State: AOJu0YxqTAcfQiOF++ADXxtRp33L6X1oImJKGUwdKA6Z/W8STMjfgRgT mCOZh+pmvmsUEA1DR3zatZUwizz9hSeCalHRIy8= X-Received: by 2002:a2e:9686:0:b0:2ca:c76:c021 with SMTP id q6-20020a2e9686000000b002ca0c76c021mr1610161lji.68.1701963492420; Thu, 07 Dec 2023 07:38:12 -0800 (PST) MIME-Version: 1.0 References: <20231206125433.18420-1-tzimmermann@suse.de> <20231206125433.18420-4-tzimmermann@suse.de> In-Reply-To: <20231206125433.18420-4-tzimmermann@suse.de> From: Ard Biesheuvel Date: Thu, 7 Dec 2023 16:38:01 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 3/3] arch/x86: Do not include in several header files To: Thomas Zimmermann Cc: tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, dave.hansen@linux.intel.com, x86@kernel.org, hpa@zytor.com, bhelgaas@google.com, arnd@arndb.de, zohar@linux.ibm.com, dmitry.kasatkin@gmail.com, paul@paul-moore.com, jmorris@namei.org, serge@hallyn.com, javierm@redhat.com, linux-arch@vger.kernel.org, linux-efi@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, linux-integrity@vger.kernel.org, linux-security-module@vger.kernel.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Thu, 07 Dec 2023 07:38:25 -0800 (PST) On Wed, 6 Dec 2023 at 13:54, Thomas Zimmermann wrote: > > Remove the include statement for from several header > files that don't require it. Limits the exposure of the boot parameters > within the Linux kernel code. > > Signed-off-by: Thomas Zimmermann Acked-by: Ard Biesheuvel > --- > arch/x86/include/asm/kexec.h | 1 - > arch/x86/include/asm/mem_encrypt.h | 2 +- > arch/x86/include/asm/sev.h | 3 ++- > arch/x86/include/asm/x86_init.h | 2 -- > 4 files changed, 3 insertions(+), 5 deletions(-) > > diff --git a/arch/x86/include/asm/kexec.h b/arch/x86/include/asm/kexec.h > index c9f6a6c5de3c..91ca9a9ee3a2 100644 > --- a/arch/x86/include/asm/kexec.h > +++ b/arch/x86/include/asm/kexec.h > @@ -25,7 +25,6 @@ > > #include > #include > -#include > > struct kimage; > > diff --git a/arch/x86/include/asm/mem_encrypt.h b/arch/x86/include/asm/mem_encrypt.h > index 359ada486fa9..c1a8a3408c18 100644 > --- a/arch/x86/include/asm/mem_encrypt.h > +++ b/arch/x86/include/asm/mem_encrypt.h > @@ -15,7 +15,7 @@ > #include > #include > > -#include > +struct boot_params; > > #ifdef CONFIG_X86_MEM_ENCRYPT > void __init mem_encrypt_init(void); > diff --git a/arch/x86/include/asm/sev.h b/arch/x86/include/asm/sev.h > index 5b4a1ce3d368..8dad8b1613bf 100644 > --- a/arch/x86/include/asm/sev.h > +++ b/arch/x86/include/asm/sev.h > @@ -13,7 +13,6 @@ > > #include > #include > -#include > #include > > #define GHCB_PROTOCOL_MIN 1ULL > @@ -22,6 +21,8 @@ > > #define VMGEXIT() { asm volatile("rep; vmmcall\n\r"); } > > +struct boot_params; > + > enum es_result { > ES_OK, /* All good */ > ES_UNSUPPORTED, /* Requested operation not supported */ > diff --git a/arch/x86/include/asm/x86_init.h b/arch/x86/include/asm/x86_init.h > index c878616a18b8..f062715578a0 100644 > --- a/arch/x86/include/asm/x86_init.h > +++ b/arch/x86/include/asm/x86_init.h > @@ -2,8 +2,6 @@ > #ifndef _ASM_X86_PLATFORM_H > #define _ASM_X86_PLATFORM_H > > -#include > - > struct ghcb; > struct mpc_bus; > struct mpc_cpu; > -- > 2.43.0 >