mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
synced 2026-04-21 04:53:46 -04:00
io_uring,lsm,selinux: add LSM hooks for io_uring_setup()
It is desirable to allow LSM to configure accessibility to io_uring because it is a coarse yet very simple way to restrict access to it. So, add an LSM for io_uring_allowed() to guard access to io_uring. Cc: Paul Moore <paul@paul-moore.com> Signed-off-by: Hamza Mahfooz <hamzamahfooz@linux.microsoft.com> Acked-by: Jens Axboe <axboe@kernel.dk> [PM: merge fuzz due to changes in preceding patches, subj tweak] Signed-off-by: Paul Moore <paul@paul-moore.com>
This commit is contained in:
committed by
Paul Moore
parent
b8a468e0b0
commit
c6ad9fdbd4
@@ -2362,6 +2362,7 @@ static inline int security_perf_event_write(struct perf_event *event)
|
||||
extern int security_uring_override_creds(const struct cred *new);
|
||||
extern int security_uring_sqpoll(void);
|
||||
extern int security_uring_cmd(struct io_uring_cmd *ioucmd);
|
||||
extern int security_uring_allowed(void);
|
||||
#else
|
||||
static inline int security_uring_override_creds(const struct cred *new)
|
||||
{
|
||||
@@ -2375,6 +2376,10 @@ static inline int security_uring_cmd(struct io_uring_cmd *ioucmd)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
extern int security_uring_allowed(void)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
#endif /* CONFIG_SECURITY */
|
||||
#endif /* CONFIG_IO_URING */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user