lkml.org 
[lkml]   [2018]   [Oct]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2] x86: ptrace.h: Make regs_get_kernel_stack_nth() not fault on bad stack
On Thu, 18 Oct 2018 15:48:46 +0900
Masami Hiramatsu <mhiramat@kernel.org> wrote:

> On Wed, 17 Oct 2018 16:59:51 -0400
> Steven Rostedt <rostedt@goodmis.org> wrote:
>
> > From: "Steven Rostedt (VMware)" <rostedt@goodmis.org>
> >
> > Andy had some concerns about using regs_get_kernel_stack_nth() in a new
> > function regs_get_kernel_argument() as if there's any error in the stack
> > code, it could cause a bad memory access. To be on the safe side, call
> > probe_kernel_read() on the stack address to be extra careful in accessing
> > the memory. A helper function, regs_get_kernel_stack_nth_addr(), was added
> > to just return the stack address (or NULL if not on the stack), that will be
> > used to find the address (and could be used by other functions) and read the
> > address with kernel_probe_read().
> >
> > Link: http://lkml.kernel.org/r/CALCETrXn9zKTb9i1LP3qoFcpqZHF34BdkuZ5D3N0uCmRr+VnbA@mail.gmail.com
> > Requested-by: Andy Lutomirski <luto@amacapital.net>
> > Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
>
> Looks good to me.
>
> Reviewed-by: Masami Hiramatsu <mhiramat@kernel.org>
>
> Thank you,
>

Thanks Masami,

I plan on posting all the patches later today. They already passed all
my tests :-) Well, it hasn't broken anything, as I haven't added tests
to test your code yet.

-- Steve

\
 
 \ /
  Last update: 2018-10-18 15:21    [W:0.047 / U:0.216 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site