Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp950608rdb; Wed, 6 Dec 2023 04:55:19 -0800 (PST) X-Google-Smtp-Source: AGHT+IG4wyMqKw/gpFs92U6r6gxkVmAk81va7BYm/L/Q20Y8Duk+dFcBGmdvz6YtHVTLtu0gvj73 X-Received: by 2002:a17:903:228e:b0:1d0:a8bb:96a8 with SMTP id b14-20020a170903228e00b001d0a8bb96a8mr1257508plh.28.1701867319019; Wed, 06 Dec 2023 04:55:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701867318; cv=none; d=google.com; s=arc-20160816; b=XUkWczHD85ESEHrDyG8VmCaryIREAxJeKYptuoj5EJY8fd4OXgHszG4WOWUI9xKRRK NESbmm6vjNVzyGr0mRN2TXJQrVyvRWosXOFvnrKfP+T4bS7M4oPNotBz2+pw0XTM2XZ1 0VtlQcQYZo1RiuKJ7RJjBUB/LNKLk+znLa9b7JtV9l1aQtDL+d73kOR5UAptYvmqjBbD D4taEhVk6eDtzca2f0fkBySWdzJobhrqBiQ/XcxjiZ/45E1kuX0A3MLu8Ny5lQP41iXO ofLBARynUGKbBst8ElN4eYuI6btzlO7M0IxTE5n/DEsvnck82KT+NdKDy751Ru2n1e9m S+3g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature:dkim-signature; bh=vgAv+rqLbU6w0LVClulr1cB9z6lInpwbja3q5sciudk=; fh=3EXpYsI7hLQV0a9eUbfkxmF0Cz25dlM5iw5kZeQ5VbU=; b=aIUKOiUR1EvdRd1WG3MDt8U75tsDdmGCF5pzvpFQ6bIcA1Meb8qWyE/J56juIUvsZY tuLdAi2ET1vBqHakrCMXXVHO9BwjMrzy1hVr2Ldbja2s6ygSTbuk8AI1IT/iewu76dZh lTHNSgF8qWM/xiiMjMA46KUCo6p4ep3scWBcTeL2CaDUxl49aoyg7h46OmebzgaSmRhJ c+FFAhubNl2lgPWRGVsTQ8dl66zuqWwHSgW8Yix0uUtA8iFEO2LC8VK9fRuBmL/O7wEy RzbMxfFptYSje5NUGoSAm5VGR2bbsFAdhgOgY1DMRyyKv2K1IoGj0JbQl5kHcPm+liTM FUBw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=k5hz+99R; dkim=neutral (no key) header.i=@suse.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Return-Path: Received: from groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id q12-20020a170902dacc00b001d1c96a0c58si1594268plx.272.2023.12.06.04.55.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Dec 2023 04:55:18 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=k5hz+99R; dkim=neutral (no key) header.i=@suse.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 8FFB280C3A39; Wed, 6 Dec 2023 04:55:15 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1378352AbjLFMyi (ORCPT + 99 others); Wed, 6 Dec 2023 07:54:38 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35828 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1378195AbjLFMyc (ORCPT ); Wed, 6 Dec 2023 07:54:32 -0500 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.223.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C4717D3; Wed, 6 Dec 2023 04:54:38 -0800 (PST) Received: from imap2.dmz-prg2.suse.org (imap2.dmz-prg2.suse.org [10.150.64.98]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 3FEB41FD0E; Wed, 6 Dec 2023 12:54:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1701867277; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=vgAv+rqLbU6w0LVClulr1cB9z6lInpwbja3q5sciudk=; b=k5hz+99RYKwZsroqjLBxkB/U3C5hKqBgas0nloQbvkUq3oSf38JP79Bgi5oXNYxtGotrFc A8g1vcs+lZjQCSL5ETYEY2e2V3KiWDbekLlr1f8eyZLus1QKpcCpDj1FknH4RFL9xZWjH8 eZ/1Wb41ky8XwGTT8Q+NgQl0SurWYyI= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1701867277; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=vgAv+rqLbU6w0LVClulr1cB9z6lInpwbja3q5sciudk=; b=qcsCDE6KXwKVocclIX+Mj5qpbPQv11BgmfV/NvxP84Kx+mUcswyGkXGCGNOlLn7JYX1c/X B8IOFuD33BSoyEDw== Received: from imap2.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap2.dmz-prg2.suse.org (Postfix) with ESMTPS id B8ED713B3C; Wed, 6 Dec 2023 12:54:36 +0000 (UTC) Received: from dovecot-director2.suse.de ([10.150.64.162]) by imap2.dmz-prg2.suse.org with ESMTPSA id uPn0KwxvcGV6dAAAn2gu4w (envelope-from ); Wed, 06 Dec 2023 12:54:36 +0000 From: Thomas Zimmermann To: ardb@kernel.org, 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 Cc: 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, Thomas Zimmermann Subject: [PATCH 3/3] arch/x86: Do not include in several header files Date: Wed, 6 Dec 2023 13:38:39 +0100 Message-ID: <20231206125433.18420-4-tzimmermann@suse.de> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20231206125433.18420-1-tzimmermann@suse.de> References: <20231206125433.18420-1-tzimmermann@suse.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: 3.40 Authentication-Results: smtp-out2.suse.de; none X-Spamd-Result: default: False [3.40 / 50.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; BAYES_HAM(-3.00)[100.00%]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; FREEMAIL_ENVRCPT(0.00)[gmail.com]; R_MISSING_CHARSET(2.50)[]; TAGGED_RCPT(0.00)[]; MIME_GOOD(-0.10)[text/plain]; BROKEN_CONTENT_TYPE(1.50)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; R_RATELIMIT(0.00)[to_ip_from(RLthqzz6q5hnubohss7ffybi86)]; RCVD_COUNT_THREE(0.00)[3]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; RCPT_COUNT_TWELVE(0.00)[22]; MID_CONTAINS_FROM(1.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.de:email]; FREEMAIL_TO(0.00)[kernel.org,linutronix.de,redhat.com,alien8.de,linux.intel.com,zytor.com,google.com,arndb.de,linux.ibm.com,gmail.com,paul-moore.com,namei.org,hallyn.com]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_ALL(0.00)[]; SUSPICIOUS_RECIPS(1.50)[] X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,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 groat.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 (groat.vger.email [0.0.0.0]); Wed, 06 Dec 2023 04:55:15 -0800 (PST) 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 --- 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