Received: by 2002:a05:7412:a9a2:b0:e2:908c:2ebd with SMTP id o34csp628717rdh; Thu, 26 Oct 2023 11:07:09 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFGZ6U+h0YcPFlSZt6D6ff3Gw5cluSqyIwl/aVXSMXrhcU7uO/vzX7/A56SY6BjKkhqckb7 X-Received: by 2002:a25:84c9:0:b0:d9d:3a6b:d376 with SMTP id x9-20020a2584c9000000b00d9d3a6bd376mr103942ybm.44.1698343628952; Thu, 26 Oct 2023 11:07:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698343628; cv=none; d=google.com; s=arc-20160816; b=0fdSc6vpieq/HbBjkgluQogpHzI4Yq9r6Wl6sgHTIMx4f/4x1CURcHblmhs5xAd1ek ZlRf7f0mauFgK0d+XCLUor1s3w6EsZPXp2YIj2UAp9ECW6ribrr9FRdJN1UjnfZUwYRR LIyPpg4oD9GeqXatE3uBky4EfbxLfDwTh+nYnqoQKpJkYytxYKRIvy90uAj58o7qVOPH ZLjc6YhrWNkMReE0yU7cKIoJjCHN6Smo06CrOQOD/tRinfpznnOhLGGyls9QTVX9qAWr ICNl8090iqvqoB5+jDH7FvHszcuv9JJXWRQbw0Q/LIK8dwBRLvmZDGQX0PdMS6Awhp7Y p+/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=cdc7Sx5CtpbfN0J2PRPL/2aEjI/F3L5Qic5K6HYlIhg=; fh=OeqABZGhkWuMQua3HfO6T/DfmgPwdiEhScz9hFdobNs=; b=cxrlkBie5U/CfGXgbhkJZijfd/yxzlvk0w+aBAnCk+Q9fL1L57eIi+VSrDmG32NKy6 NyA7VAzNUjy2KQq5Dp0cSCb803lG7pCeu0ENdKWhNoV59dQKHmYbOue4jIk7/BMfuhva +XLrWlSn0L+bxFR8a8sYU9rZ7Uqz0muO9Mdlz/j8IuJasVhL7b9CsQ1kBlL7xHQ1kNET gIlgn+LIcG4CMP0og8zjMTcbqsnLkEgSsdXIPaWUZo4dzSxsvHQnfvzGd199DXsuv8ZJ reFKc7Qg5YnYLpxVSYfAK2+7MLoGBfuR3B3+3JAm6emYxP1mhArrprzfDwlN6cW9k74A 5qKQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=UGAzPXi3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 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 fry.vger.email (fry.vger.email. [23.128.96.38]) by mx.google.com with ESMTPS id z36-20020a25ada4000000b00d9ac1761266si14616584ybi.273.2023.10.26.11.07.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 Oct 2023 11:07:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) client-ip=23.128.96.38; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=UGAzPXi3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 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 fry.vger.email (Postfix) with ESMTP id 712D48392313; Thu, 26 Oct 2023 11:07:05 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230152AbjJZSGt (ORCPT + 99 others); Thu, 26 Oct 2023 14:06:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58848 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230493AbjJZSGp (ORCPT ); Thu, 26 Oct 2023 14:06:45 -0400 Received: from mail-ed1-x532.google.com (mail-ed1-x532.google.com [IPv6:2a00:1450:4864:20::532]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 11BED1A5 for ; Thu, 26 Oct 2023 11:06:43 -0700 (PDT) Received: by mail-ed1-x532.google.com with SMTP id 4fb4d7f45d1cf-53f6ccea1eeso2041888a12.3 for ; Thu, 26 Oct 2023 11:06:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1698343601; x=1698948401; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=cdc7Sx5CtpbfN0J2PRPL/2aEjI/F3L5Qic5K6HYlIhg=; b=UGAzPXi3ss4NJz9Wu0DLCF/1oofPOyd/axiccupoMtKCgWS3SRmUBO2E+RMBKA8QLl aGifXO2Xatw0i77Y6ASwRnM9bHMCkPooAjVYsmtfVKVaihLcC74GIsgZrApA6mCbIJtW 0Gf/uy5OiNqtIZDeqcOX3N6obTmBaNXR4GKbhTEV5DGXEVb3HlvdMR/pVvvus+XfJwyu 7zgPGpC1LaKdJTwWod1dov1bC341ivrm4iwqlkTXtfe1dKpk9R5vy+MA6Fp5vO+DLyVt 03XVNZe3TbV5nSwKG6WyDT3QfDhJ7+SFC7Ei8FGtB5Xo2CZKVtjQvDKp4048Uw7Wlp9o OXjA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698343601; x=1698948401; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=cdc7Sx5CtpbfN0J2PRPL/2aEjI/F3L5Qic5K6HYlIhg=; b=SJXsXzYh0IT/PDU698WxT5aykyZqO+sWPm6plvFoGoFlSfMAS6x6wv15ZlhLiZNSsH smToWxcpJMXxWPfc1MO2Z/qGNZKfr8I4eweb3IEPAnuhycb8fJczNNXI793IJOC2DVvK i11SbmXJkirjuqSmkCg/yR7Mr1K6kHnO3OHIBqXsce22Vcu2oUmiACGmeyfJoGwCdsDz Ss83NsWxeQaifexuNDc6ZfBFaCb/Q6rLphLXORCZwWsrkq+Slveg2bw5Gz0m2YWpOrbt CC5eoKbohf7JcnAkW9G9dEd4n6VxM3chtWffyIL5d4VW0mysL92xxOcsdNyHIv12+V4k VNfg== X-Gm-Message-State: AOJu0Yx1+uOyWxPqHsFBYnlitYgUjj4KnLu3iJfeBSCwjmCOHm1jXugW 0lHqwQNFVvk5QObvli5ZghjrfuW983oP+BdsPE0= X-Received: by 2002:aa7:d806:0:b0:522:38cb:d8cb with SMTP id v6-20020aa7d806000000b0052238cbd8cbmr491141edq.20.1698343601134; Thu, 26 Oct 2023 11:06:41 -0700 (PDT) MIME-Version: 1.0 References: <20231026160100.195099-1-brgerst@gmail.com> <20231026160100.195099-3-brgerst@gmail.com> In-Reply-To: <20231026160100.195099-3-brgerst@gmail.com> From: Uros Bizjak Date: Thu, 26 Oct 2023 20:06:30 +0200 Message-ID: Subject: Re: [PATCH v2 02/11] x86/stackprotector/64: Remove stack protector test script To: Brian Gerst Cc: linux-kernel@vger.kernel.org, x86@kernel.org, Ingo Molnar , Thomas Gleixner , Borislav Petkov , "H . Peter Anvin" , Peter Zijlstra Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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 autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.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 (fry.vger.email [0.0.0.0]); Thu, 26 Oct 2023 11:07:05 -0700 (PDT) On Thu, Oct 26, 2023 at 6:01=E2=80=AFPM Brian Gerst wro= te: > > 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 Reviewed-by: Uros Bizjak > --- > arch/x86/Kconfig | 2 +- > scripts/gcc-x86_64-has-stack-protector.sh | 4 ---- > 2 files changed, 1 insertion(+), 5 deletions(-) > delete mode 100755 scripts/gcc-x86_64-has-stack-protector.sh > > diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig > index 039872be1630..92144c6f26d2 100644 > --- a/arch/x86/Kconfig > +++ b/arch/x86/Kconfig > @@ -410,7 +410,7 @@ config PGTABLE_LEVELS > > config CC_HAS_SANE_STACKPROTECTOR > bool > - default $(success,$(srctree)/scripts/gcc-x86_64-has-stack-protect= or.sh $(CC) $(CLANG_FLAGS)) if 64BIT > + default y if 64BIT > default $(cc-option,-mstack-protector-guard-reg=3Dfs -mstack-prot= ector-guard-symbol=3D__stack_chk_guard) > help > We have to make sure stack protector is unconditionally disable= d if > 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=3Dkernel -fno-PIE -fstack-protector - -o - 2> /dev/null | grep -q= "%gs" > -- > 2.41.0 >