Received: by 2002:a05:7412:b101:b0:e2:908c:2ebd with SMTP id az1csp2759337rdb; Wed, 15 Nov 2023 09:38:33 -0800 (PST) X-Google-Smtp-Source: AGHT+IEIWZySRO5IYrsgMnIn69ssZ8jS9+ICccJhpPa95tkFUdU7jauWdj+2eLAyuwgy8paTImpK X-Received: by 2002:a05:6a20:6a1c:b0:181:7d6d:c10b with SMTP id p28-20020a056a206a1c00b001817d6dc10bmr9267455pzk.7.1700069912893; Wed, 15 Nov 2023 09:38:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700069912; cv=none; d=google.com; s=arc-20160816; b=L1Y/xyhsFIHCaS3aOX/axEIJCfrv5yLDXSYcOgWt1X+Zj2d21DnKmVJR1v7qEpzdmz sqEGTQB2ZTDF3acufVi5F3UpC+exxV+Ys5ysqkfJjQGcmv1Wq4rEQm7iBzpxalUSkc0k 8bY9DcQZ2jCaNBuYxZ/T9kAwjdoMPAXq6b+8iMtxm0GdrMLQqiSaLoyq69ISs9Dsk2vK xu75diZOzXfPVm3SKaQzyjbtW2z6Kq2l/Z5xZHuUWoAbtB34QO8JMyqXWvb9E12dhaSo t+vql6BrQDScU/hVSb4VrcbeWcfINDSxJVM6Qu7pE9mvXLfPgOrEMH77BOcsBZX7Juod PmBA== 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=QQoC9i+SJdGrvV/tO6Xn3N5JH39L1Nc9The4vgz1I64=; fh=O55jSVrVODK5Pp/8HguUJuz95L5ieTggTCPnkrmwi7I=; b=SUqt8fkPiF7YOMc8b9i1rdz0T+fZmWkW0F7qC+TIZTgBjcm/zJnd3OKCDTINUcY3IL xBxUUoRn67L+wOOIZgaREq8NXo+evpvG/SyepdwtTMZl8euZYlbjvbYb4thfQdMmuizh k8l0zLoSR1SpF5+Fm82sYunwviy3oYUL8B05EQhnFFQEyns++cGhykMORxMLA9urGTdX ktN9HhUV5q+EOhV9T3d6MisRqU9IvX5FpgmkgpIs+7M4/+lp1Oatzp2b3F5LzjiW6voZ AMKWytOBDHuVS/uCosESgM2V5vsKg1KAbY66xMhfAlJRRyYpnEBQHd9Mt5rP5FyIkajF 3a5w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b="f15IXd/O"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id e186-20020a6369c3000000b005b82f3dcec6si10381300pgc.269.2023.11.15.09.38.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Nov 2023 09:38:32 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b="f15IXd/O"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id AC0CB816EFBC; Wed, 15 Nov 2023 09:38:18 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232555AbjKORhf (ORCPT + 99 others); Wed, 15 Nov 2023 12:37:35 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60776 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232401AbjKORhb (ORCPT ); Wed, 15 Nov 2023 12:37:31 -0500 Received: from mail-qk1-x72e.google.com (mail-qk1-x72e.google.com [IPv6:2607:f8b0:4864:20::72e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5BE81196 for ; Wed, 15 Nov 2023 09:37:28 -0800 (PST) Received: by mail-qk1-x72e.google.com with SMTP id af79cd13be357-77891f362cfso95334585a.1 for ; Wed, 15 Nov 2023 09:37:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1700069846; x=1700674646; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=QQoC9i+SJdGrvV/tO6Xn3N5JH39L1Nc9The4vgz1I64=; b=f15IXd/ORWdLM5P0ax5IPt5Rn6AAt+VKROAp5rBsKebk7SYsnvto1bsLPDP+NMQdvn dM90RUAEtRZ6e4fZm84E1a4Qgy4Z6qeXeuvLu9b9tx1auPq38H9KiXeOI2mr6km4xETg QpR+6FSxGWA/01Sieh5rQX5W7Vfl0rgE46MGTIraF0g+qmpZGNW0Dbu7/wtR1NyW2zMy zknZ4GmV0kKvi3NCCKsKGtZDQzrwXuvIRth4SG1a2/grOD31SUM7PxnLyGP7tFFtiiNi hvwoJ5vb8DH8V7xXDfT0gIvBkjebNZUHycgmLnwJPTjaaJZs+ScVqyTJEy07sn9eM/ek jRuQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700069846; x=1700674646; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=QQoC9i+SJdGrvV/tO6Xn3N5JH39L1Nc9The4vgz1I64=; b=m+HIuVntOyQA5vSWSmEd9djC8mIMYuubbeZuRwJmpIIdHn5zdiwbV4bIq1j9WA2IUk FrSyLcfc/ZnsGV1mcpsZgdGlShc+l13sn8LnPXfp2fO/VEM8Umk/VZ9RAEzl5kEHI0ed CN068Hc5io16tcAiHJnVKWsMhpP7tClNLZ4j/UG0C+YdMXhmnysBkwwsnJdQVQycOtOP gTqZZ0Ou4nAKFWEoPlPQ7cjhWGzHSjWCjUILmFEx9umzKIEB54N4mb17TO1g8DP5nVqV PcXqQe0uOFgC6Z4wb8ErJ+aQXc1NS7jMbtPoNrS5oJnhRdt401bpkVegpQ+1ozcFB/J6 FkqQ== X-Gm-Message-State: AOJu0YyjKdN/md5rwFd8cg43Jd4InFLRwmRK2l+G2OG15Atm+5qhe6dI 3x5MnEpsvoI82FLprgpQyj6lkf415A== X-Received: by 2002:a05:620a:bd3:b0:778:969e:3a0c with SMTP id s19-20020a05620a0bd300b00778969e3a0cmr8867556qki.27.1700069846651; Wed, 15 Nov 2023 09:37:26 -0800 (PST) Received: from citadel.lan ([2600:6c4a:4d3f:6d5c::1019]) by smtp.gmail.com with ESMTPSA id x20-20020a05620a0b5400b0077bda014d8esm3260099qkg.87.2023.11.15.09.37.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Nov 2023 09:37:25 -0800 (PST) From: Brian Gerst To: linux-kernel@vger.kernel.org, x86@kernel.org Cc: Ingo Molnar , Thomas Gleixner , Borislav Petkov , "H . Peter Anvin" , Peter Zijlstra , Uros Bizjak , David.Laight@aculab.com, Brian Gerst Subject: [PATCH v3 02/14] x86/stackprotector/64: Remove stack protector test script Date: Wed, 15 Nov 2023 12:36:56 -0500 Message-ID: <20231115173708.108316-3-brgerst@gmail.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231115173708.108316-1-brgerst@gmail.com> References: <20231115173708.108316-1-brgerst@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.6 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Wed, 15 Nov 2023 09:38:18 -0800 (PST) This test for the stack protector was added in 2006 to make sure the compiler had the PR28281 patch applied. With GCC 5.1 being the minimum supported compiler now, it is no longer necessary. Signed-off-by: Brian Gerst --- arch/x86/Kconfig | 5 ++--- scripts/gcc-x86_64-has-stack-protector.sh | 4 ---- 2 files changed, 2 insertions(+), 7 deletions(-) delete mode 100755 scripts/gcc-x86_64-has-stack-protector.sh diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index 46c55fd7ca86..a1d2f7fe42bb 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -410,12 +410,11 @@ config PGTABLE_LEVELS config CC_HAS_SANE_STACKPROTECTOR bool - default $(success,$(srctree)/scripts/gcc-x86_64-has-stack-protector.sh $(CC) $(CLANG_FLAGS)) if 64BIT + default y if 64BIT default $(cc-option,-mstack-protector-guard-reg=fs -mstack-protector-guard-symbol=__stack_chk_guard) help We have to make sure stack protector is unconditionally disabled if - the compiler produces broken code or if it does not let us control - the segment on 32-bit kernels. + the compiler does not allow control of the segment and symbol. menu "Processor type and features" diff --git a/scripts/gcc-x86_64-has-stack-protector.sh b/scripts/gcc-x86_64-has-stack-protector.sh deleted file mode 100755 index 75e4e22b986a..000000000000 --- a/scripts/gcc-x86_64-has-stack-protector.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh -# SPDX-License-Identifier: GPL-2.0 - -echo "int foo(void) { char X[200]; return 3; }" | $* -S -x c -c -m64 -O0 -mcmodel=kernel -fno-PIE -fstack-protector - -o - 2> /dev/null | grep -q "%gs" -- 2.41.0