From: Sascha Hauer <sha@pengutronix.de>
To: Ahmad Fatoum <a.fatoum@pengutronix.de>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH master] ARM: kasan: reserve shadow memory region
Date: Wed, 3 Jan 2024 14:58:50 +0100 [thread overview]
Message-ID: <20240103135850.GH1318922@pengutronix.de> (raw)
In-Reply-To: <20240103101308.2628659-1-a.fatoum@pengutronix.de>
On Wed, Jan 03, 2024 at 11:13:08AM +0100, Ahmad Fatoum wrote:
> We did not have any protection in place to ensure that KASAN shadow memory
> isn't overwritten during boot. Add that now to avoid strange effects
> during debugging.
>
> Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
> ---
> arch/arm/cpu/start.c | 4 ++++
> 1 file changed, 4 insertions(+)
Applied, thanks
Sascha
>
> diff --git a/arch/arm/cpu/start.c b/arch/arm/cpu/start.c
> index 15f5b2937227..9f4cdfe67fbf 100644
> --- a/arch/arm/cpu/start.c
> +++ b/arch/arm/cpu/start.c
> @@ -133,6 +133,10 @@ static int barebox_memory_areas_init(void)
> request_sdram_region("board data", (unsigned long)barebox_boarddata,
> barebox_boarddata_size);
>
> + if (IS_ENABLED(CONFIG_KASAN))
> + request_sdram_region("kasan shadow", kasan_shadow_base,
> + mem_malloc_start() - kasan_shadow_base);
> +
> return 0;
> }
> device_initcall(barebox_memory_areas_init);
> --
> 2.39.2
>
>
>
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
next prev parent reply other threads:[~2024-01-03 14:00 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-03 10:13 Ahmad Fatoum
2024-01-03 13:58 ` Sascha Hauer [this message]
2024-01-03 14:57 ` Sascha Hauer
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=20240103135850.GH1318922@pengutronix.de \
--to=sha@pengutronix.de \
--cc=a.fatoum@pengutronix.de \
--cc=barebox@lists.infradead.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