diff --git a/kernel/bpf/bpf_lsm_proto.c b/kernel/bpf/bpf_lsm_proto.c index 4a776df76cbb..b81179ae2e08 100644 --- a/kernel/bpf/bpf_lsm_proto.c +++ b/kernel/bpf/bpf_lsm_proto.c @@ -13,8 +13,8 @@ * explicitly enforces that BPF LSM programs check for NULL before attempting to * dereference it. */ -int bpf_lsm_mmap_file(struct file *file__nullable, unsigned long reqprot, - unsigned long prot, unsigned long flags) +noinline int bpf_lsm_mmap_file(struct file *file__nullable, unsigned long reqprot, + unsigned long prot, unsigned long flags) { return 0; } @@ -25,10 +25,10 @@ int bpf_lsm_mmap_file(struct file *file__nullable, unsigned long reqprot, * suffix marks it as PTR_MAYBE_NULL. BPF LSM programs have to check before * dereferencing them or handing them to bpf_inode_init_xattr(). */ -int bpf_lsm_inode_init_security(struct inode *inode, struct inode *dir, - const struct qstr *qstr__nullable, - struct xattr *xattrs__nullable, - int *xattr_count) +noinline int bpf_lsm_inode_init_security(struct inode *inode, struct inode *dir, + const struct qstr *qstr__nullable, + struct xattr *xattrs__nullable, + int *xattr_count) { return -EOPNOTSUPP; }