diff options
Diffstat (limited to 'include/linux/bpf.h')
| -rw-r--r-- | include/linux/bpf.h | 9 | 
1 files changed, 7 insertions, 2 deletions
diff --git a/include/linux/bpf.h b/include/linux/bpf.h index 6e947cd91152..fa517ae604ad 100644 --- a/include/linux/bpf.h +++ b/include/linux/bpf.h @@ -316,7 +316,12 @@ enum bpf_type_flag {  	 */  	MEM_RDONLY		= BIT(1 + BPF_BASE_TYPE_BITS), -	__BPF_TYPE_LAST_FLAG	= MEM_RDONLY, +	/* MEM was "allocated" from a different helper, and cannot be mixed +	 * with regular non-MEM_ALLOC'ed MEM types. +	 */ +	MEM_ALLOC		= BIT(2 + BPF_BASE_TYPE_BITS), + +	__BPF_TYPE_LAST_FLAG	= MEM_ALLOC,  };  /* Max number of base types. */ @@ -400,7 +405,7 @@ enum bpf_return_type {  	RET_PTR_TO_SOCKET_OR_NULL	= PTR_MAYBE_NULL | RET_PTR_TO_SOCKET,  	RET_PTR_TO_TCP_SOCK_OR_NULL	= PTR_MAYBE_NULL | RET_PTR_TO_TCP_SOCK,  	RET_PTR_TO_SOCK_COMMON_OR_NULL	= PTR_MAYBE_NULL | RET_PTR_TO_SOCK_COMMON, -	RET_PTR_TO_ALLOC_MEM_OR_NULL	= PTR_MAYBE_NULL | RET_PTR_TO_ALLOC_MEM, +	RET_PTR_TO_ALLOC_MEM_OR_NULL	= PTR_MAYBE_NULL | MEM_ALLOC | RET_PTR_TO_ALLOC_MEM,  	RET_PTR_TO_BTF_ID_OR_NULL	= PTR_MAYBE_NULL | RET_PTR_TO_BTF_ID,  	/* This must be the last entry. Its purpose is to ensure the enum is  |