File tree Expand file tree Collapse file tree 3 files changed +8
-12
lines changed Expand file tree Collapse file tree 3 files changed +8
-12
lines changed Original file line number Diff line number Diff line change 14
14
15
15
#ifdef CONFIG_GCC_PLUGIN_STACKLEAK
16
16
#include <asm/stacktrace.h>
17
+ #include <linux/linkage.h>
17
18
18
19
/*
19
20
* The lowest address on tsk's stack which we can plausibly erase.
@@ -76,6 +77,11 @@ static inline void stackleak_task_init(struct task_struct *t)
76
77
# endif
77
78
}
78
79
80
+ asmlinkage void noinstr stackleak_erase (void );
81
+ asmlinkage void noinstr stackleak_erase_on_task_stack (void );
82
+ asmlinkage void noinstr stackleak_erase_off_task_stack (void );
83
+ void __no_caller_saved_registers noinstr stackleak_track_stack (void );
84
+
79
85
#else /* !CONFIG_GCC_PLUGIN_STACKLEAK */
80
86
static inline void stackleak_task_init (struct task_struct * t ) { }
81
87
#endif
Original file line number Diff line number Diff line change 17
17
* if (argc <= 1)
18
18
* printf("%s: no command arguments :(\n", *argv);
19
19
* else
20
- * printf("%s: %d command arguments!\n", *argv, args - 1);
20
+ * printf("%s: %d command arguments!\n", *argv, argc - 1);
21
21
* }
22
22
*
23
23
* after:
47
47
* // perturb_local_entropy()
48
48
* } else {
49
49
* local_entropy ^= 3896280633962944730;
50
- * printf("%s: %d command arguments!\n", *argv, args - 1);
50
+ * printf("%s: %d command arguments!\n", *argv, argc - 1);
51
51
* }
52
52
*
53
53
* // latent_entropy_execute() 4.
Original file line number Diff line number Diff line change @@ -278,29 +278,19 @@ static bool is_flexible_array(const_tree field)
278
278
{
279
279
const_tree fieldtype ;
280
280
const_tree typesize ;
281
- const_tree elemtype ;
282
- const_tree elemsize ;
283
281
284
282
fieldtype = TREE_TYPE (field );
285
283
typesize = TYPE_SIZE (fieldtype );
286
284
287
285
if (TREE_CODE (fieldtype ) != ARRAY_TYPE )
288
286
return false;
289
287
290
- elemtype = TREE_TYPE (fieldtype );
291
- elemsize = TYPE_SIZE (elemtype );
292
-
293
288
/* size of type is represented in bits */
294
289
295
290
if (typesize == NULL_TREE && TYPE_DOMAIN (fieldtype ) != NULL_TREE &&
296
291
TYPE_MAX_VALUE (TYPE_DOMAIN (fieldtype )) == NULL_TREE )
297
292
return true;
298
293
299
- if (typesize != NULL_TREE &&
300
- (TREE_CONSTANT (typesize ) && (!tree_to_uhwi (typesize ) ||
301
- tree_to_uhwi (typesize ) == tree_to_uhwi (elemsize ))))
302
- return true;
303
-
304
294
return false;
305
295
}
306
296
You can’t perform that action at this time.
0 commit comments