On Fri, Mar 09, 2018 at 07:37:04PM +1100, Balbir Singh wrote:
> On Fri, Mar 9, 2018 at 7:12 PM, Ram Pai wrote:
> > Once an address range is associated with an allocated pkey, it cannot be
> > reverted back to key-0. There is no valid reason for the above behavior. On
&
han...@intel.com>
cc: Michael Ellermen <m...@ellerman.id.au>
cc: Ingo Molnar <mi...@kernel.org>
Signed-off-by: Ram Pai <linux...@us.ibm.com>
---
arch/powerpc/include/asm/pkeys.h | 19 ++-
arch/x86/include/asm/pkeys.h | 5 +++--
2 files changed, 17 insertions(
: Michael Ellermen
cc: Ingo Molnar
Signed-off-by: Ram Pai
---
arch/powerpc/include/asm/pkeys.h | 19 ++-
arch/x86/include/asm/pkeys.h | 5 +++--
2 files changed, 17 insertions(+), 7 deletions(-)
diff --git a/arch/powerpc/include/asm/pkeys.h b/arch/powerpc/include/asm/pkeys.h
index
Dave,
Is there a reason why the default key; key-0, is not allowed to be
explicitly associated with pages using pkey_mprotect()?
I see valid usecases where an application may initially want to
associate an address-range with some key and latter choose to revert to
its initial state, by
Dave,
Is there a reason why the default key; key-0, is not allowed to be
explicitly associated with pages using pkey_mprotect()?
I see valid usecases where an application may initially want to
associate an address-range with some key and latter choose to revert to
its initial state, by
On Sun, Feb 25, 2018 at 05:27:11PM +0530, Aneesh Kumar K.V wrote:
>
>
> On 02/24/2018 06:35 AM, Ram Pai wrote:
> >On Fri, Feb 23, 2018 at 03:11:45PM +0800, kbuild test robot wrote:
> >>Hi Ram,
> >>
> >>Thank you for the patch! Yet something to improve
On Sun, Feb 25, 2018 at 05:27:11PM +0530, Aneesh Kumar K.V wrote:
>
>
> On 02/24/2018 06:35 AM, Ram Pai wrote:
> >On Fri, Feb 23, 2018 at 03:11:45PM +0800, kbuild test robot wrote:
> >>Hi Ram,
> >>
> >>Thank you for the patch! Yet something to improve
tree, please drop us a note to
> help improve the system]
>
> chmod +x ~/bin/make.cross
...snip..
> # save the attached .config to linux build tree
> make.cross ARCH=powerpc
>
> Note: the
> linux-review/Ram-Pai/mm-x86-powerpc-Enhancements-to-M
tree, please drop us a note to
> help improve the system]
>
> chmod +x ~/bin/make.cross
...snip..
> # save the attached .config to linux build tree
> make.cross ARCH=powerpc
>
> Note: the
> linux-review/Ram-Pai/mm-x86-powerpc-Enhancements-to-M
On Fri, Feb 23, 2018 at 03:33:43PM -0300, Thiago Jung Bauermann wrote:
> This test exercises read and write access to the AMR, IAMR and UAMOR.
>
Tested-by: Ram Pai <linux...@us.ibm.com>
Acked-by: Ram Pai <linux...@us.ibm.com>
> Signed-off-by: Thiago Jung Bauermann <bau
On Fri, Feb 23, 2018 at 03:33:43PM -0300, Thiago Jung Bauermann wrote:
> This test exercises read and write access to the AMR, IAMR and UAMOR.
>
Tested-by: Ram Pai
Acked-by: Ram Pai
> Signed-off-by: Thiago Jung Bauermann
> ---
> tools/testing/selftests/powerpc/include/r
On Fri, Feb 23, 2018 at 03:33:44PM -0300, Thiago Jung Bauermann wrote:
> This test verifies that the AMR, IAMR and UAMOR are being written to a
> process' core file.
>
Acked-by: Ram Pai <linux...@us.ibm.com>
Tested-by: Ram Pai <linux...@us.ibm.com>
> Signed-off-by: Thia
On Fri, Feb 23, 2018 at 03:33:44PM -0300, Thiago Jung Bauermann wrote:
> This test verifies that the AMR, IAMR and UAMOR are being written to a
> process' core file.
>
Acked-by: Ram Pai
Tested-by: Ram Pai
> Signed-off-by: Thiago Jung Bauermann
> ---
> tools/testing/selfte
This is in preparation to accomadate a differing size register
across architectures.
cc: Dave Hansen <dave.han...@intel.com>
cc: Florian Weimer <fwei...@redhat.com>
Signed-off-by: Ram Pai <linux...@us.ibm.com>
---
tools/testing/selftests/vm/pkey-helpers.h| 27 +--
This is in preparation to accomadate a differing size register
across architectures.
cc: Dave Hansen
cc: Florian Weimer
Signed-off-by: Ram Pai
---
tools/testing/selftests/vm/pkey-helpers.h| 27 +-
tools/testing/selftests/vm/protection_keys.c | 69 ++
2
Moved all the generic definition and helper functions to the
header file
cc: Dave Hansen <dave.han...@intel.com>
cc: Florian Weimer <fwei...@redhat.com>
Signed-off-by: Ram Pai <linux...@us.ibm.com>
---
tools/testing/selftests/vm/pkey-helpers.h| 62 +
Moved all the generic definition and helper functions to the
header file
cc: Dave Hansen
cc: Florian Weimer
Signed-off-by: Ram Pai
---
tools/testing/selftests/vm/pkey-helpers.h| 62 ++--
tools/testing/selftests/vm/protection_keys.c | 66
cc: Dave Hansen <dave.han...@intel.com>
cc: Florian Weimer <fwei...@redhat.com>
Signed-off-by: Ram Pai <linux...@us.ibm.com>
---
tools/testing/selftests/vm/Makefile |1 +
tools/testing/selftests/vm/pkey-helpers.h | 223
tools/testing/selftests/vm/protect
cc: Dave Hansen
cc: Florian Weimer
Signed-off-by: Ram Pai
---
tools/testing/selftests/vm/Makefile |1 +
tools/testing/selftests/vm/pkey-helpers.h | 223
tools/testing/selftests/vm/protection_keys.c | 1407 +
tools/testing/selftests/x86/Makefile
helper functions to handler shadow pkey register
cc: Dave Hansen <dave.han...@intel.com>
cc: Florian Weimer <fwei...@redhat.com>
Signed-off-by: Ram Pai <linux...@us.ibm.com>
---
tools/testing/selftests/vm/pkey-helpers.h| 27
tools/testing/selftests/vm
helper functions to handler shadow pkey register
cc: Dave Hansen
cc: Florian Weimer
Signed-off-by: Ram Pai
---
tools/testing/selftests/vm/pkey-helpers.h| 27
tools/testing/selftests/vm/protection_keys.c | 34 -
2 files changed, 49
some pkru references are named to pkey_reg
and some prku references are renamed to pkey
cc: Dave Hansen <dave.han...@intel.com>
cc: Florian Weimer <fwei...@redhat.com>
Signed-off-by: Ram Pai <linux...@us.ibm.com>
---
tools/testing/selftests/vm/pkey-helpers.h| 85 +--
m>
Signed-off-by: Ram Pai <linux...@us.ibm.com>
---
tools/testing/selftests/vm/protection_keys.c |4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/testing/selftests/vm/protection_keys.c
b/tools/testing/selftests/vm/protection_keys.c
index 0109388..ca54a95
instead of clearing the bits, pkey_disable_clear() was setting
the bits. Fixed it.
Also fixed a wrong assertion in that function. When bits are
cleared, the resulting bit value will be less than the original.
cc: Dave Hansen
cc: Florian Weimer
Signed-off-by: Ram Pai
---
tools/testing
some pkru references are named to pkey_reg
and some prku references are renamed to pkey
cc: Dave Hansen
cc: Florian Weimer
Signed-off-by: Ram Pai
---
tools/testing/selftests/vm/pkey-helpers.h| 85 +-
tools/testing/selftests/vm/protection_keys.c | 227
m>
Signed-off-by: Ram Pai <linux...@us.ibm.com>
---
tools/testing/selftests/vm/protection_keys.c |3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/tools/testing/selftests/vm/protection_keys.c
b/tools/testing/selftests/vm/protection_keys.c
index ca54a95..aaf9f09
alloc_random_pkey() was allocating the same pkey every time.
Not all pkeys were geting tested. fixed it.
cc: Dave Hansen <dave.han...@intel.com>
cc: Florian Weimer <fwei...@redhat.com>
Signed-off-by: Ram Pai <linux...@us.ibm.com>
---
tools/testing/selftests/vm/protec
When a key is freed, the key is no more effective.
Clear the bits corresponding to the pkey in the shadow
register. Otherwise it will carry some spurious bits
which can trigger false-positive asserts.
cc: Dave Hansen
cc: Florian Weimer
Signed-off-by: Ram Pai
---
tools/testing/selftests
alloc_random_pkey() was allocating the same pkey every time.
Not all pkeys were geting tested. fixed it.
cc: Dave Hansen
cc: Florian Weimer
Signed-off-by: Ram Pai
---
tools/testing/selftests/vm/protection_keys.c | 10 +++---
1 files changed, 7 insertions(+), 3 deletions(-)
diff --git
m>
Signed-off-by: Ram Pai <linux...@us.ibm.com>
---
tools/testing/selftests/vm/protection_keys.c |3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/tools/testing/selftests/vm/protection_keys.c
b/tools/testing/selftests/vm/protection_keys.c
index c4c73e6..e82bd88
When a key is freed, the key is no more effective.
Clear the bits corresponding to the pkey in the shadow
register. Otherwise it will carry some spurious bits
which can trigger false-positive asserts.
cc: Dave Hansen
cc: Florian Weimer
Signed-off-by: Ram Pai
---
tools/testing/selftests
throughout
cc: Dave Hansen <dave.han...@intel.com>
cc: Florian Weimer <fwei...@redhat.com>
Signed-off-by: Ram Pai <linux...@us.ibm.com>
---
tools/testing/selftests/vm/protection_keys.c |4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/te
throughout
cc: Dave Hansen
cc: Florian Weimer
Signed-off-by: Ram Pai
---
tools/testing/selftests/vm/protection_keys.c |4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/testing/selftests/vm/protection_keys.c
b/tools/testing/selftests/vm/protection_keys.c
index
detect write-violation on a page to which write-disabled
key is associated much after the page is mapped.
cc: Dave Hansen <dave.han...@intel.com>
cc: Florian Weimer <fwei...@redhat.com>
Signed-off-by: Ram Pai <linux...@us.ibm.com>
---
tools/testing/selftests/vm/protec
detect write-violation on a page to which write-disabled
key is associated much after the page is mapped.
cc: Dave Hansen
cc: Florian Weimer
Signed-off-by: Ram Pai
---
tools/testing/selftests/vm/protection_keys.c | 12
1 files changed, 12 insertions(+), 0 deletions(-)
diff
of the pkey register is not restored to its
original state. The test case is responsible for restoring the key
register state to its original value.
cc: Dave Hansen <dave.han...@intel.com>
cc: Florian Weimer <fwei...@redhat.com>
Signed-off-by: Ram Pai <linux...@us.ibm.com>
of the pkey register is not restored to its
original state. The test case is responsible for restoring the key
register state to its original value.
cc: Dave Hansen
cc: Florian Weimer
Signed-off-by: Ram Pai
---
tools/testing/selftests/vm/protection_keys.c |5 +
1 files changed, 5
detect access-violation on a page to which access-disabled
key is associated much after the page is mapped.
cc: Dave Hansen <dave.han...@intel.com>
cc: Florian Weimer <fwei...@redhat.com>
Signed-off-by: Ram Pai <linux...@us.ibm.com>
---
tools/testing/selftests/vm/protec
detect access-violation on a page to which access-disabled
key is associated much after the page is mapped.
cc: Dave Hansen
cc: Florian Weimer
Signed-off-by: Ram Pai
---
tools/testing/selftests/vm/protection_keys.c | 19 +++
1 files changed, 19 insertions(+), 0 deletions
detect write-violation on a page to which access-disabled
key is associated much after the page is mapped.
cc: Dave Hansen <dave.han...@intel.com>
cc: Florian Weimer <fwei...@redhat.com>
Signed-off-by: Ram Pai <linux...@us.ibm.com>
---
tools/testing/selftests/vm/protec
introduce a new allocator that allocates 4k hardware-pages to back
64k linux-page. This allocator is only applicable on powerpc.
cc: Dave Hansen <dave.han...@intel.com>
cc: Florian Weimer <fwei...@redhat.com>
Signed-off-by: Ram Pai <linux...@us.ibm.com>
---
tools/te
n.
cc: Dave Hansen <dave.han...@intel.com>
cc: Florian Weimer <fwei...@redhat.com>
Signed-off-by: Ram Pai <linux...@us.ibm.com>
Signed-off-by: Thiago Jung Bauermann <bauer...@linux.vnet.ibm.com>
tools/testing/selftests/vm/pkey-helpers.h | 3 ++-
1 file changed, 2 insertion
detect write-violation on a page to which access-disabled
key is associated much after the page is mapped.
cc: Dave Hansen
cc: Florian Weimer
Signed-off-by: Ram Pai
---
tools/testing/selftests/vm/protection_keys.c | 13 +
1 files changed, 13 insertions(+), 0 deletions(-)
diff
introduce a new allocator that allocates 4k hardware-pages to back
64k linux-page. This allocator is only applicable on powerpc.
cc: Dave Hansen
cc: Florian Weimer
Signed-off-by: Ram Pai
---
tools/testing/selftests/vm/protection_keys.c | 30 ++
1 files changed, 30
Signed-off-by: Ram Pai
Signed-off-by: Thiago Jung Bauermann
tools/testing/selftests/vm/pkey-helpers.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
---
tools/testing/selftests/vm/pkey-helpers.h |3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/tools/testing
Introduce powerpc implementation for the various
abstractions.
cc: Dave Hansen <dave.han...@intel.com>
cc: Florian Weimer <fwei...@redhat.com>
Signed-off-by: Ram Pai <linux...@us.ibm.com>
---
tools/testing/selftests/vm/pkey-helpers.h| 128 ++
tools
<fwei...@redhat.com>
Signed-off-by: Ram Pai <linux...@us.ibm.com>
---
tools/testing/selftests/vm/pkey-helpers.h| 14 ++
tools/testing/selftests/vm/protection_keys.c |9 -
2 files changed, 18 insertions(+), 5 deletions(-)
diff --git a/tools/testing/selftests
Introduce powerpc implementation for the various
abstractions.
cc: Dave Hansen
cc: Florian Weimer
Signed-off-by: Ram Pai
---
tools/testing/selftests/vm/pkey-helpers.h| 128 ++
tools/testing/selftests/vm/protection_keys.c | 42 +---
2 files changed, 136
The maximum number of keys that can be allocated has to
take into consideration, that some keys are reserved by
the architecture for specific purpose. Hence cannot
be allocated.
Fix the assertion in test_pkey_alloc_exhaust()
cc: Dave Hansen
cc: Florian Weimer
Signed-off-by: Ram Pai
pkey subsystem is supported if the hardware and kernel has support.
We determine that by checking if allocation of a key succeeds or not.
cc: Dave Hansen <dave.han...@intel.com>
cc: Florian Weimer <fwei...@redhat.com>
Signed-off-by: Ram Pai <linux...@us.ibm.com>
---
tools/te
pkey subsystem is supported if the hardware and kernel has support.
We determine that by checking if allocation of a key succeeds or not.
cc: Dave Hansen
cc: Florian Weimer
Signed-off-by: Ram Pai
---
tools/testing/selftests/vm/pkey-helpers.h| 22 --
tools/testing
cleanup the code to satisfy coding styles.
cc: Dave Hansen <dave.han...@intel.com>
cc: Florian Weimer <fwei...@redhat.com>
Signed-off-by: Ram Pai <linux...@us.ibm.com>
---
tools/testing/selftests/vm/protection_keys.c | 81 ++
1 files changed, 43
cleanup the code to satisfy coding styles.
cc: Dave Hansen
cc: Florian Weimer
Signed-off-by: Ram Pai
---
tools/testing/selftests/vm/protection_keys.c | 81 ++
1 files changed, 43 insertions(+), 38 deletions(-)
diff --git a/tools/testing/selftests/vm
open_hugepage_file() <- opens the huge page file
get_start_key() <-- provides the first non-reserved key.
cc: Dave Hansen <dave.han...@intel.com>
cc: Florian Weimer <fwei...@redhat.com>
Signed-off-by: Ram Pai <linux...@us.ibm.com>
---
tools/testing/selftests/vm/
open_hugepage_file() <- opens the huge page file
get_start_key() <-- provides the first non-reserved key.
cc: Dave Hansen
cc: Florian Weimer
Signed-off-by: Ram Pai
---
tools/testing/selftests/vm/pkey-helpers.h| 11 +++
tools/testing/selftests/vm/protection_keys.c
If the flag is 0, no bits will be set. Hence we cant expect
the resulting bitmap to have a higher value than what it
was earlier.
cc: Dave Hansen <dave.han...@intel.com>
cc: Florian Weimer <fwei...@redhat.com>
Signed-off-by: Ram Pai <linux...@us.ibm.com>
---
tools/te
If the flag is 0, no bits will be set. Hence we cant expect
the resulting bitmap to have a higher value than what it
was earlier.
cc: Dave Hansen
cc: Florian Weimer
Signed-off-by: Ram Pai
---
tools/testing/selftests/vm/protection_keys.c |2 +-
1 files changed, 1 insertions(+), 1 deletions
have it defined.
version 11:
(1) fixed a deadlock in the ptrace testcase.
version 10 and prior:
(1) moved the testcase to arch neutral directory
(2) split the changes into incremental patches.
Ram Pai (21):
selftests/x86: Move protecton key selftest to arch neutral
have it defined.
version 11:
(1) fixed a deadlock in the ptrace testcase.
version 10 and prior:
(1) moved the testcase to arch neutral directory
(2) split the changes into incremental patches.
Ram Pai (21):
selftests/x86: Move protecton key selftest to arch neutral
*
to support 32 keys.
- Suggestion by Dave Hansen.
(2) powerpc specific changes to support memory keys.
Ram Pai (3):
mm, powerpc, x86: define VM_PKEY_BITx bits if CONFIG_ARCH_HAS_PKEYS
is enabled
mm, powerpc, x86: introduce an additional vma bit for powerpc
*
to support 32 keys.
- Suggestion by Dave Hansen.
(2) powerpc specific changes to support memory keys.
Ram Pai (3):
mm, powerpc, x86: define VM_PKEY_BITx bits if CONFIG_ARCH_HAS_PKEYS
is enabled
mm, powerpc, x86: introduce an additional vma bit for powerpc
man.id.au>
cc: Benjamin Herrenschmidt <b...@kernel.crashing.org>
cc: Andrew Morton <a...@linux-foundation.org>
Signed-off-by: Ram Pai <linux...@us.ibm.com>
Reviewed-by: Ingo Molnar <mi...@kernel.org>
Reviewed-by: Aneesh Kumar K.V <aneesh.ku...@linux.vnet.ibm.com>
--
Signed-off-by: Ram Pai
Reviewed-by: Ingo Molnar
Reviewed-by: Aneesh Kumar K.V
---
fs/proc/task_mmu.c |4 ++--
include/linux/mm.h |9 +
2 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c
index ec6d298..6b996d0 100644
--- a/fs
cc: Benjamin Herrenschmidt <b...@kernel.crashing.org>
cc: Andrew Morton <a...@linux-foundation.org>
Signed-off-by: Thiago Jung Bauermann <bauer...@linux.vnet.ibm.com>
(fixed compilation errors for x86 configs)
Acked-by: Michal Hocko <mho...@suse.com>
Reviewed-by: Ingo Molnar <m
errenschmidt <b...@kernel.crashing.org>
cc: Andrew Morton <a...@linux-foundation.org>
Reviewed-by: Ingo Molnar <mi...@kernel.org>
Acked-by: Balbir Singh <bsinghar...@gmail.com>
Signed-off-by: Ram Pai <linux...@us.ibm.com>
---
fs/proc/task_mmu.c |1 +
include
-by: Thiago Jung Bauermann
(fixed compilation errors for x86 configs)
Acked-by: Michal Hocko
Reviewed-by: Ingo Molnar
Signed-off-by: Ram Pai
---
arch/powerpc/include/asm/mmu_context.h |5 -
arch/x86/include/asm/mmu_context.h |5 -
arch/x86/include/asm/pkeys.h |1 +
arch
Acked-by: Balbir Singh
Signed-off-by: Ram Pai
---
fs/proc/task_mmu.c |1 +
include/linux/mm.h |3 ++-
2 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c
index 6b996d0..6d83bb7 100644
--- a/fs/proc/task_mmu.c
+++ b/fs/proc/task_mmu.c
On Fri, Feb 02, 2018 at 12:27:27PM +0800, kbuild test robot wrote:
> Hi Ram,
>
> Thank you for the patch! Yet something to improve:
>
> [auto build test ERROR on linus/master]
> [also build test ERROR on v4.15 next-20180201]
> [if your patch is applied to the wrong git tree, please drop us a
On Fri, Feb 02, 2018 at 12:27:27PM +0800, kbuild test robot wrote:
> Hi Ram,
>
> Thank you for the patch! Yet something to improve:
>
> [auto build test ERROR on linus/master]
> [also build test ERROR on v4.15 next-20180201]
> [if your patch is applied to the wrong git tree, please drop us a
Currently only 4bits are allocated in the vma flags to hold 16
keys. This is sufficient for x86. PowerPC supports 32 keys,
which needs 5bits. This patch allocates an additional bit.
Acked-by: Balbir Singh <bsinghar...@gmail.com>
Signed-off-by: Ram Pai <linux...@us.ibm.com>
Currently only 4bits are allocated in the vma flags to hold 16
keys. This is sufficient for x86. PowerPC supports 32 keys,
which needs 5bits. This patch allocates an additional bit.
Acked-by: Balbir Singh
Signed-off-by: Ram Pai
---
fs/proc/task_mmu.c |1 +
include/linux/mm.h |3
VM_PKEY_BITx are defined only if CONFIG_X86_INTEL_MEMORY_PROTECTION_KEYS
is enabled. Powerpc also needs these bits. Hence lets define the
VM_PKEY_BITx bits for any architecture that enables
CONFIG_ARCH_HAS_PKEYS.
Signed-off-by: Ram Pai <linux...@us.ibm.com>
---
fs/proc/task_mmu.c
if the architecture support pkeys, i.e
arch_pkeys_enabled() returns true. This patch
provides x86 implementation for arch_pkeys_enabled().
x86 arch_show_smap() function is not needed anymore.
Deleting it.
Signed-off-by: Ram Pai <linux...@us.ibm.com>
---
arch/x86/include/asm/pkeys.h |1 +
arch/x86/
by Michal Hocko
version prior to v11:
(1) used one additional bit from VM_HIGH_ARCH_*
to support 32 keys.
- Suggestion by Dave Hansen.
(2) powerpc specific changes to support memory keys.
Ram Pai (3):
mm, powerpc, x86: define VM_PKEY_BITx bits
VM_PKEY_BITx are defined only if CONFIG_X86_INTEL_MEMORY_PROTECTION_KEYS
is enabled. Powerpc also needs these bits. Hence lets define the
VM_PKEY_BITx bits for any architecture that enables
CONFIG_ARCH_HAS_PKEYS.
Signed-off-by: Ram Pai
---
fs/proc/task_mmu.c |4 ++--
include/linux/mm.h
if the architecture support pkeys, i.e
arch_pkeys_enabled() returns true. This patch
provides x86 implementation for arch_pkeys_enabled().
x86 arch_show_smap() function is not needed anymore.
Deleting it.
Signed-off-by: Ram Pai
---
arch/x86/include/asm/pkeys.h |1 +
arch/x86/kernel/fpu/xstate.c |5
by Michal Hocko
version prior to v11:
(1) used one additional bit from VM_HIGH_ARCH_*
to support 32 keys.
- Suggestion by Dave Hansen.
(2) powerpc specific changes to support memory keys.
Ram Pai (3):
mm, powerpc, x86: define VM_PKEY_BITx bits
On Tue, Jan 30, 2018 at 01:16:11PM +0100, Michal Hocko wrote:
> On Thu 18-01-18 17:50:48, Ram Pai wrote:
> [...]
> > @@ -851,9 +848,13 @@ static int show_smap(struct seq_file *m, void *v, int
> > is_pid)
> >(unsigned long)(mss
On Tue, Jan 30, 2018 at 01:16:11PM +0100, Michal Hocko wrote:
> On Thu 18-01-18 17:50:48, Ram Pai wrote:
> [...]
> > @@ -851,9 +848,13 @@ static int show_smap(struct seq_file *m, void *v, int
> > is_pid)
> >(unsigned long)(mss
On Tue, Jan 23, 2018 at 03:07:15PM -0600, Eric W. Biederman wrote:
> The helpers added are:
> send_sig_mceerr
> force_sig_mceerr
> force_sig_bnderr
> force_sig_pkuerr
>
> Filling out siginfo properly can ge tricky. Especially for these
> specialized cases where the temptation is to share code
On Tue, Jan 23, 2018 at 03:07:15PM -0600, Eric W. Biederman wrote:
> The helpers added are:
> send_sig_mceerr
> force_sig_mceerr
> force_sig_bnderr
> force_sig_pkuerr
>
> Filling out siginfo properly can ge tricky. Especially for these
> specialized cases where the temptation is to share code
on these changes.
Dave Hansen had comments/suggestions in the initial revisions, which
have been incorporated.
Michael Ellermen has accepted the rest of the powerpc related patches
in this series.
Thanks,
RP
On Thu, Jan 18, 2018 at 05:50:22PM -0800, Ram Pai wrote
on these changes.
Dave Hansen had comments/suggestions in the initial revisions, which
have been incorporated.
Michael Ellermen has accepted the rest of the powerpc related patches
in this series.
Thanks,
RP
On Thu, Jan 18, 2018 at 05:50:22PM -0800, Ram Pai wrote
Moved all the generic definition and helper functions to the
header file
Signed-off-by: Ram Pai <linux...@us.ibm.com>
---
tools/testing/selftests/vm/pkey-helpers.h| 62 ++--
tools/testing/selftests/vm/protection_keys.c | 66 --
2 files c
Moved all the generic definition and helper functions to the
header file
Signed-off-by: Ram Pai
---
tools/testing/selftests/vm/pkey-helpers.h| 62 ++--
tools/testing/selftests/vm/protection_keys.c | 66 --
2 files changed, 57 insertions(+), 71
some pkru references are named to pkey_reg
and some prku references are renamed to pkey
Signed-off-by: Ram Pai <linux...@us.ibm.com>
---
tools/testing/selftests/vm/pkey-helpers.h| 85 +-
tools/testing/selftests/vm/protection_keys.c | 227 ++
2 files c
some pkru references are named to pkey_reg
and some prku references are renamed to pkey
Signed-off-by: Ram Pai
---
tools/testing/selftests/vm/pkey-helpers.h| 85 +-
tools/testing/selftests/vm/protection_keys.c | 227 ++
2 files changed, 164 insertions
This is in preparation to accomadate a differing size register
across architectures.
Signed-off-by: Ram Pai <linux...@us.ibm.com>
---
tools/testing/selftests/vm/pkey-helpers.h| 27 +-
tools/testing/selftests/vm/protection_keys.c | 69 ++
2 files c
This is in preparation to accomadate a differing size register
across architectures.
Signed-off-by: Ram Pai
---
tools/testing/selftests/vm/pkey-helpers.h| 27 +-
tools/testing/selftests/vm/protection_keys.c | 69 ++
2 files changed, 51 insertions(+), 45
instead of clearing the bits, pkey_disable_clear() was setting
the bits. Fixed it.
Also fixed a wrong assertion in that function. When bits are
cleared, the resulting bit value will be less than the original.
Signed-off-by: Ram Pai <linux...@us.ibm.com>
---
tools/testing/selfte
instead of clearing the bits, pkey_disable_clear() was setting
the bits. Fixed it.
Also fixed a wrong assertion in that function. When bits are
cleared, the resulting bit value will be less than the original.
Signed-off-by: Ram Pai
---
tools/testing/selftests/vm/protection_keys.c |4
When a key is freed, the key is no more effective.
Clear the bits corresponding to the pkey in the shadow
register. Otherwise it will carry some spurious bits
which can trigger false-positive asserts.
Signed-off-by: Ram Pai <linux...@us.ibm.com>
---
tools/testing/selfte
When a key is freed, the key is no more effective.
Clear the bits corresponding to the pkey in the shadow
register. Otherwise it will carry some spurious bits
which can trigger false-positive asserts.
Signed-off-by: Ram Pai
---
tools/testing/selftests/vm/protection_keys.c |3 +++
1
helper functions to handler shadow pkey register
Signed-off-by: Ram Pai <linux...@us.ibm.com>
---
tools/testing/selftests/vm/pkey-helpers.h| 27
tools/testing/selftests/vm/protection_keys.c | 34 -
2 files changed, 49 insertions(
helper functions to handler shadow pkey register
Signed-off-by: Ram Pai
---
tools/testing/selftests/vm/pkey-helpers.h| 27
tools/testing/selftests/vm/protection_keys.c | 34 -
2 files changed, 49 insertions(+), 12 deletions(-)
diff --git
alloc_random_pkey() was allocating the same pkey every time.
Not all pkeys were geting tested. fixed it.
Signed-off-by: Ram Pai <linux...@us.ibm.com>
---
tools/testing/selftests/vm/protection_keys.c | 10 +++---
1 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/tools/t
alloc_random_pkey() was allocating the same pkey every time.
Not all pkeys were geting tested. fixed it.
Signed-off-by: Ram Pai
---
tools/testing/selftests/vm/protection_keys.c | 10 +++---
1 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/tools/testing/selftests/vm
throughout
Signed-off-by: Ram Pai <linux...@us.ibm.com>
---
tools/testing/selftests/vm/protection_keys.c |4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/testing/selftests/vm/protection_keys.c
b/tools/testing/selftests/vm/protection_keys.c
index 254b66d..6
throughout
Signed-off-by: Ram Pai
---
tools/testing/selftests/vm/protection_keys.c |4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/testing/selftests/vm/protection_keys.c
b/tools/testing/selftests/vm/protection_keys.c
index 254b66d..6054093 100644
--- a/tools
open_hugepage_file() <- opens the huge page file
get_start_key() <-- provides the first non-reserved key.
Signed-off-by: Ram Pai <linux...@us.ibm.com>
---
tools/testing/selftests/vm/pkey-helpers.h| 11 +++
tools/testing/selftests/vm/protection_keys.c |6 +++---
2 f
101 - 200 of 1121 matches
Mail list logo