From patchwork Fri Jan 5 16:36:40 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Adhemerval Zanella X-Patchwork-Id: 760228 Delivered-To: patch@linaro.org Received: by 2002:a5d:678d:0:b0:336:6142:bf13 with SMTP id v13csp131698wru; Fri, 5 Jan 2024 08:37:11 -0800 (PST) X-Google-Smtp-Source: AGHT+IF3w1yh2UbwniAsdiA2vA6vFlpR8j/RtOPGN1hRoT0DjFkijNJrnFo1ydwMqTfOmRLJLCr5 X-Received: by 2002:a05:620a:578:b0:77f:604b:b269 with SMTP id p24-20020a05620a057800b0077f604bb269mr1960702qkp.156.1704472631597; Fri, 05 Jan 2024 08:37:11 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1704472631; cv=pass; d=google.com; s=arc-20160816; b=gLDV91JYZwXV5gKfa50g9eBwF4i3ufiU5FrlmsfVzCSICIaXw3BO4A+M1JGFvTlK+c b4hKgMKiTXHOkTikNJPk2eHHSqR7W2CAI0Ypr7gzKm0rgVdFcowyMYDxavjowViEOWF6 RVr++MwIwBGVTLWQMBG+CZjIhdZO2tH8u2OJ9uVIKzkJ/UZsC+pBlHRP/TpXeJOG8ZKR D4qHI7642F3jPOOYajzf6EjQO93MNfDVG4VKn9ZJtdBiUWzkW87yZXgvi0X3dfZq//Q8 t9yHUqBX87ehVXLqaUWNJtvSQ0JJzFCKuFf8A547BHpluL5GeT1fJX/pea9FAhPWkGtg wpzw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature:arc-filter:dmarc-filter:delivered-to; bh=Ji7xg97AFdgkateue1xuOLI3g0YONugC53KO3iteVoU=; fh=qNpUks/TopiPZxY8eC/gxlafjz4HRhxj0r0Qc3ttvcE=; b=qpN+poVBJtgqlK/99fbeY4zjsJ2ebXP4YUyEm7/IgIWDAdz3HaJ4o9rjWUAP8CE0hS cpHsAT3HO7Nkx8aWCftWCY9WpXQVKihMepL2NI4y5jtozwtATd550ff+BJ600GLNy6AI yFW1v0xl9ErhzlArTty4E4/HvMwEdAGG/9T/n8u7rhFPww0a4YltUMLPFaOpnI151sGV TGs+54EZP/x8bFoucDLhx6Y1KoV1s5sK+CBCqh0CpS2qcnAu3OJ+kssqPis2eIuJjJuM Dv12T0USrkLiSn3IOh+dROqmFbY86zCBARoWS/jORvw3lVT4hX45XxvFv5R6rEHk41+q 4AMA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="A4Y9yNM/"; arc=pass (i=1); spf=pass (google.com: domain of libc-alpha-bounces+patch=linaro.org@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="libc-alpha-bounces+patch=linaro.org@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from server2.sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id dv9-20020a05620a1b8900b0077efd5a9f39si2253748qkb.143.2024.01.05.08.37.11 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Jan 2024 08:37:11 -0800 (PST) Received-SPF: pass (google.com: domain of libc-alpha-bounces+patch=linaro.org@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="A4Y9yNM/"; arc=pass (i=1); spf=pass (google.com: domain of libc-alpha-bounces+patch=linaro.org@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="libc-alpha-bounces+patch=linaro.org@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 2899F3857011 for ; Fri, 5 Jan 2024 16:37:11 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-pl1-x632.google.com (mail-pl1-x632.google.com [IPv6:2607:f8b0:4864:20::632]) by sourceware.org (Postfix) with ESMTPS id 437433857B93 for ; Fri, 5 Jan 2024 16:36:53 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 437433857B93 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=linaro.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 437433857B93 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::632 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1704472615; cv=none; b=SjxDhJkthBYvyJfmxx+jwQ9owyELjkzwYBLhUkqboLc0VKvGLVABPOZa1oMKjd5R95iMczp8YF/rhOU7kk0bw58CA0nirwM8HlJBx4Hk0m1MiIfLuyLx/AB4YrRz1g8sPHYlZaBXKLcZxcdcCoqvpCHx1B/krPywUM5LI7Nu05U= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1704472615; c=relaxed/simple; bh=K6cSesDsy3b0SIE9IjSH6OtOaweOAbA0NduDe/wSvcI=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=CNE2eU3coSUhI4J6uX63tkUxmWaqxw2KBffIZCtz/eDU+IlWP8POCKlmCUz7H9G3jKNbPhJZA/TBnCTshQ5jHKb+3iBuHZ6sF8xsdgKRVLl+ke63MxeFWCQWIkRA8p7E4+ZhojWsqlaqWfO97jaoOWXbLKBBrW71C93H4ONazSE= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-pl1-x632.google.com with SMTP id d9443c01a7336-1d480c6342dso12361505ad.2 for ; Fri, 05 Jan 2024 08:36:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1704472612; x=1705077412; darn=sourceware.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=Ji7xg97AFdgkateue1xuOLI3g0YONugC53KO3iteVoU=; b=A4Y9yNM/7VOhMY/5+w60vZwuhdWciil8QcOAsRAwxt1se94ZxxKovQSYf4KTcgExQF WtWri6T02PCWsDLgyFiGAkp9oGV5mabbVLHCDHaXmZrrOrCqeXDsGG4+C57luQ+TF1J3 IhLx46wUsY98Qx+x41avNGzDd+BHlaZNUzlZSY5b2lDX4vpoRRgNMZOPCAKknfEgifEr SmQ6ySECbmZZKl/IZ6C4t+/UoNo2Ihj10z+um8Pnn8JZqxv4dmNKZOLwqG+0uv+SeXjt +KmF4PLI4mmQEo8jklcPWk4g+D0ZDUacCk7IDFK7NoEvr6RXCZA1GZ2nHp8anSBQ2yBj RK6w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704472612; x=1705077412; 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=Ji7xg97AFdgkateue1xuOLI3g0YONugC53KO3iteVoU=; b=SOTHwsJneM7GAZv1yXP+LZ0guyAsk96SO3Mtiy3uuRqj7cPer//ouyhUlEqNjmJq5W 2VUx6IasCQED+bU68IU/NaIvOB2k9cGsOqoAQDMXucSwYWg1TjNSuObIkAIQDNLca42k cdctVCfVQOLU1ju9t8oj3cac1LNflA76ejzIAzDlMnIvw5rHH9c341jFyraMiH4gJ/ZN c6vFugL2VOw1p9DH0wpUub1H2LboF7Mk0ZuSruVaqsns0eXCxLt45M3A3W/m/Y1gb8Fw krCtoq/zVw+OpPl/XL89F21nzpRlKbOaAW1+CU5A9yU19TfJrCkYMkXuhUqv+A/VaoLr nz9Q== X-Gm-Message-State: AOJu0YwtYWr+un3VWli9sEb1ErqVijeuwux0AgcLVyIRWZTVej9QlETK s+p99T/XKfXpB1L2a5GL9RJKb/uvKyG5vdKpe5s5pVjlhj8= X-Received: by 2002:a17:902:ecc2:b0:1d0:acfc:a653 with SMTP id a2-20020a170902ecc200b001d0acfca653mr2591434plh.84.1704472611762; Fri, 05 Jan 2024 08:36:51 -0800 (PST) Received: from mandiga.. ([2804:1b3:a7c1:9dd2:6f94:a8f0:eddb:341]) by smtp.gmail.com with ESMTPSA id x9-20020a170902820900b001d46a313b42sm1592332pln.268.2024.01.05.08.36.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Jan 2024 08:36:50 -0800 (PST) From: Adhemerval Zanella To: libc-alpha@sourceware.org Cc: "H . J . Lu" , Noah Goldstein Subject: [PATCH v2 3/3] i386: Fail if configured with --enable-cet Date: Fri, 5 Jan 2024 13:36:40 -0300 Message-Id: <20240105163640.1205560-4-adhemerval.zanella@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240105163640.1205560-1-adhemerval.zanella@linaro.org> References: <20240105163640.1205560-1-adhemerval.zanella@linaro.org> MIME-Version: 1.0 X-Spam-Status: No, score=-12.3 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, 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 server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libc-alpha-bounces+patch=linaro.org@sourceware.org Since it is only supported for x86_64. Checked on i686-linux-gnu. --- INSTALL | 3 +-- NEWS | 4 ++-- manual/install.texi | 3 +-- sysdeps/i386/configure | 8 ++++---- sysdeps/i386/configure.ac | 7 ++++--- 5 files changed, 12 insertions(+), 13 deletions(-) diff --git a/INSTALL b/INSTALL index be3697c62f..f194f14ec2 100644 --- a/INSTALL +++ b/INSTALL @@ -147,8 +147,7 @@ if ‘CFLAGS’ is specified it must enable optimization. For example: ‘--enable-cet=permissive’, CET is disabled when dlopening a non CET enabled shared library in CET enabled application. - NOTE: ‘--enable-cet’ has been tested for x86_64 and x32 on non-CET - and CET processors. + NOTE: ‘--enable-cet’ is only supported on x86_64 and x32. ‘--enable-memory-tagging’ Enable memory tagging support if the architecture supports it. diff --git a/NEWS b/NEWS index 17110e7b88..d75798a15b 100644 --- a/NEWS +++ b/NEWS @@ -9,8 +9,8 @@ Version 2.39 Major new features: -* Sync with Linux kernel 6.6 shadow stack interface. Since only x86-64 - is supported, --enable-cet is ignored for i386. +* Sync with Linux kernel 6.6 shadow stack interface. The --enable-cet + configure option in only supported on x86-64. * struct statvfs now has an f_type member, equal to the f_type statfs member; on the Hurd this was always available under a reserved name, diff --git a/manual/install.texi b/manual/install.texi index f752f6489d..ccfa16fde3 100644 --- a/manual/install.texi +++ b/manual/install.texi @@ -175,8 +175,7 @@ enabled shared library in CET enabled application. With @option{--enable-cet=permissive}, CET is disabled when dlopening a non CET enabled shared library in CET enabled application. -NOTE: @option{--enable-cet} has been tested for x86_64 and x32 -on non-CET and CET processors. +NOTE: @option{--enable-cet} is only supported on x86_64 and x32. @item --enable-memory-tagging Enable memory tagging support if the architecture supports it. When diff --git a/sysdeps/i386/configure b/sysdeps/i386/configure index cd63d314fa..84656cef6e 100644 --- a/sysdeps/i386/configure +++ b/sysdeps/i386/configure @@ -1,10 +1,10 @@ # This file is generated from configure.ac by Autoconf. DO NOT EDIT! # Local configure fragment for sysdeps/i386. -# CET is only supported for x86-64. Set enable-cet to "no" to allow -# "ifneq ($(enable-cet),no)" in x86 Makefiles. -config_vars="$config_vars -enable-cet = "no"" +# CET is only supported for x86-64. +if test $enable_cet != no; then + as_fn_error $? "\"CET is only supported on x86_64 or x32\"" "$LINENO" 5 +fi # We no longer support i386 since it lacks the atomic instructions # required to implement NPTL threading. diff --git a/sysdeps/i386/configure.ac b/sysdeps/i386/configure.ac index b7d9436557..7f68e6210a 100644 --- a/sysdeps/i386/configure.ac +++ b/sysdeps/i386/configure.ac @@ -1,9 +1,10 @@ GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. # Local configure fragment for sysdeps/i386. -# CET is only supported for x86-64. Set enable-cet to "no" to allow -# "ifneq ($(enable-cet),no)" in x86 Makefiles. -LIBC_CONFIG_VAR([enable-cet], ["no"]) +# CET is only supported for x86-64. +if test $enable_cet != no; then + AC_MSG_ERROR(["CET is only supported on x86_64 or x32"]) +fi # We no longer support i386 since it lacks the atomic instructions # required to implement NPTL threading.