linux-stable/tools
Linus Torvalds 427fda2c8a x86: improve on the non-rep 'copy_user' function
The old 'copy_user_generic_unrolled' function was oddly implemented for
largely historical reasons: it had been largely based on the uncached
copy case, which has some other concerns.

For example, the __copy_user_nocache() function uses 'movnti' for the
destination stores, and those want the destination to be aligned.  In
contrast, the regular copy function doesn't really care, and trying to
align things only complicates matters.

Also, like the clear_user function, the copy function had some odd
handling of the repeat counts, complicating the exception handling for
no really good reason.  So as with clear_user, just write it to keep all
the byte counts in the %rcx register, exactly like the 'rep movs'
functionality that this replaces.

Unlike a real 'rep movs', we do allow for this to trash a few temporary
registers to not have to unnecessarily save/restore registers on the
stack.

And like the clearing case, rename this to what it now clearly is:
'rep_movs_alternative', and make it one coherent function, so that it
shows up as such in profiles (instead of the odd split between
"copy_user_generic_unrolled" and "copy_user_short_string", the latter of
which was not about strings at all, and which was shared with the
uncached case).

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2023-04-18 17:05:28 -07:00
..
accounting
arch perf tools fixes for v6.3: 2023-03-10 08:18:46 -08:00
bootconfig bootconfig: Fix testcase to increase max node 2023-03-22 01:00:28 +09:00
bpf bpftool: Use bpf_{btf,link,map,prog}_get_info_by_fd() 2023-02-16 15:32:45 -08:00
build tools build: Add test echo-cmd 2023-02-03 13:54:22 -03:00
certs
cgroup tools:cgroup:memcg_shrinker remove redundant import 2023-01-18 17:12:59 -08:00
counter
debugging
edid
firewire
firmware
gpio tools: gpio: fix -c option of gpio-event-mon 2023-01-27 14:05:46 +01:00
hv
iio tools/iio/iio_utils:fix memory leak 2023-01-21 17:52:26 +00:00
include Including fixes from netfilter, wifi and ipsec. 2023-03-17 13:31:16 -07:00
io_uring
kvm/kvm_stat
laptop
leds
lib libbpf: Revert poisoning of strlcpy 2023-03-10 10:19:25 -08:00
memory-model tools: memory-model: Make plain accesses carry dependencies 2023-01-03 20:47:04 -08:00
mm tools/mm: allow users to provide additional cflags/ldflags 2023-02-02 22:33:24 -08:00
net/ynl tools: ynl: Fix genlmsg header encoding formats 2023-03-22 20:40:04 -07:00
objtool x86: improve on the non-rep 'copy_user' function 2023-04-18 17:05:28 -07:00
pci
pcmcia
perf perf tools fixes for v6.3: 2023-03-10 08:18:46 -08:00
power Power management fixes for 6.3-rc3 2023-03-17 11:02:26 -07:00
rcu
scripts tools: Add LoongArch build infrastructure 2023-02-25 22:12:18 +08:00
spi
testing Including fixes from bpf, and bluetooth. 2023-04-13 15:33:04 -07:00
thermal
time
tracing tracing updates for 6.3: 2023-02-23 10:20:49 -08:00
usb
verification tools/rv: Remove unneeded semicolon 2023-01-31 19:21:12 -05:00
virtio tools/virtio: fix typo in README instructions 2023-04-04 11:01:58 -04:00
wmi
Makefile