Re: [PATCH v2 6/7] riscv: Ensure gp is NULL or points to valid data

2020-09-16 Thread Sean Anderson
nrich Schuchardt; >> Bin Meng; Rick Chen; Sean Anderson >> Subject: [PATCH v2 6/7] riscv: Ensure gp is NULL or points to valid data >> >> This allows code to use a construct like `if (gd & gd->...) { ... }` when >> accessing the global data pointer. Without this c

Re: [PATCH v2 6/7] riscv: Ensure gp is NULL or points to valid data

2020-09-15 Thread Rick Chen
ect: [PATCH v2 6/7] riscv: Ensure gp is NULL or points to valid data > > This allows code to use a construct like `if (gd & gd->...) { ... }` when > accessing the global data pointer. Without this change, it was possible for > a very early trap to cause _exit_trap to read arbitrar

Re: [PATCH v2 6/7] riscv: Ensure gp is NULL or points to valid data

2020-09-14 Thread Bin Meng
On Mon, Sep 14, 2020 at 10:23 PM Sean Anderson wrote: > > This allows code to use a construct like `if (gd & gd->...) { ... }` when > accessing the global data pointer. Without this change, it was possible for > a very early trap to cause _exit_trap to read arbitrary memory. This could > cause a s

[PATCH v2 6/7] riscv: Ensure gp is NULL or points to valid data

2020-09-14 Thread Sean Anderson
This allows code to use a construct like `if (gd & gd->...) { ... }` when accessing the global data pointer. Without this change, it was possible for a very early trap to cause _exit_trap to read arbitrary memory. This could cause a second trap, preventing show_regs from being printed. XIP cannot