linux/fs
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
..
9p
adfs
affs
afs
autofs
befs
bfs
btrfs Remove 'type' argument from access_ok() function 2019-01-03 18:57:57 -08:00
cachefiles
ceph mm: convert totalram_pages and totalhigh_pages variables to atomic 2018-12-28 12:11:47 -08:00
cifs 4 fixes for stable, improvements to DFS including allowing failover to alternate targets, and some small performance improvements 2019-01-02 12:08:29 -08:00
coda
configfs
cramfs
crypto
debugfs
devpts
dlm
ecryptfs
efivarfs
efs
exofs
exportfs
ext2
ext4 for-4.21/block-20181221 2018-12-28 13:19:59 -08:00
f2fs f2fs-for-4.21-rc1 2018-12-31 09:41:37 -08:00
fat Remove 'type' argument from access_ok() function 2019-01-03 18:57:57 -08:00
freevxfs
fscache
fuse mm: convert totalram_pages and totalhigh_pages variables to atomic 2018-12-28 12:11:47 -08:00
gfs2
hfs
hfsplus
hostfs
hpfs
hugetlbfs hugetlbfs: Use i_mmap_rwsem to fix page fault/truncate race 2018-12-28 12:11:52 -08:00
isofs
jbd2
jffs2
jfs
kernfs
lockd NFS client updates for Linux 4.21 2019-01-02 16:35:23 -08:00
minix
nfs NFS client updates for Linux 4.21 2019-01-02 16:35:23 -08:00
nfs_common
nfsd NFS client updates for Linux 4.21 2019-01-02 16:35:23 -08:00
nilfs2
nls
notify
ntfs mm: convert totalram_pages and totalhigh_pages variables to atomic 2018-12-28 12:11:47 -08:00
ocfs2 Remove 'type' argument from access_ok() function 2019-01-03 18:57:57 -08:00
omfs
openpromfs
orangefs
overlayfs
proc mm, proc: report PR_SET_THP_DISABLE in proc 2018-12-28 12:11:50 -08:00
pstore Remove 'type' argument from access_ok() function 2019-01-03 18:57:57 -08:00
qnx4
qnx6
quota
ramfs
reiserfs
romfs
squashfs
sysfs
sysv
tracefs
ubifs mm: migrate: drop unused argument of migrate_page_move_mapping() 2018-12-28 12:11:51 -08:00
udf
ufs
xfs
aio.c Merge branch 'akpm' (patches from Andrew) 2018-12-28 16:55:46 -08:00
anon_inodes.c
attr.c
bad_inode.c
binfmt_aout.c Remove 'type' argument from access_ok() function 2019-01-03 18:57:57 -08:00
binfmt_elf.c
binfmt_elf_fdpic.c
binfmt_em86.c
binfmt_flat.c
binfmt_misc.c
binfmt_script.c
block_dev.c block: don't use un-ordered __set_current_state(TASK_UNINTERRUPTIBLE) 2019-01-02 10:46:03 -08:00
buffer.c
char_dev.c
compat.c
compat_binfmt_elf.c
compat_ioctl.c
coredump.c
d_path.c
dax.c dax fix 4.21 2018-12-31 09:46:39 -08:00
dcache.c
dcookies.c
direct-io.c
drop_caches.c
eventfd.c
eventpoll.c Remove 'type' argument from access_ok() function 2019-01-03 18:57:57 -08:00
exec.c
fcntl.c
fhandle.c
file.c Char/Misc driver patches for 4.21-rc1 2018-12-28 20:54:57 -08:00
file_table.c mm: convert totalram_pages and totalhigh_pages variables to atomic 2018-12-28 12:11:47 -08:00
filesystems.c
fs-writeback.c
fs_pin.c
fs_struct.c
inode.c y2038: more syscalls and cleanups 2018-12-28 12:45:04 -08:00
internal.h
ioctl.c Remove 'type' argument from access_ok() function 2019-01-03 18:57:57 -08:00
iomap.c block: don't use un-ordered __set_current_state(TASK_UNINTERRUPTIBLE) 2019-01-02 10:46:03 -08:00
Kconfig
Kconfig.binfmt
libfs.c
locks.c locks: fix error in locks_move_blocks() 2019-01-02 20:14:50 -05:00
Makefile
mbcache.c
mount.h
mpage.c
namei.c
namespace.c Remove 'type' argument from access_ok() function 2019-01-03 18:57:57 -08:00
no-block.c
nsfs.c
open.c
pipe.c
pnode.c
pnode.h
posix_acl.c
proc_namespace.c
read_write.c Remove 'type' argument from access_ok() function 2019-01-03 18:57:57 -08:00
readdir.c Remove 'type' argument from access_ok() function 2019-01-03 18:57:57 -08:00
select.c Remove 'type' argument from access_ok() function 2019-01-03 18:57:57 -08:00
seq_file.c
signalfd.c
splice.c
stack.c
stat.c
statfs.c
super.c
sync.c
timerfd.c
userfaultfd.c userfaultfd: clear flag if remap event not enabled 2018-12-28 12:11:51 -08:00
utimes.c
xattr.c