public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: Kees Cook <keescook@chromium.org>
To: Mark Rutland <mark.rutland@arm.com>
Cc: linux-arm-kernel@lists.infradead.org, catalin.marinas@arm.com,
	will@kernel.org
Subject: Re: [PATCH 2/2] arm64: move on_thread_stack() to <asm/stacktrace.h>
Date: Thu, 17 Nov 2022 14:09:42 -0800	[thread overview]
Message-ID: <202211171409.8A31B2A724@keescook> (raw)
In-Reply-To: <20221117120902.3974163-3-mark.rutland@arm.com>

On Thu, Nov 17, 2022 at 12:09:02PM +0000, Mark Rutland wrote:
> Currently on_thread_stack() is defined in <asm/processor.h>, depending
> upon definitiong from <asm/stacktrace.h> despite this header not being
> included. This ends up being fragile, and any user of on_thread_stack()
> must include both <asm/processor.h> and <asm/stacktrace.h>.
> 
> We organised things this way due to header dependencies back in commit:
> 
>   0b3e336601b82c6a ("arm64: Add support for STACKLEAK gcc plugin")
> 
> ... but now that we no longer use current_top_of_stack(), and given that
> stackleak includes <asm/stacktrace.h> via <linux/stackleak.h>, we no
> longer need the definition to live in <asm/processor.h>.
> 
> Move on_thread_stack() to <asm/stacktrace.h>, where all its dependencies
> are guaranteed to be defined. This requires having arm64's irq.c
> explicitly include <asm/stacktrace.h>, and I've taken the opportunity to
> sort the includes, which were slightly out of order.
> 
> There should be no functional change as a result of this patch.
> 
> Signed-off-by: Mark Rutland <mark.rutland@arm.com>

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

-- 
Kees Cook

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  parent reply	other threads:[~2022-11-17 22:10 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-17 12:09 [PATCH 0/2] arm64: stack helper cleanups Mark Rutland
2022-11-17 12:09 ` [PATCH 1/2] arm64: remove current_top_of_stack() Mark Rutland
2022-11-17 15:46   ` Mark Brown
2022-11-17 22:09   ` Kees Cook
2022-11-17 12:09 ` [PATCH 2/2] arm64: move on_thread_stack() to <asm/stacktrace.h> Mark Rutland
2022-11-17 15:47   ` Mark Brown
2022-11-17 22:09   ` Kees Cook [this message]
2022-11-18 19:40 ` [PATCH 0/2] arm64: stack helper cleanups Will Deacon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202211171409.8A31B2A724@keescook \
    --to=keescook@chromium.org \
    --cc=catalin.marinas@arm.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=mark.rutland@arm.com \
    --cc=will@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox