]> git.baikalelectronics.ru Git - kernel.git/commit
debugfs: lockdown: Allow reading debugfs files that are not world readable
authorMichal Suchanek <msuchanek@suse.de>
Tue, 4 Jan 2022 17:05:05 +0000 (18:05 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 6 Jan 2022 14:47:41 +0000 (15:47 +0100)
commitf03dec0dd77c9cbe9b28188a2b63f389a5a05236
tree6278d4043acd4ac0b286c5f77e8526178ea4ecc5
parentf8e117fbb915f832fdd353734bdc61695ea54b0f
debugfs: lockdown: Allow reading debugfs files that are not world readable

When the kernel is locked down the kernel allows reading only debugfs
files with mode 444. Mode 400 is also valid but is not allowed.

Make the 444 into a mask.

Fixes: ec1ebeb0fc60 ("debugfs: Restrict debugfs when the kernel is locked down")
Signed-off-by: Michal Suchanek <msuchanek@suse.de>
Link: https://lore.kernel.org/r/20220104170505.10248-1-msuchanek@suse.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/debugfs/file.c