1 # --- T2-COPYRIGHT-NOTE-BEGIN ---
2 # This copyright note is auto-generated by scripts/Create-CopyPatch.
4 # T2 SDE: package/*/linux-header/hotfix-bpf.patch.m68k
5 # Copyright (C) 2021 The T2 SDE Project
7 # More information can be found in the files COPYING and README.
9 # This patch file is dual-licensed. It is available under the license the
10 # patched project is licensed under, as long as it is an OpenSource license
11 # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
12 # of the GNU General Public License as published by the Free Software
13 # Foundation; either version 2 of the License, or (at your option) any later
15 # --- T2-COPYRIGHT-NOTE-END ---
18 bpf_attr_check.c:992:2: error: static assertion failed: "bpf_prog_info_struct.nr_jited_ksyms offset mismatch"
19 992 | static_assert(offsetof(struct bpf_prog_info_struct, nr_jited_ksyms) == offsetof(struct bpf_prog_info, nr_jited_ksyms),
21 --- linux-5.1/include/uapi/linux/bpf.h.vanilla 2021-04-15 22:52:34.295291364 +0200
22 +++ linux-5.1/include/uapi/linux/bpf.h 2021-04-15 22:58:16.850315998 +0200
25 __aligned_u64 next_key;
28 + __aligned_u64 flags;
31 struct { /* anonymous struct used by BPF_PROG_LOAD command */
43 __u32 prog_id; /* output: prod_id */
44 __u32 fd_type; /* output: BPF_FD_TYPE_* */
45 - __u64 probe_offset; /* output: probe_offset */
46 - __u64 probe_addr; /* output: probe_addr */
47 + __aligned_u64 probe_offset; /* output: probe_offset */
48 + __aligned_u64 probe_addr; /* output: probe_addr */
50 } __attribute__((aligned(8)));
53 #define __bpf_md_ptr(type, name) \
57 + __aligned_u64 :64; \
58 } __attribute__((aligned(8)))
60 /* user accessible mirror of in-kernel sk_buff.
61 @@ -2862,15 +2862,15 @@
62 __u32 xlated_prog_len;
63 __aligned_u64 jited_prog_insns;
64 __aligned_u64 xlated_prog_insns;
65 - __u64 load_time; /* ns since boottime */
66 + __aligned_u64 load_time; /* ns since boottime */
69 __aligned_u64 map_ids;
70 char name[BPF_OBJ_NAME_LEN];
72 __u32 gpl_compatible:1;
75 + __aligned_u64 netns_dev;
76 + __aligned_u64 netns_ino;
78 __u32 nr_jited_func_lens;
79 __aligned_u64 jited_ksyms;
81 __u32 jited_line_info_rec_size;
83 __aligned_u64 prog_tags;
86 + __aligned_u64 run_time_ns;
87 + __aligned_u64 run_cnt;
88 } __attribute__((aligned(8)));
92 char name[BPF_OBJ_NAME_LEN];
97 + __aligned_u64 netns_dev;
98 + __aligned_u64 netns_ino;
100 __u32 btf_key_type_id;
101 __u32 btf_value_type_id;