From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1791) id 3ED933858C74; Tue, 9 Jan 2024 17:19:34 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3ED933858C74 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1704820774; bh=JUUgRL4+3619ngsMu+a2Di4YW3cnvnp/vyH/wcNKSJ4=; h=From:To:Subject:Date:From; b=IVKJLyNoQvNo9S7QmimHX5QW0ghGdgmmWAa1yvbBccx+acubqdXGLVup43HO84GQH A4S2mpDeiB969K8m6UqoCqtRXCDPRWIWs9SWrBn7xeuIgfMD5/3xty4CmlQEkHGlkS /to4zUyJpZQr8cTjBJFEclxUDClF+L5fSAXT4oaU= MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="utf-8" From: Adhemerval Zanella To: glibc-cvs@sourceware.org Subject: [glibc] i386: Fail if configured with --enable-cet X-Act-Checkin: glibc X-Git-Author: Adhemerval Zanella X-Git-Refname: refs/heads/master X-Git-Oldrev: 25f1e16ef03a6a8fb1701c4647d46c564480d88c X-Git-Newrev: a0cfc48e8a67506e3f0b2d3ea5e04b45408b3683 Message-Id: <20240109171934.3ED933858C74@sourceware.org> Date: Tue, 9 Jan 2024 17:19:34 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=a0cfc48e8a67506e3f0b2d3ea5e04b45408b3683 commit a0cfc48e8a67506e3f0b2d3ea5e04b45408b3683 Author: Adhemerval Zanella Date: Fri Jan 5 10:41:03 2024 -0300 i386: Fail if configured with --enable-cet Since it is only supported for x86_64. Checked on i686-linux-gnu. Diff: --- 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 ef52d749ff..f0a891a9e0 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 1129f7c952..83ae627f47 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 9e98a6fac4..a9aed91566 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.