From: "Edgecombe, Rick P" <rick.p.edgecombe@intel.com>
To: "hjl.tools@gmail.com" <hjl.tools@gmail.com>
Cc: "bsingharora@gmail.com" <bsingharora@gmail.com>,
"hpa@zytor.com" <hpa@zytor.com>,
"Syromiatnikov, Eugene" <esyr@redhat.com>,
"peterz@infradead.org" <peterz@infradead.org>,
"rdunlap@infradead.org" <rdunlap@infradead.org>,
"keescook@chromium.org" <keescook@chromium.org>,
"Yu, Yu-cheng" <yu-cheng.yu@intel.com>,
"Eranian, Stephane" <eranian@google.com>,
"kirill.shutemov@linux.intel.com"
<kirill.shutemov@linux.intel.com>,
"dave.hansen@linux.intel.com" <dave.hansen@linux.intel.com>,
"linux-mm@kvack.org" <linux-mm@kvack.org>,
"fweimer@redhat.com" <fweimer@redhat.com>,
"nadav.amit@gmail.com" <nadav.amit@gmail.com>,
"jannh@google.com" <jannh@google.com>,
"dethoma@microsoft.com" <dethoma@microsoft.com>,
"kcc@google.com" <kcc@google.com>,
"linux-arch@vger.kernel.org" <linux-arch@vger.kernel.org>,
"bp@alien8.de" <bp@alien8.de>,
"oleg@redhat.com" <oleg@redhat.com>,
"Yang, Weijiang" <weijiang.yang@intel.com>,
"Lutomirski, Andy" <luto@kernel.org>,
"jamorris@linux.microsoft.com" <jamorris@linux.microsoft.com>,
"arnd@arndb.de" <arnd@arndb.de>,
"akpm@linux-foundation.org" <akpm@linux-foundation.org>,
"pavel@ucw.cz" <pavel@ucw.cz>,
"mike.kravetz@oracle.com" <mike.kravetz@oracle.com>,
"x86@kernel.org" <x86@kernel.org>,
"linux-doc@vger.kernel.org" <linux-doc@vger.kernel.org>,
"tglx@linutronix.de" <tglx@linutronix.de>,
"john.allen@amd.com" <john.allen@amd.com>,
"rppt@kernel.org" <rppt@kernel.org>,
"mingo@redhat.com" <mingo@redhat.com>,
"Shankar, Ravi V" <ravi.v.shankar@intel.com>,
"corbet@lwn.net" <corbet@lwn.net>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-api@vger.kernel.org" <linux-api@vger.kernel.org>,
"gorcunov@gmail.com" <gorcunov@gmail.com>
Subject: Re: [RFC 37/37] fs/binfmt_elf: Block old shstk elf bit
Date: Mon, 7 Nov 2022 22:46:52 +0000 [thread overview]
Message-ID: <2f8fe2ede43909ea3c51ff05f7dae5f63d5ed8c8.camel@intel.com> (raw)
In-Reply-To: <CAMe9rOr1XpnisqWHh6C6Wi6tUAu5avhbKb_7E7ZpN_eMkktTww@mail.gmail.com>
On Mon, 2022-11-07 at 13:47 -0800, H.J. Lu wrote:
> On Mon, Nov 7, 2022 at 1:34 PM Edgecombe, Rick P
> <rick.p.edgecombe@intel.com> wrote:
> >
> > On Mon, 2022-11-07 at 13:21 -0800, H.J. Lu wrote:
> > > > > Some applications and libraries are compiled with -fcf-
> > > > > protection,
> > > > > but
> > > > > they manipulate the stack in such a way that they aren't
> > > > > compatible
> > > > > with the shadow stack. However, if the build/test setup
> > > > > doesn't
> > > > > support
> > > > > shadow stack, it is impossible to validate.
> > > > >
> > > >
> > > > When we have everything in place, the problems would be much
> > > > more
> > > > obvious when distros started turning it on. But we can't turn
> > > > it on
> > > > as
> > >
> > > Not necessarily. The problem will show up only in a CET enabled
> > > environment since build/test setup may not be on a CET capable
> > > hardware.
> >
> > Well, I'm not sure of the details of distro testing, but there are
> > plenty of TGL and later systems out there today. With kernel
> > support,
> > I'm thinking these types of problems couldn't lurk for years like
> > they
> > have.
>
> If this is the case, we would have nothing to worry about since the
> CET
> enabled applications won't pass validation if they aren't CET
> compatible.
Hmm, I think you couldn't have already forgotten the problem binaries
are already shipped...
>
> > >
> > > > planned without breaking things for existing binaries. We can
> > > > have
> > > > both
> > > > by:
> > > > 1. Choosing a new bit, adding it to the tools, and never
> > > > supporting
> > > > the
> > > > old bit in glibc.
> > > > 2. Providing the option to have the kernel block the old bit,
> > > > so
> > > > upgraded users can decide what experience they would like. Then
> > > > distros
> > > > can find the problems and adjust their packages. I'm starting
> > > > to
> > > > think
> > > > a default off sysctl toggle might be better than a Kconfig.
> > > > 3. Any other ideas?
> > >
> > > Don't enable CET in glibc until we can validate CET
> > > functionality.
> >
> > Can you elaborate on what you mean by this? Not upstream glibc CET
> > support? Or have users not enable it? If the latter, how would they
> > know about all these problems.
>
> The current glibc doesn't support CET. To enable CET in an
> application,
> one should validate it together with the CET enabled glibc under the
> CET
> enabled kernel on a CET capable machine.
Agreed that this is how it should have gone.
>
> >
> > And what is wrong with the cleanest option, number 1? The ABI
> > document
> > can be updated.
>
> It doesn't help resolve any issues.
Please read the coverletter if you are unsure of what issues this is
trying to address. I should have put more in the commit log.
next prev parent reply other threads:[~2022-11-07 22:47 UTC|newest]
Thread overview: 104+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-04 22:35 [PATCH v3 00/37] Shadow stacks for userspace Rick Edgecombe
2022-11-04 22:35 ` [PATCH v3 01/37] Documentation/x86: Add CET description Rick Edgecombe
2022-11-04 22:35 ` [PATCH v3 02/37] x86/cet/shstk: Add Kconfig option for Shadow Stack Rick Edgecombe
2022-11-04 22:35 ` [PATCH v3 03/37] x86/cpufeatures: Add CPU feature flags for shadow stacks Rick Edgecombe
2022-11-07 17:41 ` Borislav Petkov
2022-11-04 22:35 ` [PATCH v3 04/37] x86/cpufeatures: Enable CET CR4 bit for shadow stack Rick Edgecombe
2022-11-07 18:00 ` Borislav Petkov
2022-11-07 18:19 ` Edgecombe, Rick P
2022-11-07 18:37 ` Borislav Petkov
2022-11-07 19:19 ` Edgecombe, Rick P
2022-11-07 19:30 ` Borislav Petkov
2022-11-07 19:33 ` Edgecombe, Rick P
2022-11-04 22:35 ` [PATCH v3 05/37] x86/fpu/xstate: Introduce CET MSR and XSAVES supervisor states Rick Edgecombe
2022-11-04 22:35 ` [PATCH v3 06/37] x86/fpu: Add helper for modifying xstate Rick Edgecombe
2022-11-04 22:35 ` [PATCH v3 07/37] x86/cet: Add user control-protection fault handler Rick Edgecombe
2022-11-04 22:35 ` [PATCH v3 08/37] x86/mm: Remove _PAGE_DIRTY from kernel RO pages Rick Edgecombe
2022-11-04 22:35 ` [PATCH v3 09/37] x86/mm: Move pmd_write(), pud_write() up in the file Rick Edgecombe
2022-11-04 22:35 ` [PATCH v3 10/37] x86/mm: Introduce _PAGE_COW Rick Edgecombe
2022-11-04 22:35 ` [PATCH v3 11/37] x86/mm: Update pte_modify for _PAGE_COW Rick Edgecombe
2022-11-04 22:35 ` [PATCH v3 12/37] x86/mm: Update ptep_set_wrprotect() and pmdp_set_wrprotect() for transition from _PAGE_DIRTY to _PAGE_COW Rick Edgecombe
2022-11-04 22:35 ` [PATCH v3 13/37] mm: Move VM_UFFD_MINOR_BIT from 37 to 38 Rick Edgecombe
2022-11-15 11:20 ` Peter Zijlstra
2022-11-15 17:18 ` Edgecombe, Rick P
2022-11-04 22:35 ` [PATCH v3 14/37] mm: Introduce VM_SHADOW_STACK for shadow stack memory Rick Edgecombe
2022-11-04 22:35 ` [PATCH v3 15/37] x86/mm: Check Shadow Stack page fault errors Rick Edgecombe
2022-11-15 11:47 ` Peter Zijlstra
2022-11-15 20:03 ` Edgecombe, Rick P
2022-11-15 21:07 ` Peter Zijlstra
2022-11-15 23:13 ` Edgecombe, Rick P
2022-11-16 10:09 ` Peter Zijlstra
2022-11-04 22:35 ` [PATCH v3 16/37] x86/mm: Update maybe_mkwrite() for shadow stack Rick Edgecombe
2022-11-04 22:35 ` [PATCH v3 17/37] mm: Fixup places that call pte_mkwrite() directly Rick Edgecombe
2022-11-04 22:35 ` [PATCH v3 18/37] mm: Add guard pages around a shadow stack Rick Edgecombe
2022-11-15 12:04 ` Peter Zijlstra
2022-11-15 20:40 ` Edgecombe, Rick P
2022-11-15 20:56 ` Peter Zijlstra
2022-11-15 21:49 ` Edgecombe, Rick P
2022-11-04 22:35 ` [PATCH v3 19/37] mm/mmap: Add shadow stack pages to memory accounting Rick Edgecombe
2022-11-04 22:35 ` [PATCH v3 20/37] mm/mprotect: Exclude shadow stack from preserve_write Rick Edgecombe
2022-11-15 12:05 ` Peter Zijlstra
2022-11-15 20:41 ` Edgecombe, Rick P
2022-11-04 22:35 ` [PATCH v3 21/37] mm: Re-introduce vm_flags to do_mmap() Rick Edgecombe
2022-11-04 22:35 ` [PATCH v3 22/37] mm: Don't allow write GUPs to shadow stack memory Rick Edgecombe
2022-11-04 22:35 ` [PATCH v3 23/37] mm: Warn on shadow stack memory in wrong vma Rick Edgecombe
2022-11-04 22:35 ` [PATCH v3 24/37] x86: Introduce userspace API for CET enabling Rick Edgecombe
2022-11-15 12:26 ` Peter Zijlstra
2022-11-15 13:03 ` Peter Zijlstra
2022-11-15 20:55 ` Edgecombe, Rick P
2022-11-15 14:25 ` Peter Zijlstra
2022-11-15 20:55 ` Edgecombe, Rick P
2022-11-04 22:35 ` [PATCH v3 25/37] x86/shstk: Add user-mode shadow stack support Rick Edgecombe
2022-11-15 12:32 ` Peter Zijlstra
2022-11-15 21:46 ` Edgecombe, Rick P
2022-11-04 22:35 ` [PATCH v3 26/37] x86/shstk: Handle thread shadow stack Rick Edgecombe
2022-11-04 22:35 ` [PATCH v3 27/37] x86/shstk: Introduce routines modifying shstk Rick Edgecombe
2022-11-15 14:18 ` Peter Zijlstra
2022-11-15 23:42 ` Edgecombe, Rick P
2022-11-16 10:18 ` Peter Zijlstra
2022-11-16 22:38 ` Edgecombe, Rick P
2022-11-17 14:17 ` Peter Zijlstra
2022-11-18 17:05 ` Edgecombe, Rick P
2022-11-15 14:22 ` Peter Zijlstra
2022-11-15 20:56 ` Edgecombe, Rick P
2022-11-04 22:35 ` [PATCH v3 28/37] x86/shstk: Handle signals for shadow stack Rick Edgecombe
2022-11-04 22:35 ` [PATCH v3 29/37] x86/shstk: Introduce map_shadow_stack syscall Rick Edgecombe
2022-11-04 22:35 ` [PATCH v3 30/37] x86/shstk: Support wrss for userspace Rick Edgecombe
2022-11-04 22:35 ` [PATCH v3 31/37] x86: Expose thread features in /proc/$PID/status Rick Edgecombe
2022-11-04 22:35 ` [PATCH v3 32/37] x86/cet/shstk: Wire in CET interface Rick Edgecombe
2022-11-04 22:36 ` [PATCH v3 33/37] selftests/x86: Add shadow stack test Rick Edgecombe
2022-11-04 22:36 ` [PATCH v3 34/37] x86/fpu: Add helper for initing features Rick Edgecombe
2022-11-04 22:36 ` [PATCH v3 35/37] x86/cet: Add PTRACE interface for CET Rick Edgecombe
2022-11-15 14:43 ` Peter Zijlstra
2022-11-15 22:23 ` Edgecombe, Rick P
2022-11-17 12:25 ` Schimpe, Christina
2022-11-17 14:14 ` Peter Zijlstra
2022-11-18 17:20 ` Edgecombe, Rick P
2022-11-18 17:25 ` Schimpe, Christina
2022-11-17 19:57 ` Edgecombe, Rick P
2022-11-18 16:21 ` Schimpe, Christina
2022-11-18 17:18 ` Edgecombe, Rick P
2022-11-21 7:40 ` Mike Rapoport
2022-11-21 15:52 ` Edgecombe, Rick P
2022-11-22 9:36 ` Mike Rapoport
2022-11-04 22:36 ` [PATCH v3 36/37] x86/cet/shstk: Add ARCH_CET_UNLOCK Rick Edgecombe
2022-11-15 14:47 ` Peter Zijlstra
2022-11-15 20:01 ` Edgecombe, Rick P
2022-11-15 20:57 ` Peter Zijlstra
2022-11-15 21:00 ` Dave Hansen
2022-11-15 21:21 ` Peter Zijlstra
2022-11-04 22:36 ` [RFC 37/37] fs/binfmt_elf: Block old shstk elf bit Rick Edgecombe
2022-11-04 22:56 ` H.J. Lu
2022-11-06 9:33 ` Florian Weimer
2022-11-07 16:49 ` Edgecombe, Rick P
2022-11-07 16:55 ` Florian Weimer
2022-11-07 17:37 ` Edgecombe, Rick P
2022-11-07 19:10 ` H.J. Lu
2022-11-07 21:10 ` Edgecombe, Rick P
2022-11-07 21:21 ` H.J. Lu
2022-11-07 21:34 ` Edgecombe, Rick P
2022-11-07 21:47 ` H.J. Lu
2022-11-07 22:46 ` Edgecombe, Rick P [this message]
2022-11-07 23:45 ` H.J. Lu
2022-11-08 9:14 ` Florian Weimer
2022-11-07 16:49 ` Edgecombe, Rick P
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=2f8fe2ede43909ea3c51ff05f7dae5f63d5ed8c8.camel@intel.com \
--to=rick.p.edgecombe@intel.com \
--cc=akpm@linux-foundation.org \
--cc=arnd@arndb.de \
--cc=bp@alien8.de \
--cc=bsingharora@gmail.com \
--cc=corbet@lwn.net \
--cc=dave.hansen@linux.intel.com \
--cc=dethoma@microsoft.com \
--cc=eranian@google.com \
--cc=esyr@redhat.com \
--cc=fweimer@redhat.com \
--cc=gorcunov@gmail.com \
--cc=hjl.tools@gmail.com \
--cc=hpa@zytor.com \
--cc=jamorris@linux.microsoft.com \
--cc=jannh@google.com \
--cc=john.allen@amd.com \
--cc=kcc@google.com \
--cc=keescook@chromium.org \
--cc=kirill.shutemov@linux.intel.com \
--cc=linux-api@vger.kernel.org \
--cc=linux-arch@vger.kernel.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=luto@kernel.org \
--cc=mike.kravetz@oracle.com \
--cc=mingo@redhat.com \
--cc=nadav.amit@gmail.com \
--cc=oleg@redhat.com \
--cc=pavel@ucw.cz \
--cc=peterz@infradead.org \
--cc=ravi.v.shankar@intel.com \
--cc=rdunlap@infradead.org \
--cc=rppt@kernel.org \
--cc=tglx@linutronix.de \
--cc=weijiang.yang@intel.com \
--cc=x86@kernel.org \
--cc=yu-cheng.yu@intel.com \
/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 NNTP newsgroup(s).