From: "Thomas Weißschuh" <linux@weissschuh.net>
To: Willy Tarreau <w@1wt.eu>, "Paul E. McKenney" <paulmck@kernel.org>,
Shuah Khan <shuah@kernel.org>,
Paul Walmsley <paul.walmsley@sifive.com>,
Palmer Dabbelt <palmer@dabbelt.com>,
Albert Ou <aou@eecs.berkeley.edu>,
Nathan Chancellor <nathan@kernel.org>,
Nick Desaulniers <ndesaulniers@google.com>,
Tom Rix <trix@redhat.com>
Cc: linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org,
linux-riscv@lists.infradead.org, llvm@lists.linux.dev,
"Thomas Weißschuh" <linux@weissschuh.net>
Subject: [PATCH 4/7] tools/nolibc: add test for __stack_chk_guard initialization
Date: Sun, 21 May 2023 11:36:32 +0200 [thread overview]
Message-ID: <20230521-nolibc-automatic-stack-protector-v1-4-dad6c80c51c1@weissschuh.net> (raw)
In-Reply-To: <20230521-nolibc-automatic-stack-protector-v1-0-dad6c80c51c1@weissschuh.net>
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
---
tools/testing/selftests/nolibc/nolibc-test.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/tools/testing/selftests/nolibc/nolibc-test.c b/tools/testing/selftests/nolibc/nolibc-test.c
index d8b59c8f6c03..995dc39a177e 100644
--- a/tools/testing/selftests/nolibc/nolibc-test.c
+++ b/tools/testing/selftests/nolibc/nolibc-test.c
@@ -808,6 +808,14 @@ static int run_protection(int min, int max)
return 0;
#endif
+#if defined(NOLIBC_STACKPROTECTOR)
+ if (!__stack_chk_guard) {
+ llen += printf("__stack_chk_guard not initialized");
+ pad_spc(llen, 64, "[FAIL]\n");
+ return 1;
+ }
+#endif
+
pid = -1;
pid = fork();
--
2.40.1
next prev parent reply other threads:[~2023-05-21 9:37 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-21 9:36 [PATCH 0/7] tools/nolibc: autodetect stackprotector availability from compiler Thomas Weißschuh
2023-05-21 9:36 ` [PATCH 1/7] tools/nolibc: fix typo pint -> point Thomas Weißschuh
2023-05-21 9:36 ` [PATCH 2/7] tools/nolibc: x86_64: disable stack protector for _start Thomas Weißschuh
2023-05-21 9:36 ` [PATCH 3/7] tools/nolibc: ensure stack protector guard is never zero Thomas Weißschuh
2023-05-21 9:36 ` Thomas Weißschuh [this message]
2023-05-21 9:36 ` [PATCH 5/7] tools/nolibc: reformat list of headers to be installed Thomas Weißschuh
2023-05-21 9:36 ` [PATCH 6/7] tools/nolibc: add autodetection for stackprotector support Thomas Weißschuh
2023-05-21 9:36 ` [PATCH 7/7] tools/nolibc: simplify stackprotector compiler flags Thomas Weißschuh
2023-05-21 10:36 ` Thomas Weißschuh
2023-05-23 20:12 ` Willy Tarreau
2023-05-23 20:38 ` Thomas Weißschuh
2023-05-23 20:50 ` Willy Tarreau
2023-05-21 10:08 ` [PATCH 0/7] tools/nolibc: autodetect stackprotector availability from compiler Willy Tarreau
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=20230521-nolibc-automatic-stack-protector-v1-4-dad6c80c51c1@weissschuh.net \
--to=linux@weissschuh.net \
--cc=aou@eecs.berkeley.edu \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=llvm@lists.linux.dev \
--cc=nathan@kernel.org \
--cc=ndesaulniers@google.com \
--cc=palmer@dabbelt.com \
--cc=paul.walmsley@sifive.com \
--cc=paulmck@kernel.org \
--cc=shuah@kernel.org \
--cc=trix@redhat.com \
--cc=w@1wt.eu \
/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
all inboxes | Powered by JetHome®