Skip to content

Commit a2095a3

Browse files
author
Mete Durlu
committed
s390/hypfs: Enable limited access during lockdown
JIRA: https://issues.redhat.com/browse/RHEL-111203 commit 3868f91 Author: Peter Oberparleiter <oberpar@linux.ibm.com> Date: Thu Aug 21 15:12:37 2025 +0200 s390/hypfs: Enable limited access during lockdown 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: 5496197 ("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: Mete Durlu <mdurlu@redhat.com>
1 parent f96e2c7 commit a2095a3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

arch/s390/hypfs/hypfs_dbfs.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
* Author(s): Michael Holzheu <holzheu@linux.vnet.ibm.com>
77
*/
88

9+
#include <linux/security.h>
910
#include <linux/slab.h>
1011
#include "hypfs.h"
1112

@@ -84,7 +85,7 @@ void hypfs_dbfs_create_file(struct hypfs_dbfs_file *df)
8485
{
8586
const struct file_operations *fops = &dbfs_ops;
8687

87-
if (df->unlocked_ioctl)
88+
if (df->unlocked_ioctl && !security_locked_down(LOCKDOWN_DEBUGFS))
8889
fops = &dbfs_ops_ioctl;
8990
df->dentry = debugfs_create_file(df->name, 0400, dbfs_dir, df, fops);
9091
mutex_init(&df->lock);

0 commit comments

Comments
 (0)