lkml.org 
[lkml]   [2019]   [Feb]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    Date
    SubjectRe: [PATCH 1/2 v2] kprobe: Do not use uaccess functions to access kernel memory that can fault
    On Tue, Feb 19, 2019 at 8:18 AM Steven Rostedt <rostedt@goodmis.org> wrote:
    >
    > > So it would be good to not just say "user or kernel", but actually say
    > > what *kind* of kernel access it expects.
    >
    > Note, kprobes are a different kind of beast. I've used kprobes to probe
    > userspace information as well as kernel. Heck, I could see someone
    > even using kprobes to probe IO memory to check if a device is doing
    > what they expect it's doing.

    Note that even if that is the case, you _need_ to special "user vs
    kernel" information.

    Because the exact same address might exist in both.

    Right now I think that only happens on sparc32, but vendors used to
    have that issue on x86-32 too (if they had the 4G:4G patches).

    > Basically, a kprobe is mostly used for debugging what's happening in a
    > live kernel, to read any address.

    My point is that "any address" is not sufficient to begin with. You
    need "kernel or user".

    Having a flag for what _kind_ of kernel address is ok might then be
    required for other cases if they might not be ok with following page
    tables to IO space..

    Linus

    \
     
     \ /
      Last update: 2019-02-19 19:44    [W:4.071 / U:0.992 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site