1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
/*
* XXXETSAL This is convoluted for a reason. We have a three way conflict here:
*
* 1) intf.h gets parsed by bindgen, and I guess bindgen does not fully
* preprocess the file because it does not resolve __arena to
* __attribute__((address_space(1))) and errors out. So we cannot use the
* __arena macro from bpf_arena_common.h that involves all this #ifdef'ing.
* 2) Clang 18 full-on crashes if we pass address_space(1) as an attribute as it
* is unable to generate the address space conversion instruction.
* 3) Clang 19 requires the address_space attribute because address space
* conversions can only be implicit.
*
* The below snippet replicates as tersely as possible the logic in
* bpf_arena_common.h to get the code passing with both Clang 18 and 19.
*/
;
typedef struct dom_ctx *dom_ptr;
typedef struct dom_ctx *dom_ptr;
;
/* XXXETSAL Same rationale as for dom_ptr. Remove once we dump Clang 18.*/
typedef struct task_ctx *task_ptr;
typedef struct task_ctx *task_ptr;
;
;
;
;
/* __TYPES_H */