I think the comment block at the top of that function describes it well:Well, you could always submit a patch* and we would review it like anySure, i will submit a new one.
other; that's usually a much better approach.
* Yes, there was a patch submitted, but it was against a distro kernel
that diverged significantly from the upstream kernel in the relevant
areas.
Before that, may i ask this question? It may affect the approach of the
patch.
Lockdown blocked files with mmap operation even that files are
read-only, may i know what's the security concern there?
static int debugfs_locked_down(struct inode *inode,
struct file *filp,
const struct file_operations *real_fops)
{
if ((inode->i_mode & 07777 & ~0444) == 0 &&
!(filp->f_mode & FMODE_WRITE) &&
!real_fops->unlocked_ioctl &&
!real_fops->compat_ioctl &&
!real_fops->mmap)
return 0;
if (security_locked_down(LOCKDOWN_DEBUGFS))
return -EPERM;
return 0;
}
/*
* Only permit access to world-readable files when the kernel is locked down.
* We also need to exclude any file that has ways to write or alter it as root
* can bypass the permissions check.
*/
--
paul-moore.com