diff options
| author | Manu Gautam <mgautam@codeaurora.org> | 2017-02-24 15:22:40 +0530 |
|---|---|---|
| committer | Moyster <oysterized@gmail.com> | 2018-11-27 16:09:55 +0100 |
| commit | 513cef2c53c2b3846f6c571823412f514b6f66c7 (patch) | |
| tree | 91c79e2c53b67916729fbfea3150bf7d9571bbdc /drivers/usb/class | |
| parent | b32e2d51665e3b6af648dec474db214b6312d967 (diff) | |
usb: 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 0's.
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
CRs-fixed: 1052849
Change-Id: I0e98145730380ea983fa8f46a28d15dd6c2c31df
Signed-off-by: Manu Gautam <mgautam@codeaurora.org>
Signed-off-by: Yasir Malik <ymalik@codeaurora.org>
Signed-off-by: Kevin F. Haggerty <haggertk@lineageos.org>
Diffstat (limited to 'drivers/usb/class')
| -rw-r--r-- | drivers/usb/class/usblp.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/usb/class/usblp.c b/drivers/usb/class/usblp.c index 7ac5fac86..839ff6bc1 100644 --- a/drivers/usb/class/usblp.c +++ b/drivers/usb/class/usblp.c @@ -175,18 +175,18 @@ static void usblp_dump(struct usblp *usblp) struct device *dev = &usblp->intf->dev; int p; - dev_dbg(dev, "usblp=0x%p\n", usblp); - dev_dbg(dev, "dev=0x%p\n", usblp->dev); + dev_dbg(dev, "usblp=0x%pK\n", usblp); + dev_dbg(dev, "dev=0x%pK\n", usblp->dev); dev_dbg(dev, "present=%d\n", usblp->present); - dev_dbg(dev, "readbuf=0x%p\n", usblp->readbuf); + dev_dbg(dev, "readbuf=0x%pK\n", usblp->readbuf); dev_dbg(dev, "readcount=%d\n", usblp->readcount); dev_dbg(dev, "ifnum=%d\n", usblp->ifnum); for (p = USBLP_FIRST_PROTOCOL; p <= USBLP_LAST_PROTOCOL; p++) { dev_dbg(dev, "protocol[%d].alt_setting=%d\n", p, usblp->protocol[p].alt_setting); - dev_dbg(dev, "protocol[%d].epwrite=%p\n", p, + dev_dbg(dev, "protocol[%d].epwrite=%pK\n", p, usblp->protocol[p].epwrite); - dev_dbg(dev, "protocol[%d].epread=%p\n", p, + dev_dbg(dev, "protocol[%d].epread=%pK\n", p, usblp->protocol[p].epread); } dev_dbg(dev, "current_protocol=%d\n", usblp->current_protocol); |
