[PATCH 0/3] x86: Add --enable-cet=permissive

H.J. Lu hjl.tools@gmail.com
Wed Apr 29 20:29:41 GMT 2020


On Wed, Apr 29, 2020 at 11:27 AM Adhemerval Zanella via Libc-alpha
<libc-alpha@sourceware.org> wrote:
>
>
>
> On 28/04/2020 18:52, H.J. Lu via Libc-alpha wrote:
> > When CET is enabled, it is an error to dlopen a non CET enabled shared
> > library in CET enabled application.  It may be desirable to make CET
> > permissive, that is disable CET when dlopening a non CET enabled shared
> > library.  With the new --enable-cet=permissive configure option, CET is
> > disabled when dlopening a non CET enabled shared library.
>
> Does not CET already provide a tunable to make it permissive? If the idea

Yes, it can be controlled by a tunable.

> is to enable as de-facto for a distro bootstrap, why not make it default
> then?

A distro can choose CET control default to permissive or enforced at build time.

> >
> > To support --enable-cet=permissive, CET_MAX is renamed to
> > CET_CONTROL_MASK and <dl-procruntime.c> is included in rtld.c to get
> > architecture specific initializer in rtld_global.
> >
> > H.J. Lu (3):
> >   CET: Rename CET_MAX to CET_CONTROL_MASK [BZ #25887]
> >   rtld: Get architecture specific initializer in rtld_global
> >   x86: Add --enable-cet=permissive
> >
> >  INSTALL                              | 26 +++++++++++--------
> >  config.h.in                          |  3 +++
> >  elf/rtld.c                           |  2 ++
> >  manual/install.texi                  | 12 ++++++---
> >  sysdeps/unix/sysv/linux/x86/Makefile |  2 +-
> >  sysdeps/x86/Makefile                 | 18 +++++++++----
> >  sysdeps/x86/cet-tunables.h           | 22 ++++++++++++++--
> >  sysdeps/x86/configure                | 21 ++++++++-------
> >  sysdeps/x86/configure.ac             | 19 +++++++-------
> >  sysdeps/x86/cpu-features.c           |  7 +++--
> >  sysdeps/x86/cpu-tunables.c           | 39 +++++++++++-----------------
> >  sysdeps/x86/dl-cet.c                 |  6 ++---
> >  sysdeps/x86/dl-procruntime.c         |  5 ++++
> >  sysdeps/x86/tst-cet-legacy-5.c       | 25 ++++++++++++------
> >  sysdeps/x86/tst-cet-legacy-6.c       | 25 ++++++++++++------
> >  15 files changed, 141 insertions(+), 91 deletions(-)
> >



-- 
H.J.


More information about the Libc-alpha mailing list