File tree Expand file tree Collapse file tree 2 files changed +3
-12
lines changed Expand file tree Collapse file tree 2 files changed +3
-12
lines changed Original file line number Diff line number Diff line change 17
17
*/
18
18
#define __UNIQUE_ID (prefix ) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __COUNTER__)
19
19
20
- #define randomized_struct_fields_start struct {
21
- #define randomized_struct_fields_end };
22
-
23
20
/* all clang versions usable with the kernel support KASAN ABI version 5 */
24
21
#define KASAN_ABI_VERSION 5
25
22
Original file line number Diff line number Diff line change 242
242
#if defined(RANDSTRUCT_PLUGIN ) && !defined(__CHECKER__ )
243
243
#define __randomize_layout __attribute__((randomize_layout))
244
244
#define __no_randomize_layout __attribute__((no_randomize_layout))
245
+ /* This anon struct can add padding, so only enable it under randstruct. */
246
+ #define randomized_struct_fields_start struct {
247
+ #define randomized_struct_fields_end } __randomize_layout;
245
248
#endif
246
249
247
250
#endif /* GCC_VERSION >= 40500 */
256
259
*/
257
260
#define __visible __attribute__((externally_visible))
258
261
259
- /*
260
- * RANDSTRUCT_PLUGIN wants to use an anonymous struct, but it is only
261
- * possible since GCC 4.6. To provide as much build testing coverage
262
- * as possible, this is used for all GCC 4.6+ builds, and not just on
263
- * RANDSTRUCT_PLUGIN builds.
264
- */
265
- #define randomized_struct_fields_start struct {
266
- #define randomized_struct_fields_end } __randomize_layout;
267
-
268
262
#endif /* GCC_VERSION >= 40600 */
269
263
270
264
You can’t perform that action at this time.
0 commit comments