From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: barebox@lists.infradead.org
Cc: Ahmad Fatoum <a.fatoum@pengutronix.de>
Subject: [PATCH] fixup! lib: add stackprotector support
Date: Thu, 21 Sep 2023 10:52:19 +0200 [thread overview]
Message-ID: <20230921085219.4065181-1-a.fatoum@pengutronix.de> (raw)
In-Reply-To: <20230911150900.3584523-4-a.fatoum@pengutronix.de>
lib: stackprot: annotate stackprot_randomize_guard with __no_stack_protector
stackprot_randomize_guard() changes the stack protector, so it's
important that it can't make use of the stackprotector itself.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
Not a problem in practice unless we use stackprotector-all, which we
don't.
---
lib/stackprot.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/stackprot.c b/lib/stackprot.c
index ca89b37d9042..aa0e88603aae 100644
--- a/lib/stackprot.c
+++ b/lib/stackprot.c
@@ -25,7 +25,7 @@ noinstr void __stack_chk_fail(void)
}
EXPORT_SYMBOL(__stack_chk_fail);
-static int stackprot_randomize_guard(void)
+static __no_stack_protector int stackprot_randomize_guard(void)
{
return get_crypto_bytes(&__stack_chk_guard, sizeof(__stack_chk_guard));
}
--
2.39.2
next prev parent reply other threads:[~2023-09-21 8:53 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-11 15:08 [PATCH 0/5] add stack protector and guard page support Ahmad Fatoum
2023-09-11 15:08 ` [PATCH 1/5] include: move PAGE_ definitions into linux/pagemap.h Ahmad Fatoum
2023-09-11 15:08 ` [PATCH 2/5] ARM: mark early C setup functions as __prereloc Ahmad Fatoum
2023-09-11 15:08 ` [PATCH 3/5] lib: add stackprotector support Ahmad Fatoum
2023-09-21 8:52 ` Ahmad Fatoum [this message]
2023-09-11 15:08 ` [PATCH 4/5] ARM: mmu: catch stack overflowing into TTB with stack guard page Ahmad Fatoum
2023-09-11 15:09 ` [PATCH 5/5] commands: add stacksmash command for causing stack overflows Ahmad Fatoum
2023-09-12 4:48 ` Thorsten Scherer
2023-09-11 15:47 ` [PATCH] fixup! lib: add stackprotector support Ahmad Fatoum
2023-09-14 9:14 ` [PATCH] fixup! commands: add stacksmash command for causing stack overflows Ahmad Fatoum
2023-09-14 10:22 ` Thorsten Scherer
2023-09-14 11:05 ` Ahmad Fatoum
2023-09-21 8:49 ` [PATCH 0/5] add stack protector and guard page support 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=20230921085219.4065181-1-a.fatoum@pengutronix.de \
--to=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