Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp1628724rwd; Sun, 21 May 2023 02:52:40 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7pAFluMfNsPvEFQNuGFgCKBNW39hZmq94fttsk526rAxVN8GX8+uT4D9WgRO+GYTA+r06h X-Received: by 2002:a05:6a20:938d:b0:107:35ed:28a7 with SMTP id x13-20020a056a20938d00b0010735ed28a7mr8792385pzh.8.1684662760500; Sun, 21 May 2023 02:52:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684662760; cv=none; d=google.com; s=arc-20160816; b=Y16GVf4GxxASEh0VXMXaOXjZiyax1hQF0z6S/naGaGwFX5lwKAKBZrjSwfhGCLVejk CoPJFNOgxTj2rMwp63Ho40aL47PStHAE319nABJBje556kmvG9GF5wqNfjlONv14WNr3 eHV7CgB/wpp1ABaDYCCANqyCcpFNspAyxh8suRJPjY24woxJ8RpdaPuwpztjGJzGczp/ QgupV617/LZefOH+Ha5iwhPofexOoB1UYH+ZuyanzgE55FTAGUqQZSYDWUsq4Gnv7CyZ S3UsmJvta5UpC91IO8qH1MVHhQSP4kEwCK5BGbbLzjZf9PRTu0FVSF/HCqr48xc8P17d +vdw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:dkim-signature :from; bh=hfo9GZIoW2bpXvuLhLIjHX/dcp29YRpjDlKpcx/2b9s=; b=lWHIkJELowIrrUaN3XY76hweoLPynonrVPTUEaqgoC0MzdqTEE9lS3l5xCjBBKneuI V3VGVf2EMzfGNbF6mhKnu8p7OelzVxcZ7QKmFh8C/8BbRrjm8wYN+vKddf04XBwPB+v7 en+u6KPdHfya2hT0Q5uWen4t/HZ4h/LBmz2T7dqoE9WWiXhGJ02SYQylsjlHwLDDtt0F l6GhikQgmNbj+uj3ReBxA8oXpEwId6qxKT41Z/kITImNo6MIKw25uGgs3jOi/EXmkUdY hpBzdWq9tPXNkaRxTE5XuM9zFR84sXC7/8kJLTYktg6eztRGp9Ltfn5bfRe/w0jgNbXd 4h6g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@weissschuh.net header.s=mail header.b=cFDVWF4V; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q21-20020a656a95000000b0051b70ce7dd2si2968178pgu.80.2023.05.21.02.52.26; Sun, 21 May 2023 02:52:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@weissschuh.net header.s=mail header.b=cFDVWF4V; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230224AbjEUJhY (ORCPT + 99 others); Sun, 21 May 2023 05:37:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58284 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230168AbjEUJhH (ORCPT ); Sun, 21 May 2023 05:37:07 -0400 Received: from todd.t-8ch.de (todd.t-8ch.de [IPv6:2a01:4f8:c010:41de::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B6B9C109; Sun, 21 May 2023 02:36:46 -0700 (PDT) From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=weissschuh.net; s=mail; t=1684661803; bh=lj2geLr/EdywhNVRdZihjVutdtlzdrTLYrnqWuCaRHI=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=cFDVWF4VRJK30uYLVDvSQLOKcqHfOapaHKy+uCiYEHV8joFGCP1VNLTw5YTPsrZdu tKcAKkoYbj7IucjFJRilU2Xdy+lRiSR3cTBsitu86G2g61qPlvLRSWYVEYyWSjooCV 85iXyDnx1wO3gM4uzxU1VGrjVCV4siMhkPC8TJwY= Date: Sun, 21 May 2023 11:36:30 +0200 Subject: [PATCH 2/7] tools/nolibc: x86_64: disable stack protector for _start MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Message-Id: <20230521-nolibc-automatic-stack-protector-v1-2-dad6c80c51c1@weissschuh.net> References: <20230521-nolibc-automatic-stack-protector-v1-0-dad6c80c51c1@weissschuh.net> In-Reply-To: <20230521-nolibc-automatic-stack-protector-v1-0-dad6c80c51c1@weissschuh.net> To: Willy Tarreau , "Paul E. McKenney" , Shuah Khan , Paul Walmsley , Palmer Dabbelt , Albert Ou , Nathan Chancellor , Nick Desaulniers , Tom Rix Cc: linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-riscv@lists.infradead.org, llvm@lists.linux.dev, =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1684661802; l=1079; i=linux@weissschuh.net; s=20221212; h=from:subject:message-id; bh=lj2geLr/EdywhNVRdZihjVutdtlzdrTLYrnqWuCaRHI=; b=JVbhHarzeBvvcx5vDuAxt69sG68MA2ijZHbow7ctpQ1HKfKs70ByaOsPMJGeyj+rVqnfqQVyk 1O4/8Fg7pOIBbY4WpL5JP7Mj+mvvpxTiEIflujBujsb3if9KDfDQVZN X-Developer-Key: i=linux@weissschuh.net; a=ed25519; pk=KcycQgFPX2wGR5azS7RhpBqedglOZVgRPfdFSPB1LNw= X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 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 --- 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