Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
torvalds
GitHub Repository: torvalds/linux
Path: blob/master/kernel/bpf/bpf_lsm_proto.c
121794 views
1
// SPDX-License-Identifier: GPL-2.0
2
/*
3
* Copyright 2025 Google LLC.
4
*/
5
6
#include <linux/fs.h>
7
#include <linux/bpf_lsm.h>
8
9
/*
10
* Strong definition of the mmap_file() BPF LSM hook. The __nullable suffix on
11
* the struct file pointer parameter name marks it as PTR_MAYBE_NULL. This
12
* explicitly enforces that BPF LSM programs check for NULL before attempting to
13
* dereference it.
14
*/
15
int bpf_lsm_mmap_file(struct file *file__nullable, unsigned long reqprot,
16
unsigned long prot, unsigned long flags)
17
{
18
return 0;
19
}
20
21