patch "usb: dwc3: replace %p with %pK" added to usb-testing
Subsystems (4)
This is a note to let you know that I've just added the patch titled
usb: dwc3: replace %p with %pK
to my usb git tree which can be found at
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git
in the usb-testing branch.
The patch will show up in the next release of the linux-next tree (usually sometime within the next 24 hours during the week.)
The patch will be merged to the usb-next branch sometime soon, after it passes testing, and the merge window is open.
If you have any questions about this process, please let me know.
Quoted 1 line
From
04fb365c453e14ff9e8a28f1c46050d920a27a4aMon Sep 17 00:00:00 2001
From: Felipe Balbi <[email protected]>
Date: Wed, 17 May 2017 15:57:45 +0300
Subject: usb: dwc3: replace %p with %pK
%p will leak kernel pointers, so let's not expose the information on dmesg and instead use %pK. %pK will only show the actual addresses if explicitly enabled under /proc/sys/kernel/kptr_restrict.
--- drivers/usb/dwc3/dwc3-st.c | 2 +- drivers/usb/dwc3/gadget.c | 9 +++------ 2 files changed, 4 insertions(+), 7 deletions(-)
drivers/usb/dwc3/dwc3-st.c +1 -1
@@ -230,7 +230,7 @@ static int st_dwc3_probe(struct platform_device *pdev) dwc3_data->syscfg_reg_off = res->start; -dev_vdbg (&pdev->dev,"glue-logic addr 0x%p, syscfg-reg offset 0x%x\n" , +dev_vdbg (&pdev->dev,"glue-logic addr 0x%pK, syscfg-reg offset 0x%x\n" , dwc3_data->glue_base, dwc3_data->syscfg_reg_off); dwc3_data->rstc_pwrdn =
drivers/usb/dwc3/gadget.c +3 -6
@@ -1224,12 +1224,9 @@ static int __dwc3_gadget_ep_queue(struct dwc3_ep *dep, struct dwc3_request *req)return -ESHUTDOWN ; } -if (WARN (req->dep != dep,"request %p belongs to '%s'\n" , - &req->request, req->dep->name)) { -dev_err (dwc->dev,"%s: request %p belongs to '%s'\n" , - dep->name, &req->request, req->dep->name); +if (WARN (req->dep != dep,"request %pK belongs to '%s'\n" , + &req->request, req->dep->name))return -EINVAL ; - }pm_runtime_get (dwc->dev);
@@ -1387,7 +1384,7 @@ static int dwc3_gadget_ep_dequeue(struct usb_ep *ep, } goto out1; } -dev_err (dwc->dev,"request %p was not queued to %s\n" , +dev_err (dwc->dev,"request %pK was not queued to %s\n" , request, ep->name); ret = -EINVAL ; goto out0;
Signature · 1 line
2.13.1