Re: [RFC/PATCH v2 02/10] x86_64: add KASan support

2014-10-01 Thread Andrey Ryabinin
On 10/01/2014 07:31 PM, H. Peter Anvin wrote: > On 09/10/2014 10:31 PM, Andrey Ryabinin wrote: >> On 09/11/2014 08:01 AM, H. Peter Anvin wrote: >>> On 09/10/2014 07:31 AM, Andrey Ryabinin wrote: This patch add arch specific code for kernel address sanitizer. 16TB of virtual

Re: [RFC/PATCH v2 02/10] x86_64: add KASan support

2014-10-01 Thread H. Peter Anvin
On 09/10/2014 10:31 PM, Andrey Ryabinin wrote: > On 09/11/2014 08:01 AM, H. Peter Anvin wrote: >> On 09/10/2014 07:31 AM, Andrey Ryabinin wrote: >>> This patch add arch specific code for kernel address sanitizer. >>> >>> 16TB of virtual addressed used for shadow memory. >>> It's located in range

Re: [RFC/PATCH v2 02/10] x86_64: add KASan support

2014-10-01 Thread H. Peter Anvin
On 09/10/2014 10:31 PM, Andrey Ryabinin wrote: On 09/11/2014 08:01 AM, H. Peter Anvin wrote: On 09/10/2014 07:31 AM, Andrey Ryabinin wrote: This patch add arch specific code for kernel address sanitizer. 16TB of virtual addressed used for shadow memory. It's located in range

Re: [RFC/PATCH v2 02/10] x86_64: add KASan support

2014-10-01 Thread Andrey Ryabinin
On 10/01/2014 07:31 PM, H. Peter Anvin wrote: On 09/10/2014 10:31 PM, Andrey Ryabinin wrote: On 09/11/2014 08:01 AM, H. Peter Anvin wrote: On 09/10/2014 07:31 AM, Andrey Ryabinin wrote: This patch add arch specific code for kernel address sanitizer. 16TB of virtual addressed used for shadow

Re: [RFC/PATCH v2 02/10] x86_64: add KASan support

2014-09-18 Thread Sasha Levin
On 09/11/2014 07:51 AM, Andrey Ryabinin wrote: > On 09/11/2014 08:29 AM, Sasha Levin wrote: >> > On 09/11/2014 12:26 AM, H. Peter Anvin wrote: >>> >> Except you just broke PVop kernels. >> > >> > So is this why v2 refuses to boot on my KVM guest? (was digging >> > into that before I send a mail

Re: [RFC/PATCH v2 02/10] x86_64: add KASan support

2014-09-18 Thread Sasha Levin
On 09/11/2014 07:51 AM, Andrey Ryabinin wrote: On 09/11/2014 08:29 AM, Sasha Levin wrote: On 09/11/2014 12:26 AM, H. Peter Anvin wrote: Except you just broke PVop kernels. So is this why v2 refuses to boot on my KVM guest? (was digging into that before I send a mail out). Maybe

Re: [RFC/PATCH v2 02/10] x86_64: add KASan support

2014-09-11 Thread Andrey Ryabinin
On 09/11/2014 08:29 AM, Sasha Levin wrote: > On 09/11/2014 12:26 AM, H. Peter Anvin wrote: >> Except you just broke PVop kernels. > > So is this why v2 refuses to boot on my KVM guest? (was digging > into that before I send a mail out). > Maybe this will help? From: Andrey Ryabinin Subject:

Re: [RFC/PATCH v2 02/10] x86_64: add KASan support

2014-09-11 Thread Andrey Ryabinin
On 09/11/2014 08:29 AM, Sasha Levin wrote: On 09/11/2014 12:26 AM, H. Peter Anvin wrote: Except you just broke PVop kernels. So is this why v2 refuses to boot on my KVM guest? (was digging into that before I send a mail out). Maybe this will help? From: Andrey Ryabinin

Re: [RFC/PATCH v2 02/10] x86_64: add KASan support

2014-09-10 Thread Andrey Ryabinin
On 09/11/2014 08:01 AM, H. Peter Anvin wrote: > On 09/10/2014 07:31 AM, Andrey Ryabinin wrote: >> This patch add arch specific code for kernel address sanitizer. >> >> 16TB of virtual addressed used for shadow memory. >> It's located in range [0x8000 - 0x9000] >> Therefore

Re: [RFC/PATCH v2 02/10] x86_64: add KASan support

2014-09-10 Thread Andrey Ryabinin
On 09/11/2014 08:46 AM, Andi Kleen wrote: > On Wed, Sep 10, 2014 at 09:33:11PM -0700, H. Peter Anvin wrote: >> On 09/10/2014 09:29 PM, Sasha Levin wrote: >>> On 09/11/2014 12:26 AM, H. Peter Anvin wrote: Except you just broke PVop kernels. >>> >>> So is this why v2 refuses to boot on my KVM

Re: [RFC/PATCH v2 02/10] x86_64: add KASan support

2014-09-10 Thread H. Peter Anvin
On 09/10/2014 09:46 PM, Andi Kleen wrote: > On Wed, Sep 10, 2014 at 09:33:11PM -0700, H. Peter Anvin wrote: >> On 09/10/2014 09:29 PM, Sasha Levin wrote: >>> On 09/11/2014 12:26 AM, H. Peter Anvin wrote: Except you just broke PVop kernels. >>> >>> So is this why v2 refuses to boot on my KVM

Re: [RFC/PATCH v2 02/10] x86_64: add KASan support

2014-09-10 Thread Andi Kleen
On Wed, Sep 10, 2014 at 09:33:11PM -0700, H. Peter Anvin wrote: > On 09/10/2014 09:29 PM, Sasha Levin wrote: > > On 09/11/2014 12:26 AM, H. Peter Anvin wrote: > >> Except you just broke PVop kernels. > > > > So is this why v2 refuses to boot on my KVM guest? (was digging > > into that before I

Re: [RFC/PATCH v2 02/10] x86_64: add KASan support

2014-09-10 Thread H. Peter Anvin
On 09/10/2014 09:29 PM, Sasha Levin wrote: > On 09/11/2014 12:26 AM, H. Peter Anvin wrote: >> Except you just broke PVop kernels. > > So is this why v2 refuses to boot on my KVM guest? (was digging > into that before I send a mail out). > No, KVM should be fine. It is Xen PV which ends up as a

Re: [RFC/PATCH v2 02/10] x86_64: add KASan support

2014-09-10 Thread H. Peter Anvin
On 09/10/2014 09:29 PM, Sasha Levin wrote: > On 09/11/2014 12:26 AM, H. Peter Anvin wrote: >> Except you just broke PVop kernels. > > So is this why v2 refuses to boot on my KVM guest? (was digging > into that before I send a mail out). > No, KVM should be fine. It is Xen PV which ends up as a

Re: [RFC/PATCH v2 02/10] x86_64: add KASan support

2014-09-10 Thread Sasha Levin
On 09/11/2014 12:26 AM, H. Peter Anvin wrote: > Except you just broke PVop kernels. So is this why v2 refuses to boot on my KVM guest? (was digging into that before I send a mail out). Thanks, Sasha -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a

Re: [RFC/PATCH v2 02/10] x86_64: add KASan support

2014-09-10 Thread H. Peter Anvin
Except you just broke PVop kernels. Sent from my tablet, pardon any formatting problems. > On Sep 10, 2014, at 15:45, Dave Hansen wrote: > >> On 09/10/2014 01:30 PM, Andrey Ryabinin wrote: >> Yes, there is a reason for this. For inline instrumentation we need to >> catch access to userspace

Re: [RFC/PATCH v2 02/10] x86_64: add KASan support

2014-09-10 Thread H. Peter Anvin
On 09/10/2014 07:31 AM, Andrey Ryabinin wrote: > This patch add arch specific code for kernel address sanitizer. > > 16TB of virtual addressed used for shadow memory. > It's located in range [0x8000 - 0x9000] > Therefore PAGE_OFFSET has to be changed from

Re: [RFC/PATCH v2 02/10] x86_64: add KASan support

2014-09-10 Thread H. Peter Anvin
On 09/10/2014 07:31 AM, Andrey Ryabinin wrote: > This patch add arch specific code for kernel address sanitizer. > > 16TB of virtual addressed used for shadow memory. > It's located in range [0x8000 - 0x9000] > Therefore PAGE_OFFSET has to be changed from

Re: [RFC/PATCH v2 02/10] x86_64: add KASan support

2014-09-10 Thread Dave Hansen
On 09/10/2014 01:30 PM, Andrey Ryabinin wrote: > Yes, there is a reason for this. For inline instrumentation we need to > catch access to userspace without any additional check. > This means that we need shadow of 1 << 61 bytes and we don't have so > many addresses available. That sounds

Re: [RFC/PATCH v2 02/10] x86_64: add KASan support

2014-09-10 Thread Andrey Ryabinin
2014-09-10 19:46 GMT+04:00 Dave Hansen : > Overall, the approach here looks pretty sane. As you noted, it would be > nice to keep PAGE_OFFSET in one place, but it's not a deal breaker for > me. The use of the vmemmap code looks to be a nice fit. > > Few nits below. > > On 09/10/2014 07:31 AM,

Re: [RFC/PATCH v2 02/10] x86_64: add KASan support

2014-09-10 Thread Dave Hansen
Overall, the approach here looks pretty sane. As you noted, it would be nice to keep PAGE_OFFSET in one place, but it's not a deal breaker for me. The use of the vmemmap code looks to be a nice fit. Few nits below. On 09/10/2014 07:31 AM, Andrey Ryabinin wrote: > 16TB of virtual addressed used

[RFC/PATCH v2 02/10] x86_64: add KASan support

2014-09-10 Thread Andrey Ryabinin
This patch add arch specific code for kernel address sanitizer. 16TB of virtual addressed used for shadow memory. It's located in range [0x8000 - 0x9000] Therefore PAGE_OFFSET has to be changed from 0x8800 to 0x9000. At early stage we map whole

[RFC/PATCH v2 02/10] x86_64: add KASan support

2014-09-10 Thread Andrey Ryabinin
This patch add arch specific code for kernel address sanitizer. 16TB of virtual addressed used for shadow memory. It's located in range [0x8000 - 0x9000] Therefore PAGE_OFFSET has to be changed from 0x8800 to 0x9000. At early stage we map whole

Re: [RFC/PATCH v2 02/10] x86_64: add KASan support

2014-09-10 Thread Dave Hansen
Overall, the approach here looks pretty sane. As you noted, it would be nice to keep PAGE_OFFSET in one place, but it's not a deal breaker for me. The use of the vmemmap code looks to be a nice fit. Few nits below. On 09/10/2014 07:31 AM, Andrey Ryabinin wrote: 16TB of virtual addressed used

Re: [RFC/PATCH v2 02/10] x86_64: add KASan support

2014-09-10 Thread Andrey Ryabinin
2014-09-10 19:46 GMT+04:00 Dave Hansen dave.han...@intel.com: Overall, the approach here looks pretty sane. As you noted, it would be nice to keep PAGE_OFFSET in one place, but it's not a deal breaker for me. The use of the vmemmap code looks to be a nice fit. Few nits below. On

Re: [RFC/PATCH v2 02/10] x86_64: add KASan support

2014-09-10 Thread Dave Hansen
On 09/10/2014 01:30 PM, Andrey Ryabinin wrote: Yes, there is a reason for this. For inline instrumentation we need to catch access to userspace without any additional check. This means that we need shadow of 1 61 bytes and we don't have so many addresses available. That sounds reasonable. --

Re: [RFC/PATCH v2 02/10] x86_64: add KASan support

2014-09-10 Thread H. Peter Anvin
On 09/10/2014 07:31 AM, Andrey Ryabinin wrote: This patch add arch specific code for kernel address sanitizer. 16TB of virtual addressed used for shadow memory. It's located in range [0x8000 - 0x9000] Therefore PAGE_OFFSET has to be changed from 0x8800 to

Re: [RFC/PATCH v2 02/10] x86_64: add KASan support

2014-09-10 Thread H. Peter Anvin
On 09/10/2014 07:31 AM, Andrey Ryabinin wrote: This patch add arch specific code for kernel address sanitizer. 16TB of virtual addressed used for shadow memory. It's located in range [0x8000 - 0x9000] Therefore PAGE_OFFSET has to be changed from 0x8800 to

Re: [RFC/PATCH v2 02/10] x86_64: add KASan support

2014-09-10 Thread H. Peter Anvin
Except you just broke PVop kernels. Sent from my tablet, pardon any formatting problems. On Sep 10, 2014, at 15:45, Dave Hansen dave.han...@intel.com wrote: On 09/10/2014 01:30 PM, Andrey Ryabinin wrote: Yes, there is a reason for this. For inline instrumentation we need to catch access to

Re: [RFC/PATCH v2 02/10] x86_64: add KASan support

2014-09-10 Thread Sasha Levin
On 09/11/2014 12:26 AM, H. Peter Anvin wrote: Except you just broke PVop kernels. So is this why v2 refuses to boot on my KVM guest? (was digging into that before I send a mail out). Thanks, Sasha -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message

Re: [RFC/PATCH v2 02/10] x86_64: add KASan support

2014-09-10 Thread H. Peter Anvin
On 09/10/2014 09:29 PM, Sasha Levin wrote: On 09/11/2014 12:26 AM, H. Peter Anvin wrote: Except you just broke PVop kernels. So is this why v2 refuses to boot on my KVM guest? (was digging into that before I send a mail out). No, KVM should be fine. It is Xen PV which ends up as a

Re: [RFC/PATCH v2 02/10] x86_64: add KASan support

2014-09-10 Thread H. Peter Anvin
On 09/10/2014 09:29 PM, Sasha Levin wrote: On 09/11/2014 12:26 AM, H. Peter Anvin wrote: Except you just broke PVop kernels. So is this why v2 refuses to boot on my KVM guest? (was digging into that before I send a mail out). No, KVM should be fine. It is Xen PV which ends up as a

Re: [RFC/PATCH v2 02/10] x86_64: add KASan support

2014-09-10 Thread Andi Kleen
On Wed, Sep 10, 2014 at 09:33:11PM -0700, H. Peter Anvin wrote: On 09/10/2014 09:29 PM, Sasha Levin wrote: On 09/11/2014 12:26 AM, H. Peter Anvin wrote: Except you just broke PVop kernels. So is this why v2 refuses to boot on my KVM guest? (was digging into that before I send a mail

Re: [RFC/PATCH v2 02/10] x86_64: add KASan support

2014-09-10 Thread H. Peter Anvin
On 09/10/2014 09:46 PM, Andi Kleen wrote: On Wed, Sep 10, 2014 at 09:33:11PM -0700, H. Peter Anvin wrote: On 09/10/2014 09:29 PM, Sasha Levin wrote: On 09/11/2014 12:26 AM, H. Peter Anvin wrote: Except you just broke PVop kernels. So is this why v2 refuses to boot on my KVM guest? (was

Re: [RFC/PATCH v2 02/10] x86_64: add KASan support

2014-09-10 Thread Andrey Ryabinin
On 09/11/2014 08:46 AM, Andi Kleen wrote: On Wed, Sep 10, 2014 at 09:33:11PM -0700, H. Peter Anvin wrote: On 09/10/2014 09:29 PM, Sasha Levin wrote: On 09/11/2014 12:26 AM, H. Peter Anvin wrote: Except you just broke PVop kernels. So is this why v2 refuses to boot on my KVM guest? (was

Re: [RFC/PATCH v2 02/10] x86_64: add KASan support

2014-09-10 Thread Andrey Ryabinin
On 09/11/2014 08:01 AM, H. Peter Anvin wrote: On 09/10/2014 07:31 AM, Andrey Ryabinin wrote: This patch add arch specific code for kernel address sanitizer. 16TB of virtual addressed used for shadow memory. It's located in range [0x8000 - 0x9000] Therefore PAGE_OFFSET