History

Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf

Cross-merge bpf fixes after downstream PR. No conflicts. Adjacent changes in: include/linux/bpf.h include/uapi/linux/bpf.h kernel/bpf/btf.c kernel/bpf/helpers.c kernel/bpf/syscall.c kernel/bpf/verifier.c kernel/trace/bpf_trace.c mm/slab_common.c tools/include/uapi/linux/bpf.h tools/testing/selftests/bpf/Makefile

Alexei Starovoitov committed 2 years ago

Commit bfa7b5c2 parents c6fb803 ae90f6a1167 files · +15425 −10300Browse files

Showing the changes to include/uapi (2 of 1167 files). Show all

Unified · Split

2 files
  1. include/uapi/linux/bpf.h +8 −8
  2. include/uapi/linux/ublk_cmd.h +7 −1
include/uapi/linux/bpf.h+8−8
@@ -1121,6 +1121,9 @@ enum bpf_attach_type { · 1120 unmodified lines
1121 1121
1122#define MAX_BPF_ATTACH_TYPE __MAX_BPF_ATTACH_TYPE1122#define MAX_BPF_ATTACH_TYPE __MAX_BPF_ATTACH_TYPE
1123 1123
1124/* Add BPF_LINK_TYPE(type, name) in bpf_types.h to keep bpf_link_type_strs[]
1125 * in sync with the definitions below.
1126 */
1124enum bpf_link_type {1127enum bpf_link_type {
1125 BPF_LINK_TYPE_UNSPEC = 0,1128 BPF_LINK_TYPE_UNSPEC = 0,
1126 BPF_LINK_TYPE_RAW_TRACEPOINT = 1,1129 BPF_LINK_TYPE_RAW_TRACEPOINT = 1,
@@ -6045,11 +6048,6 @@ enum { · 4918 unmodified lines
6045 BPF_F_MARK_ENFORCE = (1ULL << 6),6048 BPF_F_MARK_ENFORCE = (1ULL << 6),
6046};6049};
6047 6050
6048/* BPF_FUNC_clone_redirect and BPF_FUNC_redirect flags. */
6049enum {
6050 BPF_F_INGRESS = (1ULL << 0),
6051};
6052
6053/* BPF_FUNC_skb_set_tunnel_key and BPF_FUNC_skb_get_tunnel_key flags. */6051/* BPF_FUNC_skb_set_tunnel_key and BPF_FUNC_skb_get_tunnel_key flags. */
6054enum {6052enum {
6055 BPF_F_TUNINFO_IPV6 = (1ULL << 0),6053 BPF_F_TUNINFO_IPV6 = (1ULL << 0),
@@ -6196,10 +6194,12 @@ enum { · 140 unmodified lines
6196 BPF_F_BPRM_SECUREEXEC = (1ULL << 0),6194 BPF_F_BPRM_SECUREEXEC = (1ULL << 0),
6197};6195};
6198 6196
6199/* Flags for bpf_redirect_map helper */6197/* Flags for bpf_redirect and bpf_redirect_map helpers */
6200enum {6198enum {
6201 BPF_F_BROADCAST = (1ULL << 3),6199 BPF_F_INGRESS = (1ULL << 0), /* used for skb path */
6202 BPF_F_EXCLUDE_INGRESS = (1ULL << 4),6200 BPF_F_BROADCAST = (1ULL << 3), /* used for XDP path */
6201 BPF_F_EXCLUDE_INGRESS = (1ULL << 4), /* used for XDP path */
6202#define BPF_F_REDIRECT_FLAGS (BPF_F_INGRESS | BPF_F_BROADCAST | BPF_F_EXCLUDE_INGRESS)
6203};6203};
6204 6204
6205#define __bpf_md_ptr(type, name) \6205#define __bpf_md_ptr(type, name) \
include/uapi/linux/ublk_cmd.h+7−1
@@ -175,7 +175,13 @@ · 174 unmodified lines
175/* use ioctl encoding for uring command */175/* use ioctl encoding for uring command */
176#define UBLK_F_CMD_IOCTL_ENCODE (1UL << 6)176#define UBLK_F_CMD_IOCTL_ENCODE (1UL << 6)
177 177
178/* Copy between request and user buffer by pread()/pwrite() */178/*
179 * Copy between request and user buffer by pread()/pwrite()
180 *
181 * Not available for UBLK_F_UNPRIVILEGED_DEV, otherwise userspace may
182 * deceive us by not filling request buffer, then kernel uninitialized
183 * data may be leaked.
184 */
179#define UBLK_F_USER_COPY (1UL << 7)185#define UBLK_F_USER_COPY (1UL << 7)
180 186
181/*187/*