Re: [PATCH v2] [RISC-V] Add support for TLS stack protector canary access

2020-07-19 Thread cooper via Gcc-patches
Ping On 2020/7/13 下午4:15, cooper wrote: gcc/ * config/riscv/riscv-opts.h (stack_protector_guard): New enum. * config/riscv/riscv.c (riscv_option_override): Handle the new options. * config/riscv/riscv.md (stack_protect_set): New pattern to handle flexible

[PATCH v2] [RISC-V] Add support for TLS stack protector canary access

2020-07-13 Thread cooper via Gcc-patches
gcc/ * config/riscv/riscv-opts.h (stack_protector_guard): New enum. * config/riscv/riscv.c (riscv_option_override): Handle the new options. * config/riscv/riscv.md (stack_protect_set): New pattern to handle flexible stack protector guard settings. (st

Re: [PATCH] [RISC-V] Add support for TLS stack protector canary access

2020-07-13 Thread cooper via Gcc-patches
On 2020/7/13 上午8:32, Jim Wilson wrote: This looks like a security leak that the canary value is left in a4. The i386 implementation operates directly on memory without loading into registers. The rs6000 implementation is careful to load 0 into the other register in the stack_protector_test cod

[PATCH] [RISC-V] Add support for TLS stack protector canary access

2020-07-07 Thread cooper via Gcc-patches
The linux kernel guys are discussing about supporting TLS register based stack proctector canary, the link is as follows: https://lore.kernel.org/linux-riscv/202007051820.DABE7F87D7@keescook/T/#t I implemented register based stack protector canary with reference to aarch64 and x86. When ad