]> git.baikalelectronics.ru Git - kernel.git/commit
USB: core: replace %p with %pK
authorVamsi Krishna Samavedam <vskrishn@codeaurora.org>
Tue, 16 May 2017 12:38:08 +0000 (14:38 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 May 2017 09:27:41 +0000 (11:27 +0200)
commitb2e578b0519763365ba1264f08ccd5e22065f721
tree990356374014fa1ecf768cc10ba5c48b9ded1d49
parent3fe23939dd2e3d8d706767fa5333b0555744bc79
USB: core: replace %p with %pK

Format specifier %p can leak kernel addresses while not valuing the
kptr_restrict system settings. When kptr_restrict is set to (1), kernel
pointers printed using the %pK format specifier will be replaced with
Zeros. Debugging Note : &pK prints only Zeros as address. If you need
actual address information, write 0 to kptr_restrict.

echo 0 > /proc/sys/kernel/kptr_restrict

[Found by poking around in a random vendor kernel tree, it would be nice
if someone would actually send these types of patches upstream - gkh]

Signed-off-by: Vamsi Krishna Samavedam <vskrishn@codeaurora.org>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/core/devio.c
drivers/usb/core/hcd.c
drivers/usb/core/urb.c