Skip to content

Commit ead3b62

Browse files
committed
Merge tag 'lsm-pr-20231109' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/lsm
Pull lsm updates from Paul Moore: "We've got two small patches to correct the default return value of two LSM hooks: security_vm_enough_memory_mm() and security_inode_getsecctx()" * tag 'lsm-pr-20231109' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/lsm: lsm: fix default return value for inode_getsecctx lsm: fix default return value for vm_enough_memory
2 parents 826c484 + b36995b commit ead3b62

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

include/linux/lsm_hook_defs.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ LSM_HOOK(int, 0, quota_on, struct dentry *dentry)
4848
LSM_HOOK(int, 0, syslog, int type)
4949
LSM_HOOK(int, 0, settime, const struct timespec64 *ts,
5050
const struct timezone *tz)
51-
LSM_HOOK(int, 0, vm_enough_memory, struct mm_struct *mm, long pages)
51+
LSM_HOOK(int, 1, vm_enough_memory, struct mm_struct *mm, long pages)
5252
LSM_HOOK(int, 0, bprm_creds_for_exec, struct linux_binprm *bprm)
5353
LSM_HOOK(int, 0, bprm_creds_from_file, struct linux_binprm *bprm, const struct file *file)
5454
LSM_HOOK(int, 0, bprm_check_security, struct linux_binprm *bprm)
@@ -273,7 +273,7 @@ LSM_HOOK(void, LSM_RET_VOID, release_secctx, char *secdata, u32 seclen)
273273
LSM_HOOK(void, LSM_RET_VOID, inode_invalidate_secctx, struct inode *inode)
274274
LSM_HOOK(int, 0, inode_notifysecctx, struct inode *inode, void *ctx, u32 ctxlen)
275275
LSM_HOOK(int, 0, inode_setsecctx, struct dentry *dentry, void *ctx, u32 ctxlen)
276-
LSM_HOOK(int, 0, inode_getsecctx, struct inode *inode, void **ctx,
276+
LSM_HOOK(int, -EOPNOTSUPP, inode_getsecctx, struct inode *inode, void **ctx,
277277
u32 *ctxlen)
278278

279279
#if defined(CONFIG_SECURITY) && defined(CONFIG_WATCH_QUEUE)

0 commit comments

Comments
 (0)