[PATCH] D101327: [Clang][Driver] validate sysregs for -mstack-protector-guard-reg=
Nick Desaulniers via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Apr 27 11:07:11 PDT 2021
nickdesaulniers added a comment.
In D101327#2718989 <https://reviews.llvm.org/D101327#2718989>, @DavidSpickett wrote:
> So if kernel builds are using a small subset of registers, just check for those.
The kernel uses just one for aarch64. It looks like GCC just feeds through whatever is specified at the command line to GAS without any validation; letting GAS fail or not. For reference, here are the ISAs+regs used currently by the Linux kernel.
- riscv: tp
- powerpc: r13, r2
- x86: fs
- arm64: sp_el0
So it's definitely overkill to validate all possible sysregs. Just thought I'd post a patch in case we ever wanted to revisit this, but whether this patch lands or not doesn't matter to me; https://reviews.llvm.org/D100919 is what we need, hence the separation.
> Otherwise we've got another duplicated list that we (Arm) will probably forget to update anyway when new registers are added.
Agreed.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D101327/new/
https://reviews.llvm.org/D101327
More information about the cfe-commits
mailing list