Re: objtool clac/stac handling change..
From: Linus Torvalds
Date: Fri Jul 03 2020 - 23:06:29 EST
On Fri, Jul 3, 2020 at 7:30 PM Al Viro <viro@xxxxxxxxxxxxxxxxxx> 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