linux-stable/drivers/usb/core
Linus Torvalds 96d4f267e4 Remove 'type' argument from access_ok() function
Nobody has actually used the type (VERIFY_READ vs VERIFY_WRITE) argument
of the user address range verification function since we got rid of the
old racy i386-only code to walk page tables by hand.

It existed because the original 80386 would not honor the write protect
bit when in kernel mode, so you had to do COW by hand before doing any
user access.  But we haven't supported that in a long time, and these
days the 'type' argument is a purely historical artifact.

A discussion about extending 'user_access_begin()' to do the range
checking resulted this patch, because there is no way we're going to
move the old VERIFY_xyz interface to that model.  And it's best done at
the end of the merge window when I've done most of my merges, so let's
just get this done once and for all.

This patch was mostly done with a sed-script, with manual fix-ups for
the cases that weren't of the trivial 'access_ok(VERIFY_xyz' form.

There were a couple of notable cases:

 - csky still had the old "verify_area()" name as an alias.

 - the iter_iov code had magical hardcoded knowledge of the actual
   values of VERIFY_{READ,WRITE} (not that they mattered, since nothing
   really used it)

 - microblaze used the type argument for a debug printout

but other than those oddities this should be a total no-op patch.

I tried to fix up all architectures, did fairly extensive grepping for
access_ok() uses, and the changes are trivial, but I may have missed
something.  Any missed conversion should be trivially fixable, though.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2019-01-03 18:57:57 -08:00
..
buffer.c USB: Removing NULL check for pool since dma_pool_destroy is safe 2018-09-10 20:01:04 +02:00
config.c USB: Accept bulk endpoints with 1024-byte maxpacket 2018-05-03 10:16:38 -07:00
devices.c Remove 'type' argument from access_ok() function 2019-01-03 18:57:57 -08:00
devio.c Remove 'type' argument from access_ok() function 2019-01-03 18:57:57 -08:00
driver.c USB: core: remove set but not used variable 'udev' 2018-10-09 16:02:29 +02:00
endpoint.c USB: core: move existing SPDX tags to top of the file 2017-11-03 10:12:26 +01:00
file.c USB: core: move existing SPDX tags to top of the file 2017-11-03 10:12:26 +01:00
generic.c usbcore: Select UAC3 configuration for audio if present 2018-09-20 13:12:05 +02:00
hcd-pci.c usb: Don't die twice if PCI xhci host is not responding in resume 2018-09-05 14:36:53 +02:00
hcd.c usb: core: Remove unnecessary memset() 2018-12-12 12:38:41 +01:00
hub.c Merge 4.20-rc6 into usb-next 2018-12-10 10:19:08 +01:00
hub.h usb: hub: Per-port setting to use old enumeration scheme 2018-05-31 12:48:17 +02:00
Kconfig
ledtrig-usbport.c usb: simplify usbport trigger 2018-07-05 23:21:15 +02:00
Makefile usb: core: add a wrapper for the USB PHYs on the HCD 2018-03-09 09:43:53 -08:00
message.c usb: Avoid use-after-free by flushing endpoints early in usb_set_interface() 2018-09-05 14:36:53 +02:00
notify.c USB: core: move existing SPDX tags to top of the file 2017-11-03 10:12:26 +01:00
of.c usb: Change usb_of_get_companion_dev() place to usb/common 2018-09-10 20:40:29 +02:00
otg_whitelist.h USB: core: Remove redundant license text 2017-11-04 11:55:39 +01:00
phy.c usb: core: phy: clean up return value check about devm_of_phy_get_by_index() 2018-09-10 20:09:45 +02:00
phy.h usb: core: phy: add the SPDX-License-Identifier and include guard 2018-04-23 09:41:32 +02:00
port.c usb: export firmware port location in sysfs 2018-10-02 12:05:30 -07:00
quirks.c usb: quirk: add no-LPM quirk on SanDisk Ultra Flair device 2018-12-05 10:37:29 +01:00
sysfs.c USB: USB 3.2 Add sysfs entries for a usb device rx_lanes and tx_lanes 2018-04-22 16:19:26 +02:00
urb.c usb: core: urb: Check SSP isoc ep comp descriptor 2018-03-20 10:13:30 +01:00
usb-acpi.c usb: clarify ACPI spec version and section number for _UPC & _PLD 2018-03-09 09:37:10 -08:00
usb.c USB: check usb_get_extra_descriptor for proper size 2018-12-05 21:20:14 +01:00
usb.h usb: core: Add "quirks" parameter for usbcore 2018-03-20 10:16:09 +01:00