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: 83407 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id EABE13861867 for ; Fri, 5 Jan 2024 16:37:27 +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-Google-Smtp-Source: AGHT+IHIxoAZuZWkRUZMB0pbnJfuI60I1Zc5WrLl23/fKHDUgENW/W/qSqSOaYqApE+UoHDSFtIfKQ== 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+patchwork=sourceware.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.