[ Sasha's backport helper bot ]
Hi,
✅ All tests passed successfully. No issues detected. No action required from the submitter.
The upstream commit SHA1 provided is correct: d639b9d13a39cf15639cbe6e8b2c43eb60148a73
WARNING: Author mismatch between patch and upstream commit: Backport author: Puranjay Mohanpuranjay@kernel.org Commit author: Hao Luohaoluo@google.com
Status in newer kernel trees: 6.15.y | Present (exact SHA1) 6.14.y | Present (exact SHA1) 6.12.y | Present (exact SHA1) 6.6.y | Present (exact SHA1) 6.1.y | Present (exact SHA1) 5.15.y | Present (different SHA1: a76020980b9f)
Note: The patch differs from the upstream commit: --- 1: d639b9d13a39c ! 1: b9a913ca98c49 bpf: Introduce composable reg, ret and arg types. @@ Metadata ## Commit message ## bpf: Introduce composable reg, ret and arg types.
+ commit d639b9d13a39cf15639cbe6e8b2c43eb60148a73 upstream. + There are some common properties shared between bpf reg, ret and arg values. For instance, a value may be a NULL pointer, or a pointer to a read-only memory. Previously, to express these properties, enumeration @@ Commit message
Signed-off-by: Hao Luo haoluo@google.com Signed-off-by: Alexei Starovoitov ast@kernel.org + Signed-off-by: Puranjay Mohan puranjay@kernel.org Link: https://lore.kernel.org/bpf/20211217003152.48334-2-haoluo@google.com + Cc: stable@vger.kernel.org # 5.10.x
## include/linux/bpf.h ## @@ include/linux/bpf.h: bool bpf_map_meta_equal(const struct bpf_map *meta0, @@ include/linux/bpf.h: bool bpf_map_meta_equal(const struct bpf_map *meta0, enum bpf_arg_type { ARG_DONTCARE = 0, /* unused argument in helper function */ @@ include/linux/bpf.h: enum bpf_arg_type { - ARG_PTR_TO_CONST_STR, /* pointer to a null terminated read-only string */ - ARG_PTR_TO_TIMER, /* pointer to bpf_timer */ + ARG_PTR_TO_BTF_ID_SOCK_COMMON, /* pointer to in-kernel sock_common or bpf-mirrored bpf_sock */ + ARG_PTR_TO_PERCPU_BTF_ID, /* pointer to in-kernel percpu type */ __BPF_ARG_TYPE_MAX, + + /* This must be the last entry. Its purpose is to ensure the enum is @@ include/linux/bpf.h: enum bpf_arg_type { /* type of values returned from helper functions */ enum bpf_return_type { @@ include/linux/bpf.h: enum bpf_return_type { + RET_PTR_TO_BTF_ID_OR_NULL, /* returns a pointer to a btf_id or NULL */ RET_PTR_TO_MEM_OR_BTF_ID_OR_NULL, /* returns a pointer to a valid memory or a btf_id or NULL */ RET_PTR_TO_MEM_OR_BTF_ID, /* returns a pointer to a valid memory or a btf_id */ - RET_PTR_TO_BTF_ID, /* returns a pointer to a btf_id */ + __BPF_RET_TYPE_MAX, + + /* This must be the last entry. Its purpose is to ensure the enum is @@ include/linux/bpf.h: enum bpf_return_type { /* eBPF function prototype used by verifier to allow BPF_CALLs from eBPF programs * to in-kernel helper functions and for adjusting imm32 field in BPF_CALL @@ include/linux/bpf.h: enum bpf_reg_type { - PTR_TO_FUNC, /* reg points to a bpf program function */ - PTR_TO_MAP_KEY, /* reg points to a map element key */ - __BPF_REG_TYPE_MAX, + PTR_TO_RDWR_BUF, /* reg points to a read/write buffer */ + PTR_TO_RDWR_BUF_OR_NULL, /* reg points to a read/write buffer or NULL */ + PTR_TO_PERCPU_BTF_ID, /* reg points to a percpu kernel variable */ ++ __BPF_REG_TYPE_MAX, + + /* This must be the last entry. Its purpose is to ensure the enum is + * wide enough to hold the higher bits reserved for bpf_type_flag. @@ include/linux/bpf.h: enum bpf_reg_type {
## include/linux/bpf_verifier.h ## @@ include/linux/bpf_verifier.h: int bpf_check_attach_target(struct bpf_verifier_log *log, + u32 btf_id, struct bpf_attach_target_info *tgt_info); - void bpf_free_kfunc_btf_tab(struct bpf_kfunc_btf_tab *tab);
+#define BPF_BASE_TYPE_MASK GENMASK(BPF_BASE_TYPE_BITS - 1, 0) + @@ include/linux/bpf_verifier.h: int bpf_check_attach_target(struct bpf_verifier_lo +{ + return type & ~BPF_BASE_TYPE_MASK; +} - ++ #endif /* _LINUX_BPF_VERIFIER_H */ ---
Results of testing on various branches:
| Branch | Patch Apply | Build Test | |---------------------------|-------------|------------| | stable/linux-5.10.y | Success | Success |