summaryrefslogtreecommitdiff
path: root/arch/blackfin/include/asm/uaccess.h
AgeCommit message (Collapse)Author
2018-03-16arch: remove blackfin portArnd Bergmann
The Analog Devices Blackfin port was added in 2007 and was rather active for a while, but all work on it has come to a standstill over time, as Analog have changed their product line-up. Aaron Wu confirmed that the architecture port is no longer relevant, and multiple people suggested removing blackfin independently because of some of its oddities like a non-working SMP port, and the amount of duplication between the chip variants, which cause extra work when doing cross-architecture changes. Link: https://docs.blackfin.uclinux.org/ Acked-by: Aaron Wu <Aaron.Wu@analog.com> Acked-by: Bryan Wu <cooloney@gmail.com> Cc: Steven Miao <realmz6@gmail.com> Cc: Mike Frysinger <vapier@chromium.org> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2017-05-15kill strlen_user()Al Viro
no callers, no consistent semantics, no sane way to use it... Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2017-03-28bfin: switch to RAW_COPY_USERAl Viro
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2017-03-28blackfin: switch to generic extable.hAl Viro
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2017-03-05uaccess: drop duplicate includes from asm/uaccess.hAl Viro
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2017-03-05uaccess: move VERIFY_{READ,WRITE} definitions to linux/uaccess.hAl Viro
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2016-09-15blackfin: no access_ok() for __copy_{to,from}_user()Al Viro
callers have checked that already Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2016-09-13blackfin: fix copy_from_user()Al Viro
Cc: stable@vger.kernel.org Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2016-01-04put the remnants of ..._user_ret() to restAl Viro
they hadn't been used in last 15 years... Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2015-01-13blackfin: macro whitespace fixesMichael S. Tsirkin
While working on arch/blackfin/include/asm/uaccess.h, I noticed that some macros within this header are made harder to read because they violate a coding style rule: space is missing after comma. Fix it up. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2015-01-13blackfin: fix put_user sparse errorsMichael S. Tsirkin
virtio wants to write bitwise types to userspace using put_user. At the moment this triggers sparse errors, since the value is passed through an integer. For example: __le32 __user *p; __le32 x; put_user(x, p); is safe, but currently triggers a sparse warning. Fix that up using __force. Note: this does not suppress any useful sparse checks since caller assigns x to typeof(*p), which in turn forces all the necessary type checks. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2015-01-13blackfin/uaccess: fix sparse errorsMichael S. Tsirkin
virtio wants to read bitwise types from userspace using get_user. At the moment this triggers sparse errors, since the value is passed through an integer. Fix that up using __force. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Acked-by: Steven Miao <realmz6@gmail.com>
2013-02-20blackfin: sync data in blackfin write bufferSonic Zhang
Sync data in blackfin write buffer to DRAM before return from copy_to_user. Otherwise, application may read wrong data from stat syscall occasionally. Signed-off-by: Sonic Zhang <sonic.zhang@analog.com> Signed-off-by: Bob Liu <lliubbo@gmail.com>
2012-12-13Blackfin: remove unused is_in_rom()Tobias Klauser
The function is not used anywhere in the whole tree (anymore), so remove it. Signed-off-by: Tobias Klauser <tklauser@distanz.ch> Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Bob Liu <lliubbo@gmail.com>
2012-12-13Blackfin: Annotate strnlen_user and strlen_user 'src' parameter with __userLars-Peter Clausen
The 'src' parameter of strnlen_user and strlen_user is supposed to take a userspace pointer, so annotate it with __user. This fixes the following and similar sparse warnings: fs/binfmt_elf_fdpic.c:671:36: warning: incorrect type in argument 1 (different address spaces) fs/binfmt_elf_fdpic.c:671:36: expected char const *src fs/binfmt_elf_fdpic.c:671:36: got char [noderef] <asn:1>*[assigned] p fs/binfmt_elf_fdpic.c:683:36: warning: incorrect type in argument 1 (different address spaces) fs/binfmt_elf_fdpic.c:683:36: expected char const *src fs/binfmt_elf_fdpic.c:683:36: got char [noderef] <asn:1>*[assigned] p Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Bob Liu <lliubbo@gmail.com>
2012-12-13Blackfin: Annotate clear_user 'to' parameter with __userLars-Peter Clausen
The 'to' parameter of clear_user is supposed to take a userspace pointer, so annotate it with __user. This fixes the following and similar sparse warnings: fs/binfmt_elf_fdpic.c:714:35: warning: incorrect type in argument 1 (different address spaces) fs/binfmt_elf_fdpic.c:714:35: expected void [noderef] <asn:1>*to fs/binfmt_elf_fdpic.c:714:35: got void *<noident> fs/binfmt_elf_fdpic.c:1119:29: warning: incorrect type in argument 1 (different address spaces) fs/binfmt_elf_fdpic.c:1119:29: expected void *to fs/binfmt_elf_fdpic.c:1119:29: got void [noderef] <asn:1>*<noident> Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Bob Liu <lliubbo@gmail.com>
2012-12-13Blackfin: Add missing __user annotations to put_userLars-Peter Clausen
typeof() will not inherit the __user annotation so we have to explicitly specify this for '_p'. This fixes the following and quite a few similar warnings from spatch: kernel/sys.c:884:26: warning: incorrect type in initializer (different address spaces) kernel/sys.c:884:26: expected unsigned int *_p kernel/sys.c:884:26: got unsigned int [noderef] [usertype] <asn:1>*ruidp kernel/sys.c:885:26: warning: incorrect type in initializer (different address spaces) kernel/sys.c:885:26: expected unsigned int *_p kernel/sys.c:885:26: got unsigned int [noderef] [usertype] <asn:1>*euidp kernel/sys.c:886:26: warning: incorrect type in initializer (different address spaces) kernel/sys.c:886:26: expected unsigned int *_p kernel/sys.c:886:26: got unsigned int [noderef] [usertype] <asn:1>*suidp Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Bob Liu <lliubbo@gmail.com>
2012-12-13Blackfin: Annotate strncpy_from_user src parameter with __userLars-Peter Clausen
The src parameter of strncpy_from_user is supposed to take a string from userspace, so it should be annotated with __user. Doing so fixes the following and similar warnings from sparse: kernel/sys.c:491:51: warning: incorrect type in argument 2 (different address spaces) kernel/sys.c:491:51: expected char const *src kernel/sys.c:491:51: got void [noderef] <asn:1>*arg kernel/sys.c:2061:54: warning: incorrect type in argument 2 (different address spaces) kernel/sys.c:2061:54: expected char const *src kernel/sys.c:2061:54: got char [noderef] <asn:1>*<noident> Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Bob Liu <lliubbo@gmail.com>
2011-10-25Blackfin: fix sparse warnings in copy_to/from_userMikhail Gruzdev
Fix argument types for copy_to_user. Fix following sparse warnings: arch/blackfin/include/asm/uaccess.h:198:14: warning: incorrect type in argument 2 (different address spaces) arch/blackfin/include/asm/uaccess.h:198:14: expected void const *s arch/blackfin/include/asm/uaccess.h:198:14: got void const [noderef] <asn:1>*from arch/blackfin/include/asm/uaccess.h:208:14: warning: incorrect type in argument 2 (different address spaces) arch/blackfin/include/asm/uaccess.h:208:14: expected void const *s arch/blackfin/include/asm/uaccess.h:208:14: got void const [noderef] <asn:1>*from Signed-off-by: Mikhail Gruzdev <michail.gruzdev@gmail.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-12-15Blackfin: push down asm/ includes and out of bfin-global.hMike Frysinger
Avoid including unnecessary headers all the time as well as circular includes with core requirements. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-10-07Blackfin: mass clean up of copyright/licensing infoRobin Getz
Bill Gatliff & David Brownell pointed out we were missing some copyrights, and licensing terms in some of the files in ./arch/blackfin, so this fixes things, and cleans them up. It also removes: - verbose GPL text(refer to the top level ./COPYING file) - file names (you are looking at the file) - bug url (it's in the ./MAINTAINERS file) - "or later" on GPL-2, when we did not have that right It also allows some Blackfin-specific assembly files to be under a BSD like license (for people to use them outside of Linux). Signed-off-by: Robin Getz <robin.getz@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-06-22Blackfin: unify memory region checks between kgdb and trapsMike Frysinger
The kgdb (in multiple places) and traps code developed pretty much identical checks for how to access different regions of the Blackfin memory map, but each wasn't 100%, so unify them to avoid duplication, bitrot, and bugs with edge cases. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-06-12Blackfin: push access_ok() L1 attribute downMike Frysinger
There is no need for the L1 attribute to be on the prototype of the access_ok() function as all consumers of the function do not care where it lives -- they'll always use pcrel calls to get to it. This prevents pointless recompiles of most of the system when this config option changes. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-06-12Blackfin: punt duplicated search_exception_table() prototypeMike Frysinger
The common code already has a prototype for this function and we don't use it anywhere in the Blackfin code, so punt it from the Blackfin headers. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-06-12Blackfin: add missing access_ok() checks to user functionsRobin Getz
The core string/clear user functions weren't checking the user pointers which caused kernel crashes with some bad programs and tests (like LTP). Signed-off-by: Robin Getz <robin.getz@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-01-07Blackfin arch: add __must_check markings to our user functions like other archesMike Frysinger
Signed-off-by: Mike Frysinger <vapier.adi@gmail.com> Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-11-18Blackfin arch: fixup get_user() macrosMike Frysinger
- to avoid uninitialized errors - make invalid sizes a build error Signed-off-by: Mike Frysinger <vapier.adi@gmail.com> Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-08-27Blackfin arch: move include/asm-blackfin header files to arch/blackfinBryan Wu
Signed-off-by: Bryan Wu <cooloney@kernel.org>