[PATCH] D98906: [X86] Improve lowering of the unrolled inline-asm probing
Simonas Kazlauskas via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 22 08:15:46 PDT 2021
nagisa added a comment.
In D98906#2641418 <https://reviews.llvm.org/D98906#2641418>, @andreadb wrote:
> Be careful about referencing stack locations below the red-zone.
>
> The x86-64 ABI mandates a 128 bytes red zone. Your new instruction would effectively write a zero at a location below the red-zone.
> That region of memory is not reserved, and should be considered volatile. For example: signals and interrupt handlers are allowed to modify it.
Isn't the volatility unimportant for the purposes of stack probing? The write exists only to poke the page (lightly) to ensure there's no page that is not rw, probing does not particularly care if the data at the relevant addresses are overwritten, or even that the byte is written to the address in the first place (as long as it triggers page permission checks). The only concern could be that some signal handler or an interrupt put some data there, but when these are running the probing itself is suspended, isn't it?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D98906/new/
https://reviews.llvm.org/D98906
More information about the llvm-commits
mailing list