[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YgDIIpCm3UITk896@lisas.de>
Date: Mon, 7 Feb 2022 08:20:02 +0100
From: Adrian Reber <adrian@...as.de>
To: Mike Rapoport <rppt@...nel.org>
Cc: Rick Edgecombe <rick.p.edgecombe@...el.com>, x86@...nel.org,
"H . Peter Anvin" <hpa@...or.com>,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>, linux-kernel@...r.kernel.org,
linux-doc@...r.kernel.org, linux-mm@...ck.org,
linux-arch@...r.kernel.org, linux-api@...r.kernel.org,
Arnd Bergmann <arnd@...db.de>,
Andy Lutomirski <luto@...nel.org>,
Balbir Singh <bsingharora@...il.com>,
Borislav Petkov <bp@...en8.de>,
Cyrill Gorcunov <gorcunov@...il.com>,
Dave Hansen <dave.hansen@...ux.intel.com>,
Eugene Syromiatnikov <esyr@...hat.com>,
Florian Weimer <fweimer@...hat.com>,
"H . J . Lu" <hjl.tools@...il.com>, Jann Horn <jannh@...gle.com>,
Jonathan Corbet <corbet@....net>,
Kees Cook <keescook@...omium.org>,
Mike Kravetz <mike.kravetz@...cle.com>,
Nadav Amit <nadav.amit@...il.com>,
Oleg Nesterov <oleg@...hat.com>, Pavel Machek <pavel@....cz>,
Peter Zijlstra <peterz@...radead.org>,
Randy Dunlap <rdunlap@...radead.org>,
"Ravi V . Shankar" <ravi.v.shankar@...el.com>,
Dave Martin <Dave.Martin@....com>,
Weijiang Yang <weijiang.yang@...el.com>,
"Kirill A . Shutemov" <kirill.shutemov@...ux.intel.com>,
joao.moreira@...el.com, John Allen <john.allen@....com>,
kcc@...gle.com, eranian@...gle.com,
Andrei Vagin <avagin@...il.com>,
Dmitry Safonov <0x7f454c46@...il.com>
Subject: Re: [PATCH 00/35] Shadow stacks for userspace
On Sun, Feb 06, 2022 at 08:42:03PM +0200, Mike Rapoport wrote:
> (added more CRIU people)
Thanks, Mike.
> On Sun, Jan 30, 2022 at 01:18:03PM -0800, Rick Edgecombe wrote:
> > This is a slight reboot of the userspace CET series. I will be taking over the
> > series from Yu-cheng. Per some internal recommendations, I’ve reset the version
> > number and am calling it a new series. Hopefully, it doesn’t cause confusion.
> >
> > The new plan is to upstream only userspace Shadow Stack support at this point.
> > IBT can follow later, but for now I’ll focus solely on the most in-demand and
> > widely available (with the feature on AMD CPUs now) part of CET.
> >
> > I thought as part of this reset, it might be useful to more fully write-up the
> > design and summarize the history of the previous CET series. So this slightly
> > long cover letter does that. The "Updates" section has the changes, if anyone
> > doesn't want the history.
[...]
> > CRIU Support
> > ------------
> > In the past there was some speculation on the mailing list about
> > whether CRIU would need to be taught about CET. It turns out, it does.
> > The first issue hit is that CRIU calls sigreturn directly from its
> > “parasite code” that it injects into the dumper process. This violates
> > this shadow stack implementation’s protection that intends to prevent
> > attackers from doing this.
> >
> > With so many packages already enabled with shadow stack, there is
> > probably desire to make it work seamlessly. But in the meantime if
> > distros want to support shadow stack and CRIU, users could manually
> > disabled shadow stack via “GLIBC_TUNABLES=glibc.cpu.x86_shstk=off” for
> > a process they will wants to dump. It’s not ideal.
> >
> > I’d like to hear what people think about having shadow stack in the
> > kernel without this resolved. Nothing would change for any users until
> > they enable shadow stack in the kernel and update to a glibc configured
> > with CET. Should CRIU userspace be solved before kernel support?
>From the CRIU side I can say that I would definitely like to see this
resolved. CRIU just went through a similar exercise with rseq() being
enabled in glibc and CI broke all around for us and other projects
relying on CRIU. Although rseq() was around for a long time we were not
aware of it but luckily 5.13 introduced a way to handle it for CRIU with
ptrace. An environment variable existed but did not really help when
CRIU is called somewhere in the middle of the container software stack.
>From my point of view a solution not involving an environment variable
would definitely be preferred.
Adrian
Powered by blists - more mailing lists