• Linus Torvalds's avatar
    stop using '%pK' for /proc/kallsyms pointer values · c0f3ea15
    Linus Torvalds authored
    Not only is it annoying to have one single flag for all pointers, as if
    that was a global choice and all kernel pointers are the same, but %pK
    can't get the 'access' vs 'open' time check right anyway.
    
    So make the /proc/kallsyms pointer value code use logic specific to that
    particular file.  We do continue to honor kptr_restrict, but the default
    (which is unrestricted) is changed to instead take expected users into
    account, and restrict access by default.
    
    Right now the only actual expected user is kernel profiling, which has a
    separate sysctl flag for kernel profile access.  There may be others.
    Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    c0f3ea15
kallsyms.c 17.4 KB