From mboxrd@z Thu Jan 1 00:00:00 1970 From: ebiederm@xmission.com (Eric W. Biederman) Subject: Re: Kernel stack read with PTRACE_EVENT_EXIT and io_uring threads Date: Wed, 23 Jun 2021 09:36:45 -0500 Message-ID: <87sg18abr6.fsf@disp2133> References: <924ec53c-2fd9-2e1c-bbb1-3fda49809be4@gmail.com> <87eed4v2dc.fsf@disp2133> <5929e116-fa61-b211-342a-c706dcb834ca@gmail.com> <87fsxjorgs.fsf@disp2133> <87h7hpbojt.fsf@disp2133> <20c787ec-4a3c-061c-c649-5bc3e7ef0464@gmail.com> <55bdad37-187b-e1f5-a359-c5206b20ff4d@gmail.com> Mime-Version: 1.0 Return-path: In-Reply-To: <55bdad37-187b-e1f5-a359-c5206b20ff4d@gmail.com> (Michael Schmitz's message of "Wed, 23 Jun 2021 17:26:22 +1200") List-ID: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Michael Schmitz Cc: Linus Torvalds , Al Viro , linux-arch , Jens Axboe , Oleg Nesterov , Linux Kernel Mailing List , Richard Henderson , Ivan Kokshaysky , Matt Turner , alpha , Geert Uytterhoeven , linux-m68k , Arnd Bergmann , Tejun Heo , Kees Cook , Tetsuo Handa , John Paul Adrian Glaubitz Michael Schmitz writes: > Hi Eric, > > Am 23.06.2021 um 09:48 schrieb Michael Schmitz: >>> >>> The challenging ones are /proc/pid/syscall and seccomp which want to see >>> all of the system call arguments. I think every architecture always >>> saves the system call arguments unconditionally, so those cases are >>> probably not as interesting. But they certain look like they could be >>> trouble. >> >> Seccomp hasn't yet been implemented on m68k, though I'm working on that >> with Adrian. The sole secure_computing() call will happen in >> syscall_trace_enter(), so all system call arguments have been saved on >> the stack. >> >> Haven't looked at /proc/pid/syscall yet ... > > Not supported at present (no HAVE_ARCH_TRACEHOOK for m68k). And the > syscall_get_arguments I wrote for seccomp support only copies the first five > data registers, which are always saved. Yes. It is looking like I can fix everything generically except for faking user space registers for io_uring threads. Eric