Re: [PATCH v4 4/4] sparc64: Add support for ADI (Application Data Integrity)

2017-01-17 Thread Khalid Aziz
On 01/16/2017 09:39 PM, David Miller wrote: From: Khalid Aziz Date: Wed, 11 Jan 2017 09:12:54 -0700 diff --git a/arch/sparc/kernel/mdesc.c b/arch/sparc/kernel/mdesc.c index 8a6982d..68b03bf 100644 --- a/arch/sparc/kernel/mdesc.c +++ b/arch/sparc/kernel/mdesc.c @@ -20,6 +20,7 @@ #include #in

Re: [PATCH v4 4/4] sparc64: Add support for ADI (Application Data Integrity)

2017-01-17 Thread Khalid Aziz
On 01/17/2017 12:42 PM, David Miller wrote: From: Khalid Aziz Date: Tue, 17 Jan 2017 12:32:46 -0700 On 01/16/2017 09:39 PM, David Miller wrote: From: Khalid Aziz Date: Wed, 11 Jan 2017 09:12:54 -0700 + __asm__ __volatile__( + ".word 0xa1438000\n\t"

Re: [PATCH v4 4/4] sparc64: Add support for ADI (Application Data Integrity)

2017-01-17 Thread David Miller
From: Khalid Aziz Date: Tue, 17 Jan 2017 12:32:46 -0700 > On 01/16/2017 09:39 PM, David Miller wrote: >> From: Khalid Aziz >> Date: Wed, 11 Jan 2017 09:12:54 -0700 >> >>> + __asm__ __volatile__( >>> + ".word 0xa1438000\n\t" /* rd %mcdper, %l0 */ >> >> Just use "rd %

Re: [PATCH v4 4/4] sparc64: Add support for ADI (Application Data Integrity)

2017-01-17 Thread Khalid Aziz
On 01/16/2017 09:39 PM, David Miller wrote: From: Khalid Aziz Date: Wed, 11 Jan 2017 09:12:54 -0700 + __asm__ __volatile__( + ".word 0xa1438000\n\t"/* rd %mcdper, %l0 */ Just use "rd %%asr14, %0" this way you don't have to play all of these fixed

Re: [PATCH v4 4/4] sparc64: Add support for ADI (Application Data Integrity)

2017-01-16 Thread David Miller
From: Khalid Aziz Date: Wed, 11 Jan 2017 09:12:54 -0700 > + __asm__ __volatile__( > + ".word 0xa1438000\n\t" /* rd %mcdper, %l0 */ Just use "rd %%asr14, %0" this way you don't have to play all of these fixed register games which kill the code generated by gcc.

[PATCH v4 4/4] sparc64: Add support for ADI (Application Data Integrity)

2017-01-11 Thread Khalid Aziz
ADI is a new feature supported on SPARC M7 and newer processors to allow hardware to catch rogue accesses to memory. ADI is supported for data fetches only and not instruction fetches. An app can enable ADI on its data pages, set version tags on them and use versioned addresses to access the data p