]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
s390/hypfs: Avoid unnecessary ioctl registration in debugfs
authorPeter Oberparleiter <oberpar@linux.ibm.com>
Thu, 21 Aug 2025 12:35:40 +0000 (14:35 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 28 Aug 2025 14:26:18 +0000 (16:26 +0200)
commitb6341b6a2b73911c97a92cc4aee148a8ab0083cb
treeb88f3b676ab1d0185536013b4a2ecd1724728c08
parent030c670a53d8a95e3724065b916e4f5b78c89842
s390/hypfs: Avoid unnecessary ioctl registration in debugfs

[ Upstream commit fec7bdfe7f8694a0c39e6c3ec026ff61ca1058b9 ]

Currently, hypfs registers ioctl callbacks for all debugfs files,
despite only one file requiring them. This leads to unintended exposure
of unused interfaces to user space and can trigger side effects such as
restricted access when kernel lockdown is enabled.

Restrict ioctl registration to only those files that implement ioctl
functionality to avoid interface clutter and unnecessary access
restrictions.

Tested-by: Mete Durlu <meted@linux.ibm.com>
Reviewed-by: Vasily Gorbik <gor@linux.ibm.com>
Fixes: 5496197f9b08 ("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>
arch/s390/hypfs/hypfs_dbfs.c