* updated kmousetool (21.12.1 -> 21.12.2), untested
[t2-trunk.git] / package / base / linux-header / hotfix-bpf.patch.m68k
blobd110f15ef514a06b707e08c337623e6a4b536e50
1 # --- T2-COPYRIGHT-NOTE-BEGIN ---
2 # This copyright note is auto-generated by scripts/Create-CopyPatch.
3
4 # T2 SDE: package/*/linux-header/hotfix-bpf.patch.m68k
5 # Copyright (C) 2021 The T2 SDE Project
6
7 # More information can be found in the files COPYING and README.
8
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
14 # version.
15 # --- T2-COPYRIGHT-NOTE-END ---
17 strace:
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
23 @@ -342,7 +342,7 @@
24                         __aligned_u64 value;
25                         __aligned_u64 next_key;
26                 };
27 -               __u64           flags;
28 +               __aligned_u64   flags;
29         };
31         struct { /* anonymous struct used by BPF_PROG_LOAD command */
32 @@ -425,7 +425,7 @@
33         } query;
35         struct {
36 -               __u64 name;
37 +               __aligned_u64 name;
38                 __u32 prog_fd;
39         } raw_tracepoint;
41 @@ -449,8 +449,8 @@
42                                                  */
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 */
49         } task_fd_query;
50  } __attribute__((aligned(8)));
52 @@ -2611,7 +2611,7 @@
53  #define __bpf_md_ptr(type, name)       \
54  union {                                        \
55         type name;                      \
56 -       __u64 :64;                      \
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 */
67         __u32 created_by_uid;
68         __u32 nr_map_ids;
69         __aligned_u64 map_ids;
70         char name[BPF_OBJ_NAME_LEN];
71         __u32 ifindex;
72         __u32 gpl_compatible:1;
73 -       __u64 netns_dev;
74 -       __u64 netns_ino;
75 +       __aligned_u64 netns_dev;
76 +       __aligned_u64 netns_ino;
77         __u32 nr_jited_ksyms;
78         __u32 nr_jited_func_lens;
79         __aligned_u64 jited_ksyms;
80 @@ -2887,8 +2887,8 @@
81         __u32 jited_line_info_rec_size;
82         __u32 nr_prog_tags;
83         __aligned_u64 prog_tags;
84 -       __u64 run_time_ns;
85 -       __u64 run_cnt;
86 +       __aligned_u64 run_time_ns;
87 +       __aligned_u64 run_cnt;
88  } __attribute__((aligned(8)));
90  struct bpf_map_info {
91 @@ -2901,8 +2901,8 @@
92         char  name[BPF_OBJ_NAME_LEN];
93         __u32 ifindex;
94         __u32 :32;
95 -       __u64 netns_dev;
96 -       __u64 netns_ino;
97 +       __aligned_u64 netns_dev;
98 +       __aligned_u64 netns_ino;
99         __u32 btf_id;
100         __u32 btf_key_type_id;
101         __u32 btf_value_type_id;