mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
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 2/7] tools/nolibc: x86_64: disable stack protector for _start
Date: Sun, 21 May 2023 11:36:30 +0200	[thread overview]
Message-ID: <20230521-nolibc-automatic-stack-protector-v1-2-dad6c80c51c1@weissschuh.net> (raw)
In-Reply-To: <20230521-nolibc-automatic-stack-protector-v1-0-dad6c80c51c1@weissschuh.net>

This was forgotten in the original submission.

It is unknown why it worked for x86_64 on some compiler without this
attribute.

Reported-by: Willy Tarreau <w@1wt.eu>
Closes: https://lore.kernel.org/lkml/20230520133237.GA27501@1wt.eu/
Fixes: 0d8c461adbc4 ("tools/nolibc: x86_64: add stackprotector support")
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
---
 tools/include/nolibc/arch-x86_64.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/include/nolibc/arch-x86_64.h b/tools/include/nolibc/arch-x86_64.h
index d98f6c89d143..e201af15e142 100644
--- a/tools/include/nolibc/arch-x86_64.h
+++ b/tools/include/nolibc/arch-x86_64.h
@@ -190,7 +190,7 @@ const unsigned long *_auxv __attribute__((weak));
  * 2) The deepest stack frame should be zero (the %rbp).
  *
  */
-void __attribute__((weak,noreturn,optimize("omit-frame-pointer"))) _start(void)
+void __attribute__((weak,noreturn,optimize("omit-frame-pointer"),no_stack_protector)) _start(void)
 {
 	__asm__ volatile (
 #ifdef NOLIBC_STACKPROTECTOR

-- 
2.40.1


  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 ` Thomas Weißschuh [this message]
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 ` [PATCH 4/7] tools/nolibc: add test for __stack_chk_guard initialization Thomas Weißschuh
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-2-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®