Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp314893rwd; Mon, 12 Jun 2023 14:05:24 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5D8deLBcwwvjVn7FSEhNudkuSnlQCWLVrF9hYGs3TIje7Hog68kD5GAWIfiV9Rtrhjipoy X-Received: by 2002:a05:6a20:3d1b:b0:118:ed8a:af35 with SMTP id y27-20020a056a203d1b00b00118ed8aaf35mr11241453pzi.16.1686603924546; Mon, 12 Jun 2023 14:05:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686603924; cv=none; d=google.com; s=arc-20160816; b=OL1QrpN4ZkFmN1Nf58SVutfCfBZ2YKR0b/mtcbv3Iyb0LH1lXJgw4ub0Je9dqFxho2 xhH7w6UOA8SIphG4HCNDUtrG+9qE4+hzUSMu/754dBYwQ1JkM/c06AN1wkVupdZzS+dL hIrID/4xGveJ98wfN7YSqNl9BqyxEYwqL0PPcTdWOnhMm9GQ1INjBYGeTiTqd4IZ52Rd T16nl22R5AMk+Ex0WZfvoYc3z2NTMuVRV5znN0ze72dhaknsuG1ganBpIz3hI7a8E74f LsAy0eprxm3yZ/NnwO39mYeG7+cZHhCgkmb57ogB26dXwgs507H/nw73A26cKPPBDQuE sAog== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=5BluykOX8hya/xEIJPI89ySw4O8mxJM4gQpVreiOq9o=; b=GjY96tV37dKHkP1uoy/QNgX1N2XbF2+mscTp9QW/DP/I1QqSKlJe7rUQFkl91cgcnD 919WHS/YNfrasoJXKr/pOqAoC97vfyuojcWyOiQBGkoWyTdQ9du6aJ3Ug8Y3MsGedyzr wkcV8bGdj3MYyAL0eIcf8F/WcXumjL+jQW5+itzULC0KPnsyp8+zt1vEjBsbxPgGw4oG cYcTjbDsqTX2lGwg2BfpCPsejDVYRcxut7E5NqZmgFHall+z/Nz/fjJDT9K7rAiSMuu0 5g8O6TmnLo2ykl2zE+Js8OX4O1w73FUrqhlHCUduzihbrcRtBCDeWfKGCTD1p68yjNJN ulVg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=a82OsQVl; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f18-20020a637552000000b0053fb3bdd2fesi7333506pgn.506.2023.06.12.14.05.12; Mon, 12 Jun 2023 14:05:24 -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=@kernel.org header.s=k20201202 header.b=a82OsQVl; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238145AbjFLUtQ (ORCPT + 99 others); Mon, 12 Jun 2023 16:49:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35654 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235962AbjFLUrh (ORCPT ); Mon, 12 Jun 2023 16:47:37 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 83A201981 for ; Mon, 12 Jun 2023 13:46:43 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id A91AD62F14 for ; Mon, 12 Jun 2023 20:45:17 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2284FC43324; Mon, 12 Jun 2023 20:45:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1686602717; bh=651zibUdG42x8RfDbrif5fkpzpSwW8yz5Rd3sGWo/wk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=a82OsQVlu7us9TzK3FQuGOYW/U69y0waSi8CHJl+1cQ/k8Zrh2qSO6nyHbJbtGOo/ U738RkKgw7v9ZZlrNS+SDLTXUZ0TB8/KqSDtfoQxK0hPrtyyFDULmNCtmKD4WtqAQL Akg0Sg4YXl6jaMbbLkFs9iLuw+vo+VkCnknM+Z6KagWZpn+bfkjnRd+vB7jEyB0Yks xc1l1aB3YpbB1pjK6UVysvg4CautgASiGi5Ym7FByQf/X+Ttb9EordiGoJz8hLiE40 CIn0GU7VNKfudSq4tbFS7ujQokszZK+F2zYTSiq/VZR5ER//IVK+Q6OVIJVtA+tWq7 sBo+bB2MYKaFw== Received: by paulmck-ThinkPad-P17-Gen-1.home (Postfix, from userid 1000) id F3E23CE3A7C; Mon, 12 Jun 2023 13:45:15 -0700 (PDT) From: "Paul E. McKenney" To: linux-kernel@vger.kernel.org Cc: gwml@vger.gnuweeb.org, kernel-team@meta.com, w@lwt.eu, =?UTF-8?q?Thomas=20Wei=C3=9Fschuh?= , Willy Tarreau , "Paul E . McKenney" Subject: [PATCH v2 nolibc 33/53] tools/nolibc: s390: disable stackprotector in _start Date: Mon, 12 Jun 2023 13:44:54 -0700 Message-Id: <20230612204514.292087-33-paulmck@kernel.org> X-Mailer: git-send-email 2.40.1 In-Reply-To: <8b757cc0-3719-4e63-a755-9710384137bc@paulmck-laptop> References: <8b757cc0-3719-4e63-a755-9710384137bc@paulmck-laptop> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, 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 From: Thomas Weißschuh s390 does not support the "global" stack protector mode that is implemented in nolibc. Now that nolibc detects if stack protectors are enabled at runtime it could happen that a future compiler does indeed use global mode on and nolibc would compile but segfault at runtime. To avoid this hypothetic case and to align s390 with the other architectures disable stack protectors when compiling _start(). Signed-off-by: Thomas Weißschuh Signed-off-by: Willy Tarreau Signed-off-by: Paul E. McKenney --- tools/include/nolibc/arch-s390.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/include/nolibc/arch-s390.h b/tools/include/nolibc/arch-s390.h index a738e7f3f8e8..516dff5bff8b 100644 --- a/tools/include/nolibc/arch-s390.h +++ b/tools/include/nolibc/arch-s390.h @@ -8,6 +8,8 @@ #include #include +#include "compiler.h" + /* The struct returned by the stat() syscall, equivalent to stat64(). The * syscall returns 116 bytes and stops in the middle of __unused. */ @@ -164,7 +166,7 @@ char **environ __attribute__((weak)); const unsigned long *_auxv __attribute__((weak)); /* startup code */ -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 ( "lg %r2,0(%r15)\n" /* argument count */ -- 2.40.1