From nobody Fri Sep 25 13:54:13 2026 Received: from mail-wm2-f12.google.com (mail-wm2-f12.google.com [74.125.225.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 72F40365A0F for ; Fri, 11 Sep 2026 14:42:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=74.125.225.140 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789137768; cv=none; b=V3fmMkCkAdaWPwzJo9w9jzOIjtqUjaH4RSLH43HICS9XJusj99brmViiQQrkmANTEmwyLbo1OQPrVvhju13Jusr8mLvz9DftpuopX0DJ3zc0gomyR5A3QJz77BNkSDzIfFgFPaqCI/ZYx9Z1gnYGkesE8veCB8/AIhzmAdkz+qI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789137768; c=relaxed/simple; bh=Q6gYJk+pvivEut4Dg9S1KYlKEBevCBrSEwCT14tMvuE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=S1dJd00vkvML97+msgT49qp90Bql7E3hg2VMdwcLE5OYJvkG38exRujrciIp0ePoh8HX4sGWVLj5wyOD2JWxO4dK0M3jmF0p1qa6M5poKH51EWytRxExGvyrDEsCmRpsg6bbjaMrxUs1cBr8KkCRHu8a9TecX/JPMPvNUMZzaew= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com; spf=pass smtp.mailfrom=suse.com; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b=b5syWAab; arc=none smtp.client-ip=74.125.225.140 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b="b5syWAab" Received: by mail-wm2-f12.google.com with SMTP id 5b1f17b1804b1-49cd6185db7so6034385e9.1 for ; Fri, 11 Sep 2026 07:42:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1789137764; x=1789742564; darn=vger.kernel.org; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to:content-type; bh=o6xq0BxW8kPi2a+1MlzTOWetcM4nnwrAPZoyBYnvLVM=; b=b5syWAabYfLW/JkamLeCwo12Ds0StLNJSUY639dt7/PEU/zeXEnHt1BG/56u3em7j/ QbBuSSvhKFQimwQL5tycIRYUKhpy079ocqnMl2oUiWmvHqaF3I/BZTYGalvm5opiRKRJ fClUSQX4cnLSlHYJByehBH+NYN9Y4fNk4LFOyQaKajA3GlE69PnSOhDt3rKwiX1hp7zS QbQ1PKkqX7CeVUzqRDKNuAbhztGsSN9maJ2hKkU6pPAnQdaGUUMf69EYIFNfPDQmk7LK 5duFJ96WYai4NazsmJ0Y2M1qoSbdFoZBMMxUuW20BI/PfHPKD5GE3XhGIOz60+FYUmaA fJBA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1789137764; x=1789742564; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:cc:to:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=o6xq0BxW8kPi2a+1MlzTOWetcM4nnwrAPZoyBYnvLVM=; b=ei+SfVmQqPIoB02SZJrdxJ6/fxvMr6z4I+JbeZAp2ReP4wy9JAlhqVlf4D927yWe4+ H0BwzllTd0aSPxphLOPLF2p0fSe9qFwdJ97KENNDBVwgLKOPPPyJVZQbnj/ClTJkceQ0 v6isiXsSwUrvmPQFJ6cJFa1Vn2Caf4+5bB+VqwbEoKE/KQbbZUD72BLh27tAWZIKudZU Znwkssd5b+cgKPaUdRDgs3IoDt3sJAAaAkrIpYj2NK1FETlhGwlcQ11NVY9mY3AiHOsm ELUsXtnNnzIxkaMq0KO/XHABEgCNV3xfbSM10hV/vLZaCxDOpA9NL2/dXS7irNjexngQ WvXw== X-Forwarded-Encrypted: i=1; AKwUvBxC8R2E0F+vkab/f/lp1GnubmBAHuiaV5B0/3BYSAFkfILY1RzWDWp4KvEQEuKkC1uUIjFqw5bX+UaS+ug=@vger.kernel.org X-Gm-Message-State: AFuF++mmwFwTEk4ptwET4gJYbHQTCNatmTHUuwMaj2H1Vq2sdZkPKY2v 5nz2VLaVqZrdy7kcoQW91abBhqo5vkPZYRZkNpd+jVsbm11OI2ij/jDLxDaZv/nW7LI= X-Gm-Gg: AYBFou38DPiQsTS3RIwuHI7oPgvFwm+1xUul656LE419iMhnwAPn7oOBxRhPEjrimZ+ jtpiisWeM/Y+pGoEzPVJB9q8QnX+/XD0RWrGEQijticgPGM8pm5ZUNyJoW1UlQvEBDCZGeMfz6v Xzm6ZpTFdu/A/UfpRyDa8liN3wfL4hP4UDmhqQHu3MGpp9uUgtWZyNQ/AB0NMIdKLyb5rZOHBu4 aFUl5uGkNniYIiUU+5Byazullhtr6k6WtNyGTb3wljZutNIkuadNJjrIeBvaXw04OEbw5rrPuw3 5+yS5jUY4NBAaovXXcNj0ahYkgieWda67n+RkM4hCxUt94V9nIlUwEnhkuk/lR0C0NUXjIm9B37 DHf92h05ZWwmMV8eaKQQWJ786uG2NiXgISyBT60QsOKiowaV9vmLZWRshAMcibvGQdGu/X8KvQO ErkrQVOF9UROlPSTzjKUH+Br1deR6KCDrjXZC9eUNWwRAb+D3KAhZjUj2rg+qzx91JAaZcVGcMm 00u9w== X-Received: by 2002:a05:600c:4ece:b0:49c:f13e:e4c with SMTP id 5b1f17b1804b1-49e610829b5mr56105305e9.9.1789137763706; Fri, 11 Sep 2026 07:42:43 -0700 (PDT) Received: from localhost.localdomain ([2001:af0:8000:1409:193:86:92:181]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-49e60ababd5sm107038405e9.4.2026.09.11.07.42.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 11 Sep 2026 07:42:43 -0700 (PDT) From: Petr Pavlu To: Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, Heiko Carstens , Vasily Gorbik , Alexander Gordeev , Peter Huewe , Jarkko Sakkinen , Luis Chamberlain , Petr Pavlu , Daniel Gomez , Sami Tolvanen Cc: Xin Li , "H. Peter Anvin" , Andy Lutomirski , Christian Borntraeger , Sven Schnelle , Janosch Frank , Claudio Imbrenda , David Hildenbrand , Jason Gunthorpe , Aaron Tomlin , linux-s390@vger.kernel.org, kvm@vger.kernel.org, linux-integrity@vger.kernel.org, linux-modules@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 1/6] x86: Avoid indirect includes through linux/module.h -> linux/elf.h Date: Fri, 11 Sep 2026 16:40:31 +0200 Message-ID: <20260911-module-include-elf-v2-1-954c732975fb@suse.com> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260911-module-include-elf-v2-0-954c732975fb@suse.com> References: <20260911-module-include-elf-v2-0-954c732975fb@suse.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Several x86 files use ELF-related declarations and currently rely on them being provided indirectly through linux/module.h -> linux/elf.h: * arch/x86/entry/entry_fred.c: ia32_enabled() -> asm/ia32.h, * arch/x86/entry/syscall_32.c: vdso32_image -> asm/vdso.h, * arch/x86/kernel/cpu/intel.c: ELF_HWCAP2 -> asm/elf.h, * arch/x86/kernel/fpu/xstate.c: elf_coredump_extra_notes_write(), elf_coredump_extra_notes_size(), NT_X86_XSAVE_LAYOUT, elf_note -> linux/elf.h, * arch/x86/kernel/process.c: mmap_is_ia32() -> asm/elf.h, * arch/x86/kernel/signal.c: get_sigframe_size() -> asm/elf.h. Add the missing includes to these files in preparation for removing the linux/elf.h include from linux/module.h. Signed-off-by: Petr Pavlu Acked-by tags from the relevant maintainers would be appreciated. Acked-by: Borislav Petkov (AMD) --- arch/x86/entry/entry_fred.c | 1 + arch/x86/entry/syscall_32.c | 1 + arch/x86/kernel/cpu/intel.c | 1 + arch/x86/kernel/fpu/xstate.c | 2 +- arch/x86/kernel/process.c | 1 + arch/x86/kernel/signal.c | 1 + 6 files changed, 6 insertions(+), 1 deletion(-) diff --git a/arch/x86/entry/entry_fred.c b/arch/x86/entry/entry_fred.c index fb3594ddf731..ea3bb4298065 100644 --- a/arch/x86/entry/entry_fred.c +++ b/arch/x86/entry/entry_fred.c @@ -9,6 +9,7 @@ =20 #include #include +#include #include #include #include diff --git a/arch/x86/entry/syscall_32.c b/arch/x86/entry/syscall_32.c index 91123a90710c..4ace5b534f65 100644 --- a/arch/x86/entry/syscall_32.c +++ b/arch/x86/entry/syscall_32.c @@ -12,6 +12,7 @@ #include #include #include +#include =20 #ifdef CONFIG_IA32_EMULATION #define __SYSCALL_WITH_COMPAT(nr, native, compat) __SYSCALL(nr, compat) diff --git a/arch/x86/kernel/cpu/intel.c b/arch/x86/kernel/cpu/intel.c index 4297ceb2cb24..7dd5a039186e 100644 --- a/arch/x86/kernel/cpu/intel.c +++ b/arch/x86/kernel/cpu/intel.c @@ -17,6 +17,7 @@ #include #include #include +#include #include #include #include diff --git a/arch/x86/kernel/fpu/xstate.c b/arch/x86/kernel/fpu/xstate.c index a7b6524a9dea..8b90bf86a742 100644 --- a/arch/x86/kernel/fpu/xstate.c +++ b/arch/x86/kernel/fpu/xstate.c @@ -7,6 +7,7 @@ #include #include #include +#include #include #include #include @@ -26,7 +27,6 @@ #include #include #include -#include =20 #include =20 diff --git a/arch/x86/kernel/process.c b/arch/x86/kernel/process.c index 346c438ac880..e7f736b53f41 100644 --- a/arch/x86/kernel/process.c +++ b/arch/x86/kernel/process.c @@ -54,6 +54,7 @@ #include #include #include +#include =20 #include "process.h" =20 diff --git a/arch/x86/kernel/signal.c b/arch/x86/kernel/signal.c index 2404233336ab..0fe2d7a6b1af 100644 --- a/arch/x86/kernel/signal.c +++ b/arch/x86/kernel/signal.c @@ -29,6 +29,7 @@ #include #include =20 +#include #include #include #include --=20 2.55.0 From nobody Fri Sep 25 13:54:13 2026 Received: from mail-wm1-f53.google.com (mail-wm1-f53.google.com [209.85.128.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6744436920D for ; Fri, 11 Sep 2026 14:42:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.53 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789137769; cv=none; b=aUKuuCUCk5MicifBfP4rA1uSUa2OI8WmwXF27oc1fTtSlWXBBmbMLIpNOjp8Co5mZrGTbwHGONYfwl656RQl6b57SM48gkpmEoz0m8Ii3LqNhVG0Rp+1ospZkNaIvCVaj06xCVtihlM23Efe31H+LGkUHfK5GqlphyN/+AMvUq0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789137769; c=relaxed/simple; bh=gz51FBCWhizVrU+7SLeOKliZNk1p8rWeS98CiQ+wXUY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=kNWLGF0YlWwimAYB4Uor7+yNnb02ZWvMaVPvDWNkONjg/lhKZaI9WgBJcJ10WhhS+VPJRuNtMB34RBrA6IvOEaquk9/uabx7wE5dqwCw1veeyFl7AgcyWJyRiKIEKMBu41+mcmwXRtH4H8x31mg40/iG+O7l5l9Zh+4YZQEgsOM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com; spf=pass smtp.mailfrom=suse.com; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b=TMvGMq1K; arc=none smtp.client-ip=209.85.128.53 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b="TMvGMq1K" Received: by mail-wm1-f53.google.com with SMTP id 5b1f17b1804b1-49d05d51553so10378595e9.2 for ; Fri, 11 Sep 2026 07:42:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1789137765; x=1789742565; darn=vger.kernel.org; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to:content-type; bh=hNkJ+Y4UNh/VmhAHfWRxswemkYstE9GZTmx6wz4UC8Q=; b=TMvGMq1KXCQ8s+RpmILsIeGf8K0plpbDc3xU0HxW5q69wJ4IuhPeLCr5JbpsWff46R R339YRUVqRi6/PFpgzO+b+Us8b3f0Fv3RavXH/rvTME6crQSeuZQX5fhsYwkFumrKmhE MEMcuIHBwGYYUdn5MYSsoLeQRLHg/AjEpHokj7Aaii7ap4k7cJKFOQG/tiZUWjFTnYaP lsPtlukinpLRNsdB7EuXrUMMC5LQpfj6AItmxEaYlmVgQ+Cj3hNca/7UM3Qz9RNHGCD0 a+6gAPL2hEEwWw9sRZRHyAcQZxk+Xn8ONLqvZvqEgWqJuBbWYpFcDFky37P6I126tOtP Fcyg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1789137765; x=1789742565; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:cc:to:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=hNkJ+Y4UNh/VmhAHfWRxswemkYstE9GZTmx6wz4UC8Q=; b=oRsBq1UAyHyYdodPEA3dznt531OHC34YJd1PQt2P0BNoT1SGt9Xwk0ZQqMJ703vCz4 GAAn27qIAnvo+JFbkNouZcDoRGtE8P6YvqBVsYXDJiu9CTNWXms3HmZC5wvu754i4R1T qIx89NfpTs1TixNqYgoDySAIQaWhQK5jrHyfg3TSBwLzrwePj1ATbYLgcSof0lKOZ2V8 iMPI2MQPfLAlVXHI8cnWEs03yP6+mv0KkzrgW233ZIo3qaOGxxiAL/BVBK2JP8ibBX3w Q21Kio3rPFTt8yT9peAZxXkGuZOzQehf62urbC7HWuIhNbPXuWvi65NKz9llk6V7XdDD OdSg== X-Forwarded-Encrypted: i=1; AKwUvByrWLiKEhbv1wRnbIqU6buGM6tYvxOURb+MukdWdz4s976X5agnlqmA2fIpUqWJO7FFLjLNUpE00cgLqJQ=@vger.kernel.org X-Gm-Message-State: AFuF++nwGx0q9AsipazmQ+f3cPnqEwmnZxaTmw03VaNsLdB6OTrwRRZ2 BczlpOElvV8kAMi+N+/2LcGatQAFZ1kGerK6N6ktnbmU147yM1S7Fr2XkYSR88Kk538= X-Gm-Gg: AYBFou0pEW/Rz8vh3OgYKAzm8tyRZ3TCirY2V8ne71WCNN3aw0tycQmxjFhA0ItDA33 R1h2Edh2u8aq5/wyc9G6sb4YRwInjxovgWIBR/U1aYAMTtQvdnL34EsEqbj60NxMh80qcM3H68z xaz9BZa/Fw/rxluydX50ikLmBFcSZEbqg9+87O6m+lZCkp2bhDnDJQ5u8O8f1gpqIviGhG4pbug gOfKtobR0nbicg6RaMA8Iv7wwmhyB846q5JyeaOTZakmxdwOibXFQoaBCDatJfalvwfFko+ZC2p D6GGwf4GgsubSQI9QA2p6eMi1ciUcUYuynNhiDRiimtmJeEMNS9/U9UTpBGeM1O5q33GKdvRefz jTGnNd5Y7Hj7O532jWME6dMlzipLvZnUPZ0APWq8oeu/9KiVv9ujo2hOKra7bRs21XF2TtsA/oW Ji9FjOmErR0GOrv5IJ/z7czPiC7XSu/u6JPme4BN7PnMHkc6jIq0LZNHVMCmRKkTMTApeeg6ULQ 4p+iYcZiaWTnvRz X-Received: by 2002:a05:600c:e557:20b0:49d:1d6a:4cfb with SMTP id 5b1f17b1804b1-49e619836d6mr35798025e9.1.1789137765611; Fri, 11 Sep 2026 07:42:45 -0700 (PDT) Received: from localhost.localdomain ([2001:af0:8000:1409:193:86:92:181]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-49e60ababd5sm107038405e9.4.2026.09.11.07.42.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 11 Sep 2026 07:42:45 -0700 (PDT) From: Petr Pavlu To: Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, Heiko Carstens , Vasily Gorbik , Alexander Gordeev , Peter Huewe , Jarkko Sakkinen , Luis Chamberlain , Petr Pavlu , Daniel Gomez , Sami Tolvanen Cc: Xin Li , "H. Peter Anvin" , Andy Lutomirski , Christian Borntraeger , Sven Schnelle , Janosch Frank , Claudio Imbrenda , David Hildenbrand , Jason Gunthorpe , Aaron Tomlin , linux-s390@vger.kernel.org, kvm@vger.kernel.org, linux-integrity@vger.kernel.org, linux-modules@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 2/6] s390: Avoid indirect includes through linux/module.h -> linux/elf.h Date: Fri, 11 Sep 2026 16:40:32 +0200 Message-ID: <20260911-module-include-elf-v2-2-954c732975fb@suse.com> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260911-module-include-elf-v2-0-954c732975fb@suse.com> References: <20260911-module-include-elf-v2-0-954c732975fb@suse.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Several s390 files use declarations that are provided indirectly through linux/module.h -> linux/elf.h: * arch/s390/kernel/nospec-branch.c: s390_kernel_write() -> linux/uaccess.h, * drivers/s390/char/uvdevice.c: copy_to_user(), copy_from_user(), put_user(), get_user() -> linux/uaccess.h; file_operations -> linux/fs.h. Add the missing includes to these files in preparation for removing the linux/elf.h include from linux/module.h. Signed-off-by: Petr Pavlu Acked-by tags from the relevant maintainers would be appreciated. --- arch/s390/kernel/nospec-branch.c | 1 + drivers/s390/char/uvdevice.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/arch/s390/kernel/nospec-branch.c b/arch/s390/kernel/nospec-bra= nch.c index e11ec15960a1..b62da9e81e79 100644 --- a/arch/s390/kernel/nospec-branch.c +++ b/arch/s390/kernel/nospec-branch.c @@ -2,6 +2,7 @@ #include #include #include +#include #include =20 int nobp =3D IS_ENABLED(CONFIG_KERNEL_NOBP); diff --git a/drivers/s390/char/uvdevice.c b/drivers/s390/char/uvdevice.c index 4d274a2ee84d..402b8a225d6b 100644 --- a/drivers/s390/char/uvdevice.c +++ b/drivers/s390/char/uvdevice.c @@ -28,6 +28,8 @@ #include #include #include +#include +#include =20 #include #include --=20 2.55.0 From nobody Fri Sep 25 13:54:13 2026 Received: from mail-wm1-f49.google.com (mail-wm1-f49.google.com [209.85.128.49]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 344BE36B924 for ; Fri, 11 Sep 2026 14:42:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.49 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789137771; cv=none; b=NI+pGq1Q//SYW9222nV0a3bMOJ8Ms7M9sPvaA/OJ4VAvIVspTGEmvN6dZqWMSTCWzRPxIGvVu2Sj73Cza+ARkHZyOdvSsZnHcHJKaVRpZkdzwQUtmOc8nm5z4awyn5I6WiW8tk5u+VjiIk+EbCxVEznMz6n7CbzrztW4ytfqGkU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789137771; c=relaxed/simple; bh=ETAktZ2QqHsWv3xS6bFropZQnc1xNBFVWMWX5r49MRU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=eW9tTxNbC8E7DRUTxou5Go00LP7NisQd6CAQtBEECjXeUAmfpFkN87YSWQlRzlCVIyMDB/cY0SnMd1lDCUqRn3jhoNEprtGQy7/rlaJUkOvik+IXBoeaPjTNBfwVEUy6mRKqZHqc9BAXjqzLZhCw20olIXHas+3R4e8OSaj0PCw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com; spf=pass smtp.mailfrom=suse.com; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b=KMuTAQ60; arc=none smtp.client-ip=209.85.128.49 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b="KMuTAQ60" Received: by mail-wm1-f49.google.com with SMTP id 5b1f17b1804b1-4995b0343c1so14986055e9.3 for ; Fri, 11 Sep 2026 07:42:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1789137767; x=1789742567; darn=vger.kernel.org; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to:content-type; bh=zmqtfnwwI+zawdSfV+Bb8zoK3g+hxNVqzzOe1wmmaFk=; b=KMuTAQ60E1CNCd4URXitK1S0G1TPbtFo/8O8pHis1hFlmUoTVHMXiXNQVvL5tTNkJk 7xlpb9OjCsSQguxNa/njBoRk0dh9fLjoT1Jd7nLCVirRR7lR6ptF/nwcTO/oZ2dn1Z6J v/5m1+jI+XymI4y1S8B3tamh5a47cE053BCWZf76epFHDHjDpUXVJfXrVWVBkDD8aAxm VRP90l7RbEnDe6d+8TPz19FyjXodJnFsbAK94SJA9xssWf+u9KJx+brm2OWPM6zHNCdr F7I1coQzJHToof84FKaohuh4fKiA+446oeAEh5dIYeYntLaXFQ5zrY8jKVuo18z1Bw83 9hzA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1789137767; x=1789742567; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:cc:to:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=zmqtfnwwI+zawdSfV+Bb8zoK3g+hxNVqzzOe1wmmaFk=; b=OeYNBrvBq1BkUF9NHSf5UXUymTaSMnaFgH/vtj3U50o5k5SjHMVDRNeifV28y+ql2R m7eeYf50raB8+EpR0Oziy1pm9a/0cSmuX4eiafBTUbG0Bc4zUCLIGr4thm7+arcwMMNW fK6uT7KB92OGyg9GKLgYoaAatfEU9uAwPvR6ZNcsN7D5Wq/rEiBXsYAoR0Hzr1LkNPAB xwsgJ+gu31ezatkxHSuVwXOQJumgqLGQoVhNYVyLJbmAwSVFqswXA/4wJxj2oSqAhBAS INbUtzdyTrUeVVBEOAqCEWMtn32mrUcWs6Q5lN3F6wpV1rlNU96CaQfDMitxKWH2oW+U b9cw== X-Forwarded-Encrypted: i=1; AKwUvBxx2dvp6zMs74KP/Lxt4RTPGtbVLm4zlwBoZbsbXBM4yDk9axiR+J95eWRK/IN9rD4NBcjsJy98BNABMMM=@vger.kernel.org X-Gm-Message-State: AFuF++kBtbr8vxZzhoUdbrCIbsxhXsZhD5dffrgiOFy5UYHLNOBRn909 grKX7rtFIOHythUeR5N5G5wf5nSqm0xh0weGG3Wqh9+xDYvH0G7I6zGK88q4P/9JI/4= X-Gm-Gg: AYBFou0uz7L0AHHbW0mZT+WZpExsxw9Jg4RIJxdR/hbl5/t9Y+uNYq4AMfimin5FnwV AlCgLT1051oTlwHqu21wvlIyzD442ioNhrJqAYzxqQ4zxESsZlwSpYa/IcKhFY0QVjh0wDXekVR jq2Q9NB+e16i1m18X/qRxx0JV6rKJS9Dm2P2if31y5jAiYYfky6LWH3G/U2v6Je7Hvsl8bCF+y0 iYDOziGUtkiq3nBUKjdaceRnQ4B2ayKt8778HOFKhXxMrO9WhPdbtNj00W5crWFD/mNBMmyLAW6 xIk7wVv/16JKbdosOflDnDoNyuw1new62s4MHXmR6kEEo/cDR6rO/1r5RQEgivIzBaEyUXzTQs5 USPggSqNlAK5G1ZXuTvinwMiXMsqviN7+NO/zU6dwc5S/xB8oryAjfA3V0KYRdWQKEFvtPlTIxY UzKqUJrXukjyGoKR+lCYkaLlc1DXT0iaNnS5oT0ic0c8gAoyFZAHHJyK8rPO3kkSstuMGi2otaA zaI3Lo= X-Received: by 2002:a05:600c:1d1c:b0:49d:2562:d670 with SMTP id 5b1f17b1804b1-49e6199243amr52252455e9.14.1789137766949; Fri, 11 Sep 2026 07:42:46 -0700 (PDT) Received: from localhost.localdomain ([2001:af0:8000:1409:193:86:92:181]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-49e60ababd5sm107038405e9.4.2026.09.11.07.42.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 11 Sep 2026 07:42:46 -0700 (PDT) From: Petr Pavlu To: Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, Heiko Carstens , Vasily Gorbik , Alexander Gordeev , Peter Huewe , Jarkko Sakkinen , Luis Chamberlain , Petr Pavlu , Daniel Gomez , Sami Tolvanen Cc: Xin Li , "H. Peter Anvin" , Andy Lutomirski , Christian Borntraeger , Sven Schnelle , Janosch Frank , Claudio Imbrenda , David Hildenbrand , Jason Gunthorpe , Aaron Tomlin , linux-s390@vger.kernel.org, kvm@vger.kernel.org, linux-integrity@vger.kernel.org, linux-modules@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 3/6] drivers: Include linux/slab.h for kmalloc() functions Date: Fri, 11 Sep 2026 16:40:33 +0200 Message-ID: <20260911-module-include-elf-v2-3-954c732975fb@suse.com> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260911-module-include-elf-v2-0-954c732975fb@suse.com> References: <20260911-module-include-elf-v2-0-954c732975fb@suse.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable drivers/char/tpm/tpm_crb_ffa.c and drivers/virt/coco/arm-cca-guest/arm-cca-guest.c use kmalloc() functions, which are declared in linux/slab.h. They currently rely on this header being included indirectly through linux/module.h -> linux/elf.h. Add the missing includes in preparation for removing the linux/elf.h include from linux/module.h. Signed-off-by: Petr Pavlu Acked-by tags from the relevant maintainers would be appreciated. --- drivers/char/tpm/tpm_crb_ffa.c | 1 + drivers/virt/coco/arm-cca-guest/arm-cca-guest.c | 1 + 2 files changed, 2 insertions(+) diff --git a/drivers/char/tpm/tpm_crb_ffa.c b/drivers/char/tpm/tpm_crb_ffa.c index 025c4d4b17ca..af4466cdc297 100644 --- a/drivers/char/tpm/tpm_crb_ffa.c +++ b/drivers/char/tpm/tpm_crb_ffa.c @@ -12,6 +12,7 @@ #include #include #include +#include #include "tpm_crb_ffa.h" =20 static unsigned int busy_timeout_ms =3D 2000; diff --git a/drivers/virt/coco/arm-cca-guest/arm-cca-guest.c b/drivers/virt= /coco/arm-cca-guest/arm-cca-guest.c index 0eeddd1ff05b..54dcfc1681ab 100644 --- a/drivers/virt/coco/arm-cca-guest/arm-cca-guest.c +++ b/drivers/virt/coco/arm-cca-guest/arm-cca-guest.c @@ -8,6 +8,7 @@ #include #include #include +#include #include #include #include --=20 2.55.0 From nobody Fri Sep 25 13:54:13 2026 Received: from mail-wm1-f50.google.com (mail-wm1-f50.google.com [209.85.128.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BAA2236654C for ; Fri, 11 Sep 2026 14:42:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.50 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789137773; cv=none; b=sq3FIZRDXTm9nMMSGsRzahtMxY2xT2sQ3XBl6nzcZstfQrV1zbZGs2prM0qzTFAk2R64cXgUIB5eoBBZKuw2KDP7KSwnyiW5CdXXAxwSqtduW+mL/u1sThM1UTXZd0wGXHHsKubMygBdIH044YEAdPAtrsrokJzqauYj3c9Htf8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789137773; c=relaxed/simple; bh=vyJh04de2eQI9xDXQLk2SsoY9d27ljdKRQo9PLvYs3c=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=DmK7SSwcXM8pC7upPYSz9YOJIR/BMhja0/t/gcPVIn/dKWeiwpU0ptzLeo9fMV3nhnUWSeCExYydfaL5mkriUaMjChgEgocV5aMIQ6NMh/njeYAdJoZrTYAfp1fUciBkAzcxvSbW3XFXIAgJwCBrmulsqGgwGMoBQz4uOqii1Yk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com; spf=pass smtp.mailfrom=suse.com; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b=Ry9/DkDa; arc=none smtp.client-ip=209.85.128.50 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b="Ry9/DkDa" Received: by mail-wm1-f50.google.com with SMTP id 5b1f17b1804b1-49ccfae359fso8076475e9.3 for ; Fri, 11 Sep 2026 07:42:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1789137769; x=1789742569; darn=vger.kernel.org; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to:content-type; bh=q7y0rlVQh9abTylMWGDq0N15j8M2y0GYhOvmNvpShVQ=; b=Ry9/DkDaFZ4TdwpnSd2qNFVelkgZf0I+sK/vUSrXGJVDvUzGWKFLqdb8UxWJFtIRyd QGt2zLsY13XYCfEcx00KmUUPRDrGz+NYn9CJmX9yUyb6hq7gEJz42IC4MRCnwIaEcpdW tQUujaQLqeUNnfCJTTcjYm7FSljCpemBd6+PukhbHVRJ4Q4stj3C5SASxuwEvbjV0Osg /Q9Xgj+v7KR2zVR2teJezj0miqoZCcV0EC/BLQEfUdpZPOknI1tMHRR4RQUQMW5zLmKr P4KyxRefgvqyrABexKeT1gw6lYCx5pucDAHN4oMpIUKFHJiBPNydC9j33pcTbhnipiQE DZWQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1789137769; x=1789742569; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:cc:to:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=q7y0rlVQh9abTylMWGDq0N15j8M2y0GYhOvmNvpShVQ=; b=j0G/a2qkWj6TUBXW317WLmBQZOBwDKL4JfAMDkQYyuE873n7ZD4yzcv6D9ADSgy5KJ yIhG6iLuyY4d55oKGW+q+MUsy+rf3di2AgwfurcO7Blt+CLkIcAeiKDdExq/ABQlsrUz un31t1KtVEcbwK13V8GXHObFvy5CIJzKLg6JhKKLDTqmmazQwxZTT9pjDERcJx4u2ubu RNOiSiTSc4imRpQ6vSa7WlJSxihtnAVzDyBDk21uuIJ/Tnphytyse7wz/cWM7q+iuvEf 77wZuHCu5pwGFUp6G34Fl5aeXpcb0rKpjoMGtS+r/ewESJkz/EblXlYU8LdGAaD0j/q1 NlCg== X-Forwarded-Encrypted: i=1; AKwUvBwunJoXsjnrfNHF1o9ULfmBFtL0d3I/Et/kjVeG+p9JE4tmMBhO7QomTKIutTYh+xV6CN39lcaq/r/AlO8=@vger.kernel.org X-Gm-Message-State: AFuF++kHib0DNYbTQlwEuDXXyuui4TEX2DwqUUNhB/vhYkCT9RiW/b/g oROcDqnqcEc+QpfRIY2NTxw/DxlBancreeXzaBl9x+09SMi1WPouCAPWc1Nl9/gIARo= X-Gm-Gg: AYBFou2nX8obJunqQKsgUWf7LjNg4JhHFa00f/G6PEeIbu6Pnq0KkInt/OVHgNxChQN L7F8ZhdPr22k/sb6UuaUFvG+ZAH4YctEVT1THnnY13LrANvml/2GDuPo7btHWjkgJXHuIHA2L/C kcPtwVh63SnGcGTXbf2CsrrOXoMJNI7icuxeIdhJCdR5iu/inBI7hlZuswSPLxJquHrPpYfKZ0I n0GzwXkbzMRMwxfTrWRTZJUrMRhFOdSFysIbqeUJBV7AX6T4vR0nkfbVvt0lLrExVjrJRaWiZbO zoYBtoBH2FhFh9MI9lcIy8grxnWh+9gX0AcRWb25oDaheEJOwYEpt4a1TiYL7bBVVo8Jtfnlprf Xy14RE18cnbK5+uGdYyjydX1O+j77MShBRwImfg5dcLkoR4Ttba8TxP0uNvYUrYzGgLQ2aA3Sak MIFxVdZG7a3C0AJSQbShPIZOrgc04svy3aDcdVxQOh/s2Sj1WU6aqdDgKQVzeWa80SAroOj/jWT B5/wA== X-Received: by 2002:a05:600c:4f43:b0:49c:fc6c:be0b with SMTP id 5b1f17b1804b1-49e619bd068mr62359435e9.17.1789137768683; Fri, 11 Sep 2026 07:42:48 -0700 (PDT) Received: from localhost.localdomain ([2001:af0:8000:1409:193:86:92:181]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-49e60ababd5sm107038405e9.4.2026.09.11.07.42.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 11 Sep 2026 07:42:48 -0700 (PDT) From: Petr Pavlu To: Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, Heiko Carstens , Vasily Gorbik , Alexander Gordeev , Peter Huewe , Jarkko Sakkinen , Luis Chamberlain , Petr Pavlu , Daniel Gomez , Sami Tolvanen Cc: Xin Li , "H. Peter Anvin" , Andy Lutomirski , Christian Borntraeger , Sven Schnelle , Janosch Frank , Claudio Imbrenda , David Hildenbrand , Jason Gunthorpe , Aaron Tomlin , linux-s390@vger.kernel.org, kvm@vger.kernel.org, linux-integrity@vger.kernel.org, linux-modules@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 4/6] s390: Remove the asm/mmu_context.h include from asm/elf.h Date: Fri, 11 Sep 2026 16:40:34 +0200 Message-ID: <20260911-module-include-elf-v2-4-954c732975fb@suse.com> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260911-module-include-elf-v2-0-954c732975fb@suse.com> References: <20260911-module-include-elf-v2-0-954c732975fb@suse.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable The asm/mmu_context.h include was added to asm/elf.h by commit 146e4b3c8b92 ("[S390] 1K/2K page table pages.") in 2008, when the new macro elf_read_implies_exec() used disable_noexec() / current->mm->context.noexec. Commit 043d07084b53 ("[S390] Remove data execution protection") removed that macro in 2011 and asm/elf.h no longer needs asm/mmu_context.h. Several s390 files currently depend on declarations provided indirectly through asm/elf.h -> asm/mmu_context.h: * arch/s390/mm/mmap.c: check_asce_limit() -> asm/pgalloc.h, * arch/s390/kernel/processor.c: enter_lazy_tlb() -> asm/mmu_context.h. Add the missing includes to these files and remove the asm/mmu_context.h include from asm/elf.h. This is a preparatory cleanup for adding the asm/elf.h include in linux/cpufeature.h, which would otherwise create the following cycle: linux/pgtable.h -> asm/pgtable.h -> linux/cpufeature.h -> asm/elf.h -> asm/mmu_context.h -> asm/pgalloc.h -> linux/mm.h -> linux/pgtable.h Signed-off-by: Petr Pavlu Acked-by tags from the relevant maintainers would be appreciated. --- arch/s390/include/asm/elf.h | 1 - arch/s390/kernel/processor.c | 1 + arch/s390/mm/mmap.c | 1 + 3 files changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/s390/include/asm/elf.h b/arch/s390/include/asm/elf.h index bb63fa4d20bb..e22e3ab25760 100644 --- a/arch/s390/include/asm/elf.h +++ b/arch/s390/include/asm/elf.h @@ -170,7 +170,6 @@ typedef s390_fp_regs elf_fpregset_t; typedef s390_regs elf_gregset_t; =20 #include /* for task_struct */ -#include =20 /* * This is used to ensure we don't load something for the wrong architectu= re. diff --git a/arch/s390/kernel/processor.c b/arch/s390/kernel/processor.c index e33a3eccda56..76b2c7478c6e 100644 --- a/arch/s390/kernel/processor.c +++ b/arch/s390/kernel/processor.c @@ -27,6 +27,7 @@ #include #include #include +#include =20 unsigned long __read_mostly elf_hwcap; char elf_platform[ELF_PLATFORM_SIZE]; diff --git a/arch/s390/mm/mmap.c b/arch/s390/mm/mmap.c index ef7bfc87758c..8206f347e00e 100644 --- a/arch/s390/mm/mmap.c +++ b/arch/s390/mm/mmap.c @@ -18,6 +18,7 @@ #include #include #include +#include =20 static unsigned long stack_maxrandom_size(void) { --=20 2.55.0 From nobody Fri Sep 25 13:54:13 2026 Received: from mail-wm1-f51.google.com (mail-wm1-f51.google.com [209.85.128.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BBA6A217648 for ; Fri, 11 Sep 2026 14:42:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.51 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789137776; cv=none; b=srFues15LVP2jW0pY2RRSA1edfs7vmXrtS44b7Sqb7yJeKy7G8sgshSeEDfxZmyisrt+a2ZMq/r+B7pc3G+kgFPD3OAlP9+qolZBDmNXXm3Ct49xNACBeuyj+kVjNPaUro0EhOgwlWmR8ldE5KwYiLLeeHp11Pxk0Z+lTEXCtsM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789137776; c=relaxed/simple; bh=0IbYtktTturnkEVqSlPbeY9GBPBTr7a/zwfoJfBYE+M=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=MddUMtwMhlxlosl1qBv4ltG6OPKt2NnTnBC0t0xPkKH4OM5a1EDJbrOIu2x5evsiafn+7C3OOZ+g9rs3ELQ8kmQHWbzSAEKpBixckmyXgzpkaCyjk8om1Vo4jUWAAPAl27knnFhwSjdqp9cljnVEhP85+mmMlO+crIFx8V2oSsk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com; spf=pass smtp.mailfrom=suse.com; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b=Z8jfTWos; arc=none smtp.client-ip=209.85.128.51 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b="Z8jfTWos" Received: by mail-wm1-f51.google.com with SMTP id 5b1f17b1804b1-49cca4ffdcfso8728645e9.0 for ; Fri, 11 Sep 2026 07:42:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1789137770; x=1789742570; darn=vger.kernel.org; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to:content-type; bh=FKEH1rdH58hXYuPTfWCTfgwfx7OW8iMrRBH+iDZ91m4=; b=Z8jfTWosaEo2HWD2p/bKk1WPbhl/j6Pe2eLIR8l6ukhtfdaUijFMgVf2HCa7Z298SD CFcykKCNEosaxh8H1INhTq5m0f/XqRC5fsjT3azAOB5zvpsS8/QUec+opqz9bhiKTnqU d9RmGJF1NWoJcyLW+ZxqfUoyWaOTXdhY0cpc/f3YvvjKb5wGSG+fI9QgimDFakTbb0kJ IIbtE4rW8l5mj6FAffDrI9GM2LakqOKXPCbR52H6mKtRGrfm6xiQsjOBjF1gLaMmLQxl wu6l8w57NLr0I5Z07RgoKWtMTRnqmzpagspnC+ipJvRR48TYm/Jk1bElpF3Yht6+affq 4D2w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1789137770; x=1789742570; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:cc:to:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=FKEH1rdH58hXYuPTfWCTfgwfx7OW8iMrRBH+iDZ91m4=; b=drxIbSSz1KZx8dtLq2G7nvH32QLQ2g6FMzfizGOf/1WoKR2tHIxpajlS05+oy9lNHY S3+sgl+9oL6sDtcMfX05/v+5nG4es1HASZC3slBMueeFh6HDZ5rqrIs6rMkQaSij33sS 6onQpCgHncq6TmSAiDey8XJslM30BPux/8INKSN2CuzF51desNhHntk9iXu8xpyr78nr IDUxXR63LQThteqo9AJE5mPH5p075JZ+1FANQ3Eg6oWUL52unCr7MX1mM7ccSEyMncO9 /vzT9gsbO2h9vrc60/p2c/v8HfNccDoK2nm1VK/WPQQEJA+aCQ5K6dJhrTJk2UIg212Z CvCg== X-Forwarded-Encrypted: i=1; AKwUvBxvP44Dg3EUTzjuW3HlJ7uTbGbAbgNTkfTCgkG/R8E16j1agcIfjcSl35XDVcOsP8QgxRdSgKI7cibiY0k=@vger.kernel.org X-Gm-Message-State: AFuF++n9C8FkLnUUHr2KhszUg33UQY2grrSJ3HrDt0sAs1zS6ndigEHw OJPZzagZgWBe2tobhNU0S5mT9QW+V5rDg/6kKxu7wap8sEmGHoBjnTgMFrOGynZjkqI= X-Gm-Gg: AYBFou1csXBiZIwUfTHPjrn1JKFhC+zXDh7AsBCoKE5LVkYfr0BTjwx6kP3FNvUDiuM HF+KHCeUfX0N1sj8Hf7yiaw5y970FZxA/RLCgcvMsTqmqUvXYHKIV0alndhCUnh1d30KFt5a9UM NiCbCdzuuy4K4rWrgeEgc6u9T6yKrnrn2zvZSrG5pbtrsTCpjzLFQbJW0uIOTND3yQlh5HkiXj5 yMi0DAx19fuewH86VUgbF2M4WnB/HTQNwe9Q1QaRJy7Md69Nox6pcoPU2EX7ID87fk6cPEPuWaE Vq3eMnsZxA9o2GJ7Pt3QhSq9kv4dPIVAs1UapYB7XtHd7EuS4rVySOh7DJmDJa9+sdxCA4HQs2+ MZh990+Br3w0jeDycWULT+1ZuEIl3YfaSdTzamfT6HyUztAp1IiPnaHvmHZK5lYhC0+3ugBLjGu 4SvoNirOKjtc8eXWL6lXwWHhU42uPiolx7ZRyX/R3x/NQyYSV7dZkN8cqJQilgpemrtdiuJN31d +ztXzU= X-Received: by 2002:a05:600c:3b1f:b0:49c:fc89:59cb with SMTP id 5b1f17b1804b1-49e61983468mr57196585e9.5.1789137770026; Fri, 11 Sep 2026 07:42:50 -0700 (PDT) Received: from localhost.localdomain ([2001:af0:8000:1409:193:86:92:181]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-49e60ababd5sm107038405e9.4.2026.09.11.07.42.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 11 Sep 2026 07:42:49 -0700 (PDT) From: Petr Pavlu To: Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, Heiko Carstens , Vasily Gorbik , Alexander Gordeev , Peter Huewe , Jarkko Sakkinen , Luis Chamberlain , Petr Pavlu , Daniel Gomez , Sami Tolvanen Cc: Xin Li , "H. Peter Anvin" , Andy Lutomirski , Christian Borntraeger , Sven Schnelle , Janosch Frank , Claudio Imbrenda , David Hildenbrand , Jason Gunthorpe , Aaron Tomlin , linux-s390@vger.kernel.org, kvm@vger.kernel.org, linux-integrity@vger.kernel.org, linux-modules@vger.kernel.org, linux-kernel@vger.kernel.org, kernel test robot Subject: [PATCH v2 5/6] cpufeature: Include asm/elf.h for ELF_PLATFORM Date: Fri, 11 Sep 2026 16:40:35 +0200 Message-ID: <20260911-module-include-elf-v2-5-954c732975fb@suse.com> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260911-module-include-elf-v2-0-954c732975fb@suse.com> References: <20260911-module-include-elf-v2-0-954c732975fb@suse.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable linux/cpufeature.h uses ELF_PLATFORM, which is defined in asm/elf.h. It currently relies on that header being included indirectly through other files, specifically, drivers/base/cpu.c gets it via linux/module.h -> linux/elf.h. Add the missing include in preparation for removing the linux/elf.h include from linux/module.h. Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202608151415.UAbFbpvE-lkp@int= el.com/ Signed-off-by: Petr Pavlu Acked-by tags from the relevant maintainers would be appreciated. --- include/linux/cpufeature.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/linux/cpufeature.h b/include/linux/cpufeature.h index 6aff540ee9e5..66027987e9d6 100644 --- a/include/linux/cpufeature.h +++ b/include/linux/cpufeature.h @@ -11,6 +11,7 @@ #include #include #include +#include =20 /* * Macros imported from : --=20 2.55.0 From nobody Fri Sep 25 13:54:13 2026 Received: from mail-wm2-f12.google.com (mail-wm2-f12.google.com [74.125.225.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E179C375F95 for ; Fri, 11 Sep 2026 14:42:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=74.125.225.140 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789137776; cv=none; b=EMw0pE87TkizVF6b/fDyT5N9x1OsRxJrWZiZiHLZDqEWbYZ++3sdGmOHRID4K2HUgTxwjYrPFZ6DOmn+MPqEKrQIl+jkZIZAQYSBpyU8zqqNBkh/fX/CknxldxB+SlsDcLcoJHtooz5v6yY2jpjXCQ1G+7pmPPOG6Fctgtcj5Lc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789137776; c=relaxed/simple; bh=Pxyy7SkaZki3YINbcV9JeBRCrEvwZclMHy2R8pz6HCY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=il4riSpemJ9AV2EyZPmq5TrZN3EjM43p65NkXn22+uKxsr7UAgUjW3p0IqBViHHzI1wTIe7IME5khI8g2DQK7YK9dOnSQzOz3EGgDlAPEj2YlzYfvd3fIAsjauwpuwKQCz95xj101mlX44So7ZdIoj1QHY9oyuZe4UX1tvs7TUg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com; spf=pass smtp.mailfrom=suse.com; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b=ZL0VJDNM; arc=none smtp.client-ip=74.125.225.140 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b="ZL0VJDNM" Received: by mail-wm2-f12.google.com with SMTP id 5b1f17b1804b1-49cd38e0f79so6055845e9.3 for ; Fri, 11 Sep 2026 07:42:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1789137771; x=1789742571; darn=vger.kernel.org; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to:content-type; bh=hTOm27yE703mDClupAq0Z6AjkqEMN3v+AI9a1WnvGB0=; b=ZL0VJDNMASO1DSxTC+o2xJcHbmibbqqYvPu56dHYyLbXUbfWsxcAmqW5sX/GjIlTdu 4sSpWar5cV7eWlzFuO7/jYOpCMF9Li4vt2Dx+0oWaTCqL5rN5eQ7yIUDTa3Fb2upDT21 MRt9vvsB5l/PagSu0XAgVUMnzX9nEDszYc47tAqiIOXYORfvsbF/t74S1xOsRX4W9AWi tlYt57KeCqawvkXVDIMAu20DIH/DHhSlwlTsIQiL4Z9Xj795L8s8AFMCSBqrFBrleU/h HHctZDhoQDFOeGoZSxJg3BIZtZirNKo8DiSBkoDowWBFFOewMxBxoFH/cdPnQg6vJHxm QZZA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1789137771; x=1789742571; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:cc:to:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=hTOm27yE703mDClupAq0Z6AjkqEMN3v+AI9a1WnvGB0=; b=Guk7W+/5bFiTBrROTZP6lGkgv04C6k+UzXfXNpzo0soeKAi2Fi0kkxS1b+y8vvHjO5 RJkCiUdEQF+XciqCehUX+z4F1+OWufBwL1OUXb1Jgj00qpfA48IYFanhxKrOEvnWrqgd MU63m6TULeGdjJAEE/XvOQTOphpanhdE7f0ssaEu5GVZ9XAa5dn+s9KqehPCdHHCSMC4 ylOUfsY9ReLtioSGlIMWYIuLyUQRiDeKvLWZLGRiG5nkXsSQSiHVQdAXecrx7YRvcFfg dctbW5CBrIvJxsNDEYr4WdrrWEC5YP6DpceuS934WI/rsxBp/ciSq6fEpdEXeF/rgcZj I+pg== X-Forwarded-Encrypted: i=1; AKwUvBynnpC6JHbOd5VgnnJd71gXd5+7CXLAluIKz4xCIhc0haHSoTe+i6x5SV8dtk04TgkVg9Cqr7el0DVhmWY=@vger.kernel.org X-Gm-Message-State: AFuF++nXNzG8hsD5G7SCeDDqtfy76HfTbQv5wN7Nzt1ozqS8si7xF1qV Aa3nzMEEMvpkaCKyqi+JA8L5vbcI8qBhvKDy+lGELkxHXtvz/16SPlml6Q18p9HC6aA= X-Gm-Gg: AYBFou1MbJXcSolyAUauJtmU6ig8n2yhcWwQ3Zzvv1bCzmMLaKSqlO37A4mkq3rc4ol shJjZCqLI9RfUhlHEOT1McwQ1QJtwpr1sCNOJ2GxYLNzTvwgGwnPuqr9yh/TQu24bXkzz1wQUpq y77jOI73nTdoA4QXUtMByxRaZ5O4ei14YMcWSAj17B2WK9PYFRHo5oc+uJ+zZka06sdagyDj0eB GOUuNRUSq+pCnxVnd80Sv8RP2bHPkHGPRw3vPUYXZSMReaYd1aNmlp6hMjBxHw8QlYK70jx5WPG 0aDLdvy1siMZbV2UhTmV8BKCvroA97vvKJEixx2u+yhWjOV5dwrJa6129RjyBe3K6bsSIgUT2XN rpfMmsLnGpk6oA9dHWC/havMWpBw8PVL1AcQeg0SMI67kz1LbV8H6IB1Zgu4me8E88QVcIxITA3 lJC0S7N9Si24PFCgB5x5ERmelxVURfEOxJgg5F0NLuz9kRWcOOIO63QvKLi3aVChA5qbvcZ8cX9 LhpgVA= X-Received: by 2002:a05:600c:a0b:b0:49c:e1f1:3dd5 with SMTP id 5b1f17b1804b1-49e618863bcmr93280275e9.4.1789137771393; Fri, 11 Sep 2026 07:42:51 -0700 (PDT) Received: from localhost.localdomain ([2001:af0:8000:1409:193:86:92:181]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-49e60ababd5sm107038405e9.4.2026.09.11.07.42.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 11 Sep 2026 07:42:50 -0700 (PDT) From: Petr Pavlu To: Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, Heiko Carstens , Vasily Gorbik , Alexander Gordeev , Peter Huewe , Jarkko Sakkinen , Luis Chamberlain , Petr Pavlu , Daniel Gomez , Sami Tolvanen Cc: Xin Li , "H. Peter Anvin" , Andy Lutomirski , Christian Borntraeger , Sven Schnelle , Janosch Frank , Claudio Imbrenda , David Hildenbrand , Jason Gunthorpe , Aaron Tomlin , linux-s390@vger.kernel.org, kvm@vger.kernel.org, linux-integrity@vger.kernel.org, linux-modules@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 6/6] module: Limit ELF includes in linux/module.h to uapi/linux/elf.h Date: Fri, 11 Sep 2026 16:40:36 +0200 Message-ID: <20260911-module-include-elf-v2-6-954c732975fb@suse.com> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260911-module-include-elf-v2-0-954c732975fb@suse.com> References: <20260911-module-include-elf-v2-0-954c732975fb@suse.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable linux/module.h appears in roughly 15k #include directives across the kernel. This makes it a "hot" header, so it should avoid pulling in unnecessary definitions. The header currently includes linux/elf.h but this is largely unnecessary because it requires only the base ELF structures, such as Elf_Ehdr and Elf_Sym, which are declared in uapi/linux/elf.h. Replace the linux/elf.h include with uapi/linux/elf.h. On x86_64_defconfig, including linux/module.h alone results in 2.2 MB of preprocessed data. This change reduces that to 1.5 MB. Signed-off-by: Petr Pavlu Reviewed-by: Aaron Tomlin Acked-by tags from the relevant maintainers would be appreciated. --- include/linux/module.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/linux/module.h b/include/linux/module.h index 96cc98568eea..1ec9e121a24b 100644 --- a/include/linux/module.h +++ b/include/linux/module.h @@ -17,7 +17,6 @@ #include #include #include -#include #include #include #include @@ -29,8 +28,9 @@ #include #include #include - #include + +#include #include =20 #define MODULE_NAME_LEN __MODULE_NAME_LEN --=20 2.55.0