[GIT PULL] s390 updates for 7.1-rc2

Alexander Gordeev
2026-05-01T16:22:22Z

Hi Linus,

please pull s390 updates for 7.1-rc2.

Thanks,
Alexander Gordeev

The following changes since commit 254f49634ee16a731174d2ae34bc50bd5f45e731:

Linux 7.1-rc1 (2026-04-26 14:19:00 -0700)

are available in the Git repository at:

git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux.git tags/s390-7.1-2

for you to fetch changes up to b95e0e792822bad8fc9eb33ea3a90005e29e75e9:

s390/mm: Fix phys_to_folio() usage in do_secure_storage_access() (2026-04-28 14:45:03 +0200)

----------------------------------------------------------------
s390 updates for 7.1-rc2

- Reject zero-length writes from userspace that corrupt
Debug Facility buffers

- Replace one s390 PCI maintainer

- Remove SCLP_OFB Kconfig option and enable the guarded code
unconditionally

- Replace incorrect use of phys_to_folio() to virt_to_folio()
in do_secure_storage_access()

----------------------------------------------------------------
Gerd Bayer (1):
MAINTAINERS: Replace one of the maintainers for s390/pci

Heiko Carstens (2):
s390/sclp: Remove SCLP_OFB Kconfig option
s390/mm: Fix phys_to_folio() usage in do_secure_storage_access()

Pengpeng Hou (1):
s390/debug: Reject zero-length input before trimming a newline

Vasily Gorbik (1):
s390/debug: Reject zero-length input in debug_input_flush_fn()

MAINTAINERS | 2 +-
arch/s390/kernel/debug.c | 8 ++++++++
arch/s390/mm/fault.c | 2 +-
drivers/s390/char/Kconfig | 8 --------
drivers/s390/char/sclp_config.c | 6 ------
5 files changed, 10 insertions(+), 16 deletions(-)

diff --git a/MAINTAINERS b/MAINTAINERS
index 2fb1c75afd16..b778c584bea5 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -23521,7 +23521,7 @@ F: drivers/s390/net/

S390 PCI SUBSYSTEM
M: Niklas Schnelle <schnelle@linux.ibm.com>
-M: Gerald Schaefer <gerald.schaefer@linux.ibm.com>
+M: Gerd Bayer <gbayer@linux.ibm.com>
L: linux-s390@vger.kernel.org
S: Supported
F: Documentation/arch/s390/pci.rst
diff --git a/arch/s390/kernel/debug.c b/arch/s390/kernel/debug.c
index 31430e9bcfdd..7650f2adb5cf 100644
--- a/arch/s390/kernel/debug.c
+++ b/arch/s390/kernel/debug.c
@@ -1414,6 +1414,9 @@ static inline char *debug_get_user_string(const char __user *user_buf,
{
char *buffer;

+ if (!user_len)
+ return ERR_PTR(-EINVAL);
+
buffer = memdup_user_nul(user_buf, user_len);
if (IS_ERR(buffer))
return buffer;
@@ -1584,6 +1587,11 @@ static int debug_input_flush_fn(debug_info_t *id, struct debug_view *view,
char input_buf[1];
int rc = user_len;

+ if (!user_len) {
+ rc = -EINVAL;
+ goto out;
+ }
+
if (user_len > 0x10000)
user_len = 0x10000;
if (*offset != 0) {
diff --git a/arch/s390/mm/fault.c b/arch/s390/mm/fault.c
index 191cc53caead..028aeb9c48d6 100644
--- a/arch/s390/mm/fault.c
+++ b/arch/s390/mm/fault.c
@@ -438,7 +438,7 @@ void do_secure_storage_access(struct pt_regs *regs)
panic("Unexpected PGM 0x3d with TEID bit 61=0");
}
if (is_kernel_fault(regs)) {
- folio = phys_to_folio(addr);
+ folio = virt_to_folio((void *)addr);
if (unlikely(!folio_try_get(folio)))
return;
rc = uv_convert_from_secure(folio_to_phys(folio));
diff --git a/drivers/s390/char/Kconfig b/drivers/s390/char/Kconfig
index 4d8f09910a46..7416f941e5b6 100644
--- a/drivers/s390/char/Kconfig
+++ b/drivers/s390/char/Kconfig
@@ -85,14 +85,6 @@ config HMC_DRV
transfer cache size from its default value 0.5MB to N bytes. If N
is zero, then no caching is performed.

-config SCLP_OFB
- def_bool n
- prompt "Support for Open-for-Business SCLP Event"
- depends on S390
- help
- This option enables the Open-for-Business interface to the s390
- Service Element.
-
config S390_UV_UAPI
def_tristate m
prompt "Ultravisor userspace API"
diff --git a/drivers/s390/char/sclp_config.c b/drivers/s390/char/sclp_config.c
index 9cfbe3fc3dca..8c77e8c44fc2 100644
--- a/drivers/s390/char/sclp_config.c
+++ b/drivers/s390/char/sclp_config.c
@@ -80,14 +80,11 @@ static void sclp_conf_receiver_fn(struct evbuf_header *evbuf)

static struct sclp_register sclp_conf_register =
{
-#ifdef CONFIG_SCLP_OFB
.send_mask = EVTYP_CONFMGMDATA_MASK,
-#endif
.receive_mask = EVTYP_CONFMGMDATA_MASK,
.receiver_fn = sclp_conf_receiver_fn,
};

-#ifdef CONFIG_SCLP_OFB
static int sclp_ofb_send_req(char *ev_data, size_t len)
{
static DEFINE_MUTEX(send_mutex);
@@ -143,11 +140,9 @@ static const struct bin_attribute ofb_bin_attr = {
},
.write = sysfs_ofb_data_write,
};
-#endif

static int __init sclp_ofb_setup(void)
{
-#ifdef CONFIG_SCLP_OFB
struct kset *ofb_kset;
int rc;

@@ -159,7 +154,6 @@ static int __init sclp_ofb_setup(void)
kset_unregister(ofb_kset);
return rc;
}
-#endif
return 0;
}