Re: [RFC][PATCH] arm64: Add support for CONFIG_DEBUG_VIRTUAL

2016-11-02 Thread Laura Abbott
On 10/29/2016 02:39 AM, Ard Biesheuvel wrote: On 28 October 2016 at 23:07, Laura Abbott wrote: diff --git a/arch/arm64/mm/physaddr.c b/arch/arm64/mm/physaddr.c new file mode 100644 index 000..6c271e2 --- /dev/null +++ b/arch/arm64/mm/physaddr.c @@ -0,0 +1,17 @@

Re: [RFC][PATCH] arm64: Add support for CONFIG_DEBUG_VIRTUAL

2016-11-02 Thread Laura Abbott
On 10/29/2016 02:39 AM, Ard Biesheuvel wrote: On 28 October 2016 at 23:07, Laura Abbott wrote: diff --git a/arch/arm64/mm/physaddr.c b/arch/arm64/mm/physaddr.c new file mode 100644 index 000..6c271e2 --- /dev/null +++ b/arch/arm64/mm/physaddr.c @@ -0,0 +1,17 @@ +#include + +#include +

Re: [RFC][PATCH] arm64: Add support for CONFIG_DEBUG_VIRTUAL

2016-10-29 Thread Ard Biesheuvel
On 28 October 2016 at 23:07, Laura Abbott wrote: diff --git a/arch/arm64/mm/physaddr.c b/arch/arm64/mm/physaddr.c new file mode 100644 index 000..6c271e2 --- /dev/null +++ b/arch/arm64/mm/physaddr.c @@ -0,0 +1,17 @@ +#include +

Re: [RFC][PATCH] arm64: Add support for CONFIG_DEBUG_VIRTUAL

2016-10-29 Thread Ard Biesheuvel
On 28 October 2016 at 23:07, Laura Abbott wrote: diff --git a/arch/arm64/mm/physaddr.c b/arch/arm64/mm/physaddr.c new file mode 100644 index 000..6c271e2 --- /dev/null +++ b/arch/arm64/mm/physaddr.c @@ -0,0 +1,17 @@ +#include + +#include +

Re: [RFC][PATCH] arm64: Add support for CONFIG_DEBUG_VIRTUAL

2016-10-28 Thread Laura Abbott
diff --git a/arch/arm64/mm/physaddr.c b/arch/arm64/mm/physaddr.c new file mode 100644 index 000..6c271e2 --- /dev/null +++ b/arch/arm64/mm/physaddr.c @@ -0,0 +1,17 @@ +#include + +#include + +unsigned long __virt_to_phys(unsigned long x) +{ +phys_addr_t __x = (phys_addr_t)x; + +if

Re: [RFC][PATCH] arm64: Add support for CONFIG_DEBUG_VIRTUAL

2016-10-28 Thread Laura Abbott
diff --git a/arch/arm64/mm/physaddr.c b/arch/arm64/mm/physaddr.c new file mode 100644 index 000..6c271e2 --- /dev/null +++ b/arch/arm64/mm/physaddr.c @@ -0,0 +1,17 @@ +#include + +#include + +unsigned long __virt_to_phys(unsigned long x) +{ +phys_addr_t __x = (phys_addr_t)x; + +if

Re: [RFC][PATCH] arm64: Add support for CONFIG_DEBUG_VIRTUAL

2016-10-28 Thread Laura Abbott
On 10/28/2016 07:49 AM, Mark Rutland wrote: Hi Laura, On Thu, Oct 27, 2016 at 05:18:12PM -0700, Laura Abbott wrote: x86 has an option CONFIG_DEBUG_VIRTUAL to do additional checks on virt_to_phys calls. The goal is to catch users who are calling virt_to_phys on non-linear addresses immediately.

Re: [RFC][PATCH] arm64: Add support for CONFIG_DEBUG_VIRTUAL

2016-10-28 Thread Laura Abbott
On 10/28/2016 07:49 AM, Mark Rutland wrote: Hi Laura, On Thu, Oct 27, 2016 at 05:18:12PM -0700, Laura Abbott wrote: x86 has an option CONFIG_DEBUG_VIRTUAL to do additional checks on virt_to_phys calls. The goal is to catch users who are calling virt_to_phys on non-linear addresses immediately.

Re: [RFC][PATCH] arm64: Add support for CONFIG_DEBUG_VIRTUAL

2016-10-28 Thread Laura Abbott
On 10/28/2016 12:52 AM, Ard Biesheuvel wrote: Hi Laura, On 28 October 2016 at 01:18, Laura Abbott wrote: x86 has an option CONFIG_DEBUG_VIRTUAL to do additional checks on virt_to_phys calls. The goal is to catch users who are calling virt_to_phys on non-linear addresses

Re: [RFC][PATCH] arm64: Add support for CONFIG_DEBUG_VIRTUAL

2016-10-28 Thread Laura Abbott
On 10/28/2016 12:52 AM, Ard Biesheuvel wrote: Hi Laura, On 28 October 2016 at 01:18, Laura Abbott wrote: x86 has an option CONFIG_DEBUG_VIRTUAL to do additional checks on virt_to_phys calls. The goal is to catch users who are calling virt_to_phys on non-linear addresses immediately. As

Re: [RFC][PATCH] arm64: Add support for CONFIG_DEBUG_VIRTUAL

2016-10-28 Thread Mark Rutland
Hi Laura, On Thu, Oct 27, 2016 at 05:18:12PM -0700, Laura Abbott wrote: > x86 has an option CONFIG_DEBUG_VIRTUAL to do additional checks > on virt_to_phys calls. The goal is to catch users who are calling > virt_to_phys on non-linear addresses immediately. As features > such as CONFIG_VMAP_STACK

Re: [RFC][PATCH] arm64: Add support for CONFIG_DEBUG_VIRTUAL

2016-10-28 Thread Mark Rutland
Hi Laura, On Thu, Oct 27, 2016 at 05:18:12PM -0700, Laura Abbott wrote: > x86 has an option CONFIG_DEBUG_VIRTUAL to do additional checks > on virt_to_phys calls. The goal is to catch users who are calling > virt_to_phys on non-linear addresses immediately. As features > such as CONFIG_VMAP_STACK

Re: [RFC][PATCH] arm64: Add support for CONFIG_DEBUG_VIRTUAL

2016-10-28 Thread Mark Rutland
On Fri, Oct 28, 2016 at 08:52:50AM +0100, Ard Biesheuvel wrote: > Hi Laura, > > On 28 October 2016 at 01:18, Laura Abbott wrote: > > x86 has an option CONFIG_DEBUG_VIRTUAL to do additional checks > > on virt_to_phys calls. The goal is to catch users who are calling > >

Re: [RFC][PATCH] arm64: Add support for CONFIG_DEBUG_VIRTUAL

2016-10-28 Thread Mark Rutland
On Fri, Oct 28, 2016 at 08:52:50AM +0100, Ard Biesheuvel wrote: > Hi Laura, > > On 28 October 2016 at 01:18, Laura Abbott wrote: > > x86 has an option CONFIG_DEBUG_VIRTUAL to do additional checks > > on virt_to_phys calls. The goal is to catch users who are calling > > virt_to_phys on non-linear

Re: [RFC][PATCH] arm64: Add support for CONFIG_DEBUG_VIRTUAL

2016-10-28 Thread Ard Biesheuvel
Hi Laura, On 28 October 2016 at 01:18, Laura Abbott wrote: > x86 has an option CONFIG_DEBUG_VIRTUAL to do additional checks > on virt_to_phys calls. The goal is to catch users who are calling > virt_to_phys on non-linear addresses immediately. As features > such as

Re: [RFC][PATCH] arm64: Add support for CONFIG_DEBUG_VIRTUAL

2016-10-28 Thread Ard Biesheuvel
Hi Laura, On 28 October 2016 at 01:18, Laura Abbott wrote: > x86 has an option CONFIG_DEBUG_VIRTUAL to do additional checks > on virt_to_phys calls. The goal is to catch users who are calling > virt_to_phys on non-linear addresses immediately. As features > such as CONFIG_VMAP_STACK get enabled

[RFC][PATCH] arm64: Add support for CONFIG_DEBUG_VIRTUAL

2016-10-27 Thread Laura Abbott
x86 has an option CONFIG_DEBUG_VIRTUAL to do additional checks on virt_to_phys calls. The goal is to catch users who are calling virt_to_phys on non-linear addresses immediately. As features such as CONFIG_VMAP_STACK get enabled for arm64, this becomes increasingly important. Add checks to catch

[RFC][PATCH] arm64: Add support for CONFIG_DEBUG_VIRTUAL

2016-10-27 Thread Laura Abbott
x86 has an option CONFIG_DEBUG_VIRTUAL to do additional checks on virt_to_phys calls. The goal is to catch users who are calling virt_to_phys on non-linear addresses immediately. As features such as CONFIG_VMAP_STACK get enabled for arm64, this becomes increasingly important. Add checks to catch