From: "H.J. Lu" <hjl.tools@gmail.com>
To: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Cc: libc-alpha@sourceware.org, Noah Goldstein <goldstein.w.n@gmail.com>
Subject: Re: [PATCH v3 3/3] i386: Fail if configured with --enable-cet
Date: Mon, 8 Jan 2024 06:56:04 -0800 [thread overview]
Message-ID: <CAMe9rOrPhdQjrkCpmDieH60O97sVWqcxqWAVdBSJQdqAQE5OkQ@mail.gmail.com> (raw)
In-Reply-To: <20240108125025.1389849-4-adhemerval.zanella@linaro.org>
On Mon, Jan 8, 2024 at 4:50 AM Adhemerval Zanella
<adhemerval.zanella@linaro.org> wrote:
>
> 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.
> --
> 2.34.1
>
LGTM.
Thanks.
--
H.J.
prev parent reply other threads:[~2024-01-08 14:56 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-08 12:50 [PATCH v3 0/3] x86: Move CET infrastructure to x86_64 Adhemerval Zanella
2024-01-08 12:50 ` [PATCH v3 1/3] " Adhemerval Zanella
2024-01-08 14:54 ` H.J. Lu
2024-01-09 17:59 ` H.J. Lu
2024-01-09 18:13 ` Adhemerval Zanella Netto
2024-01-09 18:29 ` H.J. Lu
2024-01-08 12:50 ` [PATCH v3 2/3] i386: Remove CET support Adhemerval Zanella
2024-01-08 14:55 ` H.J. Lu
2024-01-08 12:50 ` [PATCH v3 3/3] i386: Fail if configured with --enable-cet Adhemerval Zanella
2024-01-08 14:56 ` H.J. Lu [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAMe9rOrPhdQjrkCpmDieH60O97sVWqcxqWAVdBSJQdqAQE5OkQ@mail.gmail.com \
--to=hjl.tools@gmail.com \
--cc=adhemerval.zanella@linaro.org \
--cc=goldstein.w.n@gmail.com \
--cc=libc-alpha@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).