]> git.itanic.dy.fi Git - linux-stable/commit
x86: don't use REP_GOOD or ERMS for user memory clearing
authorLinus Torvalds <torvalds@linux-foundation.org>
Sat, 15 Apr 2023 20:22:31 +0000 (13:22 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 19 Apr 2023 00:05:28 +0000 (17:05 -0700)
commitd2c95f9d6802cc518d71d9795f4d9da54fb4e24d
treeca5498de4284cf09409c69cbc0c1ddc869d2a747
parentadfcf4231b8cbc2d9c1e7bfaa965b907e60639eb
x86: don't use REP_GOOD or ERMS for user memory clearing

The modern target to use is FSRS (Fast Short REP STOS), and the other
cases should only be used for bigger areas (ie mainly things like page
clearing).

Note! This changes the conditional for the inlining from FSRM ("fast
short rep movs") to FSRS ("fast short rep stos").

We'll have a separate fixup for AMD microarchitectures that have a good
'rep stosb' yet do not set the new Intel-specific FSRS bit (because FSRM
was there first).

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
arch/x86/include/asm/uaccess_64.h
arch/x86/lib/clear_page_64.S
tools/objtool/check.c