lkml.org 
[lkml]   [2019]   [May]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] perf: Fix oops when kthread execs user process
On Wed, May 29, 2019 at 02:05:21PM +0100, Will Deacon wrote:
> On Wed, May 29, 2019 at 02:55:57PM +0200, Peter Zijlstra wrote:

> > if (user_mode(regs)) {
>
> Hmm, so it just occurred to me that Mark's observation is that the regs
> can be junk in some cases. In which case, should we be checking for
> kthreads first?

task_pt_regs() can return garbage, but @regs is the exception (or
perf_arch_fetch_caller_regs()) regs, and for those user_mode() had
better be correct.

\
 
 \ /
  Last update: 2019-05-29 15:26    [W:0.147 / U:0.960 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site