]> git.baikalelectronics.ru Git - kernel.git/commit
lockdown: ratelimit denial messages
authorNathan Lynch <nathanl@linux.ibm.com>
Thu, 8 Sep 2022 22:02:22 +0000 (17:02 -0500)
committerPaul Moore <paul@paul-moore.com>
Wed, 14 Sep 2022 11:37:50 +0000 (07:37 -0400)
commitf7f7e285799f8c2d479440881b1372ef73edc9f4
treeb8dfa6b6f58903a95d47781a42815da1930078a1
parentee3c516a5d2615529acd860a1a7ee73f46fb8205
lockdown: ratelimit denial messages

User space can flood the log with lockdown denial messages:

[  662.555584] Lockdown: bash: debugfs access is restricted; see man kernel_lockdown.7
[  662.563237] Lockdown: bash: debugfs access is restricted; see man kernel_lockdown.7
[  662.571134] Lockdown: bash: debugfs access is restricted; see man kernel_lockdown.7
[  662.578668] Lockdown: bash: debugfs access is restricted; see man kernel_lockdown.7
[  662.586021] Lockdown: bash: debugfs access is restricted; see man kernel_lockdown.7
[  662.593398] Lockdown: bash: debugfs access is restricted; see man kernel_lockdown.7

Ratelimiting these shouldn't meaningfully degrade the quality of the
information logged.

Signed-off-by: Nathan Lynch <nathanl@linux.ibm.com>
Signed-off-by: Paul Moore <paul@paul-moore.com>
security/lockdown/lockdown.c