[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHk-=wir2P6h+HKtswPEGDh+GKLMM6_h8aovpMcUHyQv2zJ5Og@mail.gmail.com>
Date: Tue, 15 Jun 2021 15:02:57 -0700
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: "Eric W. Biederman" <ebiederm@...ssion.com>
Cc: Michael Schmitz <schmitzmic@...il.com>,
linux-arch <linux-arch@...r.kernel.org>,
Jens Axboe <axboe@...nel.dk>, Oleg Nesterov <oleg@...hat.com>,
Al Viro <viro@...iv.linux.org.uk>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Richard Henderson <rth@...ddle.net>,
Ivan Kokshaysky <ink@...assic.park.msu.ru>,
Matt Turner <mattst88@...il.com>,
alpha <linux-alpha@...r.kernel.org>,
Geert Uytterhoeven <geert@...ux-m68k.org>,
linux-m68k <linux-m68k@...ts.linux-m68k.org>,
Arnd Bergmann <arnd@...nel.org>,
Ley Foon Tan <ley.foon.tan@...el.com>,
Tejun Heo <tj@...nel.org>, Kees Cook <keescook@...omium.org>
Subject: Re: [PATCH] alpha: Add extra switch_stack frames in exit, exec, and
kernel threads
On Tue, Jun 15, 2021 at 12:36 PM Eric W. Biederman
<ebiederm@...ssion.com> wrote:
>
> I looked and there nothing I can do that is not arch specific, so
> whack the moles with a minimal backportable fix.
>
> This change survives boot testing on qemu-system-alpha.
So as mentioned in the other thread, I think this patch is exactly right.
However, the need for this part
> @@ -785,6 +785,7 @@ ret_from_kernel_thread:
> mov $9, $27
> mov $10, $16
> jsr $26, ($9)
> + lda $sp, SWITCH_STACK_SIZE($sp)
> br $31, ret_to_user
> .end ret_from_kernel_thread
obviously eluded me in my "how about something like this", and I had
to really try to figure out why we'd ever return.
Which is why I came to that "oooh - kernel_execve()" realization.
It might be good to comment on that somewhere. And if you can think of
some other case, that should be mentioned too.
Anyway, thanks for looking into this odd case. And if you have a
test-case for this all, it really would be a good thing. Yes, it
should only affect a couple of odd-ball architectures, but still... It
would also be good to hear that you actually did verify the behavior
of this patch wrt that ptrace-of-io-worker-threads case..
Linus
Linus
Powered by blists - more mailing lists