From: Petr Pavlu <petr.pavlu@suse.com>
To: Thomas Gleixner <tglx@kernel.org>, Ingo Molnar <mingo@redhat.com>,
Borislav Petkov <bp@alien8.de>,
Dave Hansen <dave.hansen@linux.intel.com>,
x86@kernel.org, Heiko Carstens <hca@linux.ibm.com>,
Vasily Gorbik <gor@linux.ibm.com>,
Alexander Gordeev <agordeev@linux.ibm.com>,
Peter Huewe <peterhuewe@gmx.de>,
Jarkko Sakkinen <jarkko@kernel.org>,
Luis Chamberlain <mcgrof@kernel.org>,
Petr Pavlu <petr.pavlu@suse.com>,
Daniel Gomez <da.gomez@kernel.org>,
Sami Tolvanen <samitolvanen@google.com>
Cc: Xin Li <xin@zytor.com>, "H. Peter Anvin" <hpa@zytor.com>,
Andy Lutomirski <luto@kernel.org>,
Christian Borntraeger <borntraeger@linux.ibm.com>,
Sven Schnelle <svens@linux.ibm.com>,
Janosch Frank <frankja@linux.ibm.com>,
Claudio Imbrenda <imbrenda@linux.ibm.com>,
David Hildenbrand <david@kernel.org>,
Jason Gunthorpe <jgg@ziepe.ca>,
Aaron Tomlin <atomlin@atomlin.com>,
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 2/4] s390: Avoid indirect includes through linux/module.h -> linux/elf.h
Date: Tue, 7 Jul 2026 17:37:05 +0200 [thread overview]
Message-ID: <20260707153819.4172541-3-petr.pavlu@suse.com> (raw)
In-Reply-To: <20260707153819.4172541-1-petr.pavlu@suse.com>
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 <petr.pavlu@suse.com>
---
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-branch.c
index e11ec15960a1..b62da9e81e79 100644
--- a/arch/s390/kernel/nospec-branch.c
+++ b/arch/s390/kernel/nospec-branch.c
@@ -2,6 +2,7 @@
#include <linux/module.h>
#include <linux/device.h>
#include <linux/cpu.h>
+#include <linux/uaccess.h>
#include <asm/nospec-branch.h>
int nobp = IS_ENABLED(CONFIG_KERNEL_NOBP);
diff --git a/drivers/s390/char/uvdevice.c b/drivers/s390/char/uvdevice.c
index e6a264c996ce..4fe3ead4a091 100644
--- a/drivers/s390/char/uvdevice.c
+++ b/drivers/s390/char/uvdevice.c
@@ -28,6 +28,8 @@
#include <linux/vmalloc.h>
#include <linux/slab.h>
#include <linux/cpufeature.h>
+#include <linux/fs.h>
+#include <linux/uaccess.h>
#include <asm/uvdevice.h>
#include <asm/uv.h>
--
2.54.0
next prev parent reply other threads:[~2026-07-07 15:38 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-07 15:37 [PATCH 0/4] module: Limit ELF includes in linux/module.h to uapi/linux/elf.h Petr Pavlu
2026-07-07 15:37 ` [PATCH 1/4] x86: Avoid indirect includes through linux/module.h -> linux/elf.h Petr Pavlu
2026-07-07 15:37 ` Petr Pavlu [this message]
2026-07-07 15:37 ` [PATCH 3/4] tpm_crb_ffa: Include linux/slab.h for kzalloc_obj() and kfree() Petr Pavlu
2026-07-07 15:43 ` sashiko-bot
2026-07-08 10:10 ` Petr Pavlu
2026-07-07 15:37 ` [PATCH 4/4] module: Limit ELF includes in linux/module.h to uapi/linux/elf.h Petr Pavlu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260707153819.4172541-3-petr.pavlu@suse.com \
--to=petr.pavlu@suse.com \
--cc=agordeev@linux.ibm.com \
--cc=atomlin@atomlin.com \
--cc=borntraeger@linux.ibm.com \
--cc=bp@alien8.de \
--cc=da.gomez@kernel.org \
--cc=dave.hansen@linux.intel.com \
--cc=david@kernel.org \
--cc=frankja@linux.ibm.com \
--cc=gor@linux.ibm.com \
--cc=hca@linux.ibm.com \
--cc=hpa@zytor.com \
--cc=imbrenda@linux.ibm.com \
--cc=jarkko@kernel.org \
--cc=jgg@ziepe.ca \
--cc=kvm@vger.kernel.org \
--cc=linux-integrity@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-modules@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=luto@kernel.org \
--cc=mcgrof@kernel.org \
--cc=mingo@redhat.com \
--cc=peterhuewe@gmx.de \
--cc=samitolvanen@google.com \
--cc=svens@linux.ibm.com \
--cc=tglx@kernel.org \
--cc=x86@kernel.org \
--cc=xin@zytor.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox