Messages in this thread | | | From | Linus Torvalds <> | Date | Fri, 3 Jul 2020 20:06:02 -0700 | Subject | Re: objtool clac/stac handling change.. |
| |
On Fri, Jul 3, 2020 at 7:30 PM Al Viro <viro@zeniv.linux.org.uk> wrote: > > Lovely... So basically this is the rare place where we might use those > insns on userland addresses?
Honestly, I think the code you quote is just confused.
First off, we have special "is this page fault due to a prefetch" logic in the x86 page fault handler anyway.
Second, we probably shouldn't have those prefetches there in the first place.
Sp I think the nasty code is likely just pointless and legacy. It may exists simply because that case was the first time somebody noticed the prefetch errata and it triggered in kernel mode. Who knows..
I'd be inclined to remove all the prefetching code from that csum thing entirely. Most good CPU's do better prefetch pattern detection in hardware than we can do in software.
Linus
| |