diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2026-10-19 19:23:55 -1000 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2026-10-19 19:23:55 -1000 |
| commit | 8d1cec6c767053c9bcb8821aedb4c4bd47f54f7f (patch) | |
| tree | b9bca09c9f4408b237b839eac65db0832dfd6bec /scripts/Makefile.thinlto | |
| parent | 41c83aee073fdf45536fa27cafcda499ad64a478 (diff) | |
| download | linux-8d1cec6c767053c9bcb8821aedb4c4bd47f54f7f.tar.gz linux-8d1cec6c767053c9bcb8821aedb4c4bd47f54f7f.zip | |
drivers/char/mem: use get_user()/put_user() for /dev/port byte copies
read_port() and write_port() check the whole user buffer with
access_ok() and then move it one byte at a time with __put_user() and
__get_user(), doing an inb() or outb() for each. Each of those accesses
enables and disables user access on its own, so the up-front check saves
nothing.
Use put_user() and get_user(). The access_ok() stays, because it also
makes a partly invalid buffer fail up front, rather than after some
ports have already been read or written.
This is part of getting rid of __get_user() and __put_user() entirely.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions
