Re: [PATCH 2/2] riscv: Add KASAN support

2019-09-03 Thread Nick Hu
Hi Daniel, On Wed, Sep 04, 2019 at 01:08:51AM +1000, Daniel Axtens wrote: > Nick Hu writes: > > > Hi Christoph, > > > > Thanks for your reply. I will answer one by one. > > > > Hi Alexander, > > > > Would you help me for the question about SOFTIRQENTRY_TEXT? > > > > On Mon, Aug 12, 2019 at

Re: [PATCH 2/2] riscv: Add KASAN support

2019-09-03 Thread Daniel Axtens
Nick Hu writes: > Hi Christoph, > > Thanks for your reply. I will answer one by one. > > Hi Alexander, > > Would you help me for the question about SOFTIRQENTRY_TEXT? > > On Mon, Aug 12, 2019 at 11:10:50PM +0800, Christoph Hellwig wrote: >> > 2. KASAN can't debug the modules since the modules

Re: [PATCH 2/2] riscv: Add KASAN support

2019-08-22 Thread Andrey Ryabinin
On 8/14/19 10:44 AM, Nick Hu wrote: >> >>> diff --git a/arch/riscv/kernel/vmlinux.lds.S >>> b/arch/riscv/kernel/vmlinux.lds.S >>> index 23cd1a9..9700980 100644 >>> --- a/arch/riscv/kernel/vmlinux.lds.S >>> +++ b/arch/riscv/kernel/vmlinux.lds.S >>> @@ -46,6 +46,7 @@ SECTIONS >>>

Re: [PATCH 2/2] riscv: Add KASAN support

2019-08-14 Thread Nick Hu
Hi Christoph, Thanks for your reply. I will answer one by one. Hi Alexander, Would you help me for the question about SOFTIRQENTRY_TEXT? On Mon, Aug 12, 2019 at 11:10:50PM +0800, Christoph Hellwig wrote: > > 2. KASAN can't debug the modules since the modules are allocated in VMALLOC > > area.

Re: [PATCH 2/2] riscv: Add KASAN support

2019-08-12 Thread Christoph Hellwig
> 2. KASAN can't debug the modules since the modules are allocated in VMALLOC > area. We mapped the shadow memory, which corresponding to VMALLOC area, > to the kasan_early_shadow_page because we don't have enough physical space > for all the shadow memory corresponding to VMALLOC area. How do

[PATCH 2/2] riscv: Add KASAN support

2019-08-07 Thread Nick Hu
This patch ports the feature Kernel Address SANitizer (KASAN). Note: The start address of shadow memory is at the beginning of kernel space, which is 2^64 - (2^39 / 2) in SV39. The size of the kernel space is 2^38 bytes so the size of shadow memory should be 2^38 / 8. Thus, the shadow memory