lkml.org 
[lkml]   [2008]   [Nov]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH] kprobes: bugfix: try_module_get even if calling_mod is NULL
    Andrew Morton wrote:
    > I do not understand this description "Get probed module even if the
    > caller is in the kernel core code".
    >
    > What bug is being fixed here? What is the kernel behaviour before and
    > after the patch?

    When someone called register_*probe() from kernel-core code(not from
    module) and that probes a kernel module, users can remove the probed
    module because kprobe doesn't increment reference counter of the module.
    (on the other hand, if the kernel-module calls register_*probe,
    kprobe increments refcount of the probed module.)

    Currently, we have no register_*probe() calling from kernel-core(except
    smoke-test, but the smoke-test doesn't probe module), so there is no
    real bugs. But the logic is wrong(or not fair) and it can causes a
    problem when someone might want to probe module from kernel.

    After this patch is applied, even if someone put register_*probe() call
    in the kernel-core code, it increments the reference counter of the
    probed module, and it prevents user to remove the module until stopping
    probing it.

    > Was the bug present in 2.6.27, 2.6.26 etc? Or was it a post-2.6.28
    > regression?

    Hmm, it might be an enhancement, because currently the kernel doesn't
    have real bugs.

    Thank you,

    --
    Masami Hiramatsu

    Software Engineer
    Hitachi Computer Products (America) Inc.
    Software Solutions Division

    e-mail: mhiramat@redhat.com



    \
     
     \ /
      Last update: 2008-11-07 03:33    [W:0.022 / U:29.792 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site