Received: by 2002:a05:7412:a9a2:b0:e2:908c:2ebd with SMTP id o34csp622500rdh; Thu, 26 Oct 2023 10:59:35 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEkBoq1fR+pnwZwfBvay41CZk49BXG/icyCaE4ZNnKN8FtcE3pMe7Hf/ZcVadhAqEp2Ysmk X-Received: by 2002:a81:ad4c:0:b0:5a7:b782:6dd9 with SMTP id l12-20020a81ad4c000000b005a7b7826dd9mr188903ywk.26.1698343174998; Thu, 26 Oct 2023 10:59:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698343174; cv=none; d=google.com; s=arc-20160816; b=lRn7UF6dHO8NErubaBWqkkzlK+rBlSjZXbjJ9rtksRoxBd5dQtNQ6h+jxE6xU9X9tW jk8UQG+ql+sWaqZLeU+SLTc+ZOcXKr7x5j2qkHpT+avzAJnFU95Cc6xBucFue+VZHFyU 83h7Ybf+qvL1lAOkBRTVZHEPK6t7BozUdCLphhOuw5eaHbqhqZcCxKsbvC7CqqtKraiO WP8LmPSKSsxxpEjcpt2rp/kzvZXowoXoJExqUVJyKt7K91VAg7xM5kpWV6bgSgPMgvEd Wi1EebcAaXthL+wPZuAD8IK8l/jxeUkbLPrg2868EWuoykT0vGu6E1kgMlVv2r4eDrQG rG7w== 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=1w/kSr2KveuTw8WecJoTR/o4YptbqW7cASbxPYo+p8w=; fh=OeqABZGhkWuMQua3HfO6T/DfmgPwdiEhScz9hFdobNs=; b=XsWTnBCIkNiVmaFinNuUSEJ3/8X68GC5nsKIl1o0DPwRHg38g2n48HU2tS2XSxca8J mxvd8afs4SJcTPxMhm3bgjoM/cfWfx2UeDGBNttTM1G9P6Ay7JoSH07pDmBu4qzUV2oK GwLYsnaxacSoP8aieevUEENfN7acpaimWjgFj0cj9h9mQ/OwrVtlgNJu5oYJ+h0Na8fH pg6ArIkJBV+6A2tBHU6PMawxppEK+Zu4fikKhLpKk0pF+YLN5P61x58FBnu8BWMMJn01 lXhLc0+f50lTyi0gnWixMZ4FV7MuUn/vboqOPav+O4reUgzTf+NtorRr2v818nGqcgRK 60Fg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=lcnuQEzf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 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 snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id o7-20020a0de507000000b0059ea6c982bdsi14946457ywe.490.2023.10.26.10.59.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 Oct 2023 10:59:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=lcnuQEzf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 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 snail.vger.email (Postfix) with ESMTP id 98FF3819DFD1; Thu, 26 Oct 2023 10:59:32 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344711AbjJZR7b (ORCPT + 99 others); Thu, 26 Oct 2023 13:59:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57042 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230330AbjJZR7a (ORCPT ); Thu, 26 Oct 2023 13:59:30 -0400 Received: from mail-ed1-x52a.google.com (mail-ed1-x52a.google.com [IPv6:2a00:1450:4864:20::52a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B72351B6 for ; Thu, 26 Oct 2023 10:59:27 -0700 (PDT) Received: by mail-ed1-x52a.google.com with SMTP id 4fb4d7f45d1cf-53dd752685fso1866207a12.3 for ; Thu, 26 Oct 2023 10:59:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1698343166; x=1698947966; 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=1w/kSr2KveuTw8WecJoTR/o4YptbqW7cASbxPYo+p8w=; b=lcnuQEzfrJlCi5aTZf89r9olWQZtS6LevgFq8d1qM1jQcZsOs7mTl7qbq1A3kh5mmb 0WfRy3uctfn0Z3We8qU0WLXb9//Jhhxsim991tv89jT6BfNv1ND9tR4LdTzAp+6Qx5UG 40Nv7+LooBaOIyZj/oVSLSEGp61YoX6eUFNlrqKX/4KqHqw1JiHrFuP9OklUNdZsYR2S 3/Itn8zDM3icWHCLX02gCU3KbXpRAm24OpePgPFItVAWqD97CldZ6NdT7XNEn3dn9jOH 7darBO2Mf29pBgPj56hdlneXawgwMInE2IN7wDBYpKCSwy01v4rVic3jjlM65KwmzsRs VQNA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698343166; x=1698947966; 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=1w/kSr2KveuTw8WecJoTR/o4YptbqW7cASbxPYo+p8w=; b=reIaibR+KFAwGsblx8YSEB/xoreqbKgAN43eeKOl+IzpqxY4EhpOc7qobVJHhyrvXR 5r03Fn44ar5pTnQJLgwP65ekdsNLj3r/heP/1YyV2NyVSFiqZ9SxBZxf1a4S21iT/k5F 45oXpE3OWOMMM1cPIhR1rkWyQiGnDY+rFKsJ5fdslMvzSeSxZZXUGy6n4lV6/76Kd1US RMRuXq4qtvCBX4Xg2F/12/P4/RdhX0wDBPulWXwYBWb6PFVgLW/Hy8qujuNFlkFOUeKM tg5B05HlhtMpBNjpHEyffv8UU4nA8tykLWzIPZLh+pQDAFxGzhaUvh2KOoQbMqkNaDUa skWg== X-Gm-Message-State: AOJu0YyuSqSp1Sb0bJnFj4XfxAo+HOQ3IObym+pHCShzZvlYC4u0s9AM iGpIrzKfJuC5y1zcWo36fXAwDB5h/g7VHoQ4l4I= X-Received: by 2002:a50:9ecb:0:b0:53f:ef3b:adbb with SMTP id a69-20020a509ecb000000b0053fef3badbbmr479225edf.2.1698343165868; Thu, 26 Oct 2023 10:59:25 -0700 (PDT) MIME-Version: 1.0 References: <20231026160100.195099-1-brgerst@gmail.com> <20231026160100.195099-2-brgerst@gmail.com> In-Reply-To: <20231026160100.195099-2-brgerst@gmail.com> From: Uros Bizjak Date: Thu, 26 Oct 2023 19:59:14 +0200 Message-ID: Subject: Re: [PATCH v2 01/11] x86/stackprotector/32: 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=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Thu, 26 Oct 2023 10:59:32 -0700 (PDT) On Thu, Oct 26, 2023 at 6:01=E2=80=AFPM Brian Gerst wro= te: > > Test for compiler support directly in Kconfig. > > Signed-off-by: Brian Gerst Reviewed-by: Uros Bizjak > --- > arch/x86/Kconfig | 2 +- > scripts/gcc-x86_32-has-stack-protector.sh | 8 -------- > 2 files changed, 1 insertion(+), 9 deletions(-) > delete mode 100755 scripts/gcc-x86_32-has-stack-protector.sh > > diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig > index 5ef081aa12ac..039872be1630 100644 > --- a/arch/x86/Kconfig > +++ b/arch/x86/Kconfig > @@ -411,7 +411,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 $(success,$(srctree)/scripts/gcc-x86_32-has-stack-protect= or.sh $(CC) $(CLANG_FLAGS)) > + 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 > the compiler produces broken code or if it does not let us cont= rol > diff --git a/scripts/gcc-x86_32-has-stack-protector.sh b/scripts/gcc-x86_= 32-has-stack-protector.sh > deleted file mode 100755 > index 825c75c5b715..000000000000 > --- a/scripts/gcc-x86_32-has-stack-protector.sh > +++ /dev/null > @@ -1,8 +0,0 @@ > -#!/bin/sh > -# SPDX-License-Identifier: GPL-2.0 > - > -# This requires GCC 8.1 or better. Specifically, we require > -# -mstack-protector-guard-reg, added by > -# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D81708 > - > -echo "int foo(void) { char X[200]; return 3; }" | $* -S -x c -c -m32 -O0= -fstack-protector -mstack-protector-guard-reg=3Dfs -mstack-protector-guard= -symbol=3D__stack_chk_guard - -o - 2> /dev/null | grep -q "%fs" > -- > 2.41.0 >