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

2020-09-16 Thread Sean Anderson
On 9/15/20 10:23 PM, Rick Chen wrote: > Hi Sean > >> From: U-Boot [mailto:u-boot-boun...@lists.denx.de] On Behalf Of Sean Anderson >> Sent: Monday, September 14, 2020 10:23 PM >> To: u-boot@lists.denx.de >> Cc: Alan Quey-Liang Kao(高魁良); Leo Yu-Chi Liang(梁育齊); Heinrich Schuchardt; >> Bin Meng; Ric

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

2020-09-15 Thread Rick Chen
Hi Sean > From: U-Boot [mailto:u-boot-boun...@lists.denx.de] On Behalf Of Sean Anderson > Sent: Monday, September 14, 2020 10:23 PM > To: u-boot@lists.denx.de > Cc: Alan Quey-Liang Kao(高魁良); Leo Yu-Chi Liang(梁育齊); Heinrich Schuchardt; Bin > Meng; Rick Chen; Sean Anderson > Subject: [PATCH v2 6/7]

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