Skip to content

Commit c8c384d

Browse files
mrutland-armwilldeacon
authored andcommitted
arm64: remove current_top_of_stack()
We no longer use current_top_of_stack() on arm64, so it can be removed. We introduced current_top_of_stack() for STACKLEAK in commit: 0b3e336 ("arm64: Add support for STACKLEAK gcc plugin") ... then we figured out the intended semantics were unclear, and reworked it in commit: e85094c ("arm64: stackleak: fix current_top_of_stack()") ... then we removed the only user in commit: 0cfa2cc ("stackleak: rework stack high bound handling") Given that it's no longer used, and it's very easy to misuse, this patch removes current_top_of_stack(). For the moment, on_thread_stack() is left where it is as moving it will change some header dependencies. There should be no functional change as a result of this patch. Signed-off-by: Mark Rutland <[email protected]> Cc: Catalin Marinas <[email protected]> Cc: Kees Cook <[email protected]> Cc: Will Deacon <[email protected]> Reviewed-by: Kees Cook <[email protected]> Reviewed-by: Mark Brown <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Will Deacon <[email protected]>
1 parent f0c4d9f commit c8c384d

File tree

1 file changed

+0
-11
lines changed

1 file changed

+0
-11
lines changed

arch/arm64/include/asm/processor.h

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -396,17 +396,6 @@ long get_tagged_addr_ctrl(struct task_struct *task);
396396
#define GET_TAGGED_ADDR_CTRL() get_tagged_addr_ctrl(current)
397397
#endif
398398

399-
/*
400-
* For CONFIG_GCC_PLUGIN_STACKLEAK
401-
*
402-
* These need to be macros because otherwise we get stuck in a nightmare
403-
* of header definitions for the use of task_stack_page.
404-
*/
405-
406-
/*
407-
* The top of the current task's task stack
408-
*/
409-
#define current_top_of_stack() ((unsigned long)current->stack + THREAD_SIZE)
410399
#define on_thread_stack() (on_task_stack(current, current_stack_pointer, 1))
411400

412401
#endif /* __ASSEMBLY__ */

0 commit comments

Comments
 (0)