[PATCH 1/2] arm64: remove current_top_of_stack()

Kees Cook keescook at chromium.org
Thu Nov 17 14:09:00 PST 2022


On Thu, Nov 17, 2022 at 12:09:01PM +0000, Mark Rutland wrote:
> 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:
> 
>   0b3e336601b82c6a ("arm64: Add support for STACKLEAK gcc plugin")
> 
> ... then we figured out the intended semantics were unclear, and
> reworked it in commit:
> 
>   e85094c31ddb794a ("arm64: stackleak: fix current_top_of_stack()")
> 
> ... then we removed the only user in commit:
> 
>   0cfa2ccd285d98ad ("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 <mark.rutland at arm.com>

Reviewed-by: Kees Cook <keescook at chromium.org>

-- 
Kees Cook



More information about the linux-arm-kernel mailing list