security: mark LSM hooks as __ro_after_init
Mark all of the registration hooks as __ro_after_init (via the __lsm_ro_after_init macro). Signed-off-by: James Morris <james.l.morris@oracle.com> Acked-by: Stephen Smalley <sds@tycho.nsa.gov> Acked-by: Kees Cook <keescook@chromium.org>
This commit is contained in:

committed by
James Morris

parent
dd0859dccb
commit
ca97d939db
@@ -1071,7 +1071,7 @@ int cap_mmap_file(struct file *file, unsigned long reqprot,
|
||||
|
||||
#ifdef CONFIG_SECURITY
|
||||
|
||||
struct security_hook_list capability_hooks[] = {
|
||||
struct security_hook_list capability_hooks[] __lsm_ro_after_init = {
|
||||
LSM_HOOK_INIT(capable, cap_capable),
|
||||
LSM_HOOK_INIT(settime, cap_settime),
|
||||
LSM_HOOK_INIT(ptrace_access_check, cap_ptrace_access_check),
|
||||
|
Reference in New Issue
Block a user