[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202109231839.33EF45C785@keescook>
Date: Thu, 23 Sep 2021 18:42:04 -0700
From: Kees Cook <keescook@...omium.org>
To: Vito Caputo <vcaputo@...garu.com>
Cc: Jann Horn <jannh@...gle.com>, Thomas Gleixner <tglx@...utronix.de>,
Josh Poimboeuf <jpoimboe@...hat.com>,
Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
"H. Peter Anvin" <hpa@...or.com>, Jens Axboe <axboe@...nel.dk>,
Mark Rutland <mark.rutland@....com>,
Peter Zijlstra <peterz@...radead.org>,
Stefan Metzmacher <metze@...ba.org>,
Andy Lutomirski <luto@...nel.org>,
Lai Jiangshan <laijs@...ux.alibaba.com>,
Christian Brauner <christian.brauner@...ntu.com>,
Andrew Morton <akpm@...ux-foundation.org>,
"Kenta.Tada@...y.com" <Kenta.Tada@...y.com>,
Daniel Bristot de Oliveira <bristot@...hat.com>,
Michael Weiß
<michael.weiss@...ec.fraunhofer.de>,
Anand K Mistry <amistry@...gle.com>,
Alexey Gladkov <legion@...nel.org>,
Michal Hocko <mhocko@...e.com>, Helge Deller <deller@....de>,
Dave Hansen <dave.hansen@...ux.intel.com>,
Andrea Righi <andrea.righi@...onical.com>,
Ohhoon Kwon <ohoono.kwon@...sung.com>,
Kalesh Singh <kaleshsingh@...gle.com>,
YiFei Zhu <yifeifz2@...inois.edu>,
"Eric W. Biederman" <ebiederm@...ssion.com>,
linux-kernel@...r.kernel.org, x86@...nel.org,
linux-fsdevel@...r.kernel.org, linux-hardening@...r.kernel.org
Subject: Re: [PATCH] proc: Disable /proc/$pid/wchan
On Thu, Sep 23, 2021 at 06:34:08PM -0700, Vito Caputo wrote:
> On Thu, Sep 23, 2021 at 06:16:16PM -0700, Kees Cook wrote:
> > On Thu, Sep 23, 2021 at 05:22:30PM -0700, Vito Caputo wrote:
> > > Instead of unwinding stacks maybe the kernel should be sticking an
> > > entrypoint address in the current task struct for get_wchan() to
> > > access, whenever userspace enters the kernel?
> >
> > wchan is supposed to show where the kernel is at the instant the
> > get_wchan() happens. (i.e. recording it at syscall entry would just
> > always show syscall entry.)
> >
>
> And you have the syscall # onhand when performing the syscall entry,
> no?
>
> The point is, if the alternative is to always get 0 from
> /proc/PID/wchan when a process is sitting in ioctl(), I'd be perfectly
> happy to get back sys_ioctl. I'm under the impression there's quite a
> bit of vendor-specific flexibility here in terms of how precise WCHAN
> is.
Oh, yeah, if you're happy with syscall-level granularity, that'd be
totally fine by me too.
> If it's possible to preserve the old WCHAN precision I'm all for it.
> But if we've become so paranoid about leaking anything about the
> kernel to userspace that this is untenable, even if it just spits out
> the syscall being performed that has value.
I'd like to find a middle ground -- wchan has always seemed like a info
leak, even with only symbols. And it doesn't help that walking the stack
from outside the current task is difficult. :)
-Kees
--
Kees Cook
Powered by blists - more mailing lists