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/net/usb/cdc_ether.c | |
| 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/net/usb/cdc_ether.c')
| -rw-r--r-- | drivers/net/usb/cdc_ether.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/usb/cdc_ether.c b/drivers/net/usb/cdc_ether.c index 71e11ebf1..1bcb77a9f 100644 --- a/drivers/net/usb/cdc_ether.c +++ b/drivers/net/usb/cdc_ether.c @@ -197,7 +197,7 @@ int usbnet_generic_cdc_bind(struct usbnet *dev, struct usb_interface *intf) info->u->bSlaveInterface0); if (!info->control || !info->data) { dev_dbg(&intf->dev, - "master #%u/%p slave #%u/%p\n", + "master #%u/%pK slave #%u/%pK\n", info->u->bMasterInterface0, info->control, info->u->bSlaveInterface0, @@ -293,7 +293,7 @@ next_desc: info->data = usb_ifnum_to_if(dev->udev, 1); if (!info->control || !info->data || info->control != intf) { dev_dbg(&intf->dev, - "rndis: master #0/%p slave #1/%p\n", + "rndis: master #0/%pK slave #1/%pK\n", info->control, info->data); goto bad_desc; |
