linux/arch/s390/hypfs
Peter Oberparleiter e133ea6dd6 s390/hypfs: Enable limited access during lockdown
[ Upstream commit 3868f91044 ]

When kernel lockdown is active, debugfs_locked_down() blocks access to
hypfs files that register ioctl callbacks, even if the ioctl interface
is not required for a function. This unnecessarily breaks userspace
tools that only rely on read operations.

Resolve this by registering a minimal set of file operations during
lockdown, avoiding ioctl registration and preserving access for affected
tooling.

Note that this change restores hypfs functionality when lockdown is
active from early boot (e.g. via lockdown=integrity kernel parameter),
but does not apply to scenarios where lockdown is enabled dynamically
while Linux is running.

Tested-by: Mete Durlu <meted@linux.ibm.com>
Reviewed-by: Vasily Gorbik <gor@linux.ibm.com>
Fixes: 5496197f9b ("debugfs: Restrict debugfs when the kernel is locked down")
Signed-off-by: Peter Oberparleiter <oberpar@linux.ibm.com>
Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
History 2025-08-28 16:31:16 +02:00
..
hypfs.h s390/hypfs: Remove obsoleted declaration for hypfs_dbfs_exit 2024-08-29 22:56:34 +02:00
hypfs_dbfs.c s390/hypfs: Enable limited access during lockdown 2025-08-28 16:31:16 +02:00
hypfs_diag.c s390/hypfs_diag: Remove unused dentry variable 2024-08-29 22:56:33 +02:00
hypfs_diag.h s390/hypfs: factor out filesystem code 2023-07-24 12:12:22 +02:00
hypfs_diag0c.c s390/hypfs_diag0c: fix virtual vs physical address confusion 2024-02-09 13:58:13 +01:00
hypfs_diag_fs.c hypfs_create_cpu_files(): add missing check for hypfs_mkdir() failure 2025-05-29 11:02:15 +02:00
hypfs_sprp.c s390/hypfs_sprp: remove unneeded DMA zone allocation 2024-02-09 13:58:14 +01:00
hypfs_vm.c s390/hypfs: factor out filesystem code 2023-07-24 12:12:22 +02:00
hypfs_vm.h s390/hypfs: factor out filesystem code 2023-07-24 12:12:22 +02:00
hypfs_vm_fs.c s390/hypfs: factor out filesystem code 2023-07-24 12:12:22 +02:00
inode.c [tree-wide] finally take no_llseek out 2024-09-27 08:18:43 -07:00
Makefile s390/hypfs: factor out filesystem code 2023-07-24 12:12:22 +02:00