]> git.baikalelectronics.ru Git - kernel.git/commit
stop using '%pK' for /proc/kallsyms pointer values
authorLinus Torvalds <torvalds@linux-foundation.org>
Wed, 8 Nov 2017 20:51:04 +0000 (12:51 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 8 Nov 2017 20:51:04 +0000 (12:51 -0800)
commit621c64796340fd0564bbdfe890354a71e85a6173
tree4dd33e19df563af8733b2c1070131e2c5ece44c9
parent2c2a8a9e2f9df721ab41b51b6881d15fd7cd6930
stop using '%pK' for /proc/kallsyms pointer values

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: Linus Torvalds <torvalds@linux-foundation.org>
kernel/kallsyms.c