Re: objtool clac/stac handling change..
From: Al Viro
Date: Fri Jul 03 2020 - 22:38:39 EST
On Fri, Jul 03, 2020 at 06:54:15PM -0700, Linus Torvalds wrote:
> "Software Prefetches May Report A Page Fault
>
> Description Software prefetch instructions are defined to ignore
> page faults. Under highly specific and detailed internal
> circumstances, a prefetch instruction may report a page fault if both
> of the following conditions are true:
>
> â The target address of the prefetch would cause a page fault if
> the address was accessed by an actual memory load or store instruction
> under the current privilege mode;
>
> â The prefetch instruction is followed in execution-order by an
> actual or speculative byte-sized memory access of the same
> modify-intent to the same address. PREFETCH and PREFETCHNTA/0/1/2 have
> the same modify-intent as a memory load access.
>
> PREFETCHW has the same modify-intent as a memory store access. The
> page fault exception error code bits for the faulting prefetch will be
> identical to that for a bytesized memory access of the same-modify
> intent to the same address. Note that some misaligned accesses can be
> broken up by the processor into multiple accesses where at least one
> of the accesses is a byte-sized access. If the target address of the
> subsequent memory access of the same modify-intent is aligned and not
> byte-sized, this errata does not occur and no workaround is needed.
>
> Potential Effect on System An unexpected page fault may occur
> infrequently on a prefetch instruction."
Lovely... So basically this is the rare place where we might use those
insns on userland addresses?