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
open_hugepage_file() <- opens the huge page file
get_start_key() <-- provides the first non-reserved key.
Signed-off-by: Ram Pai
---
tools/testing/selftests/vm/pkey-helpers.h| 11 +++
tools/testing/selftests/vm/protection_keys.c |6 +++---
2 files changed, 14 insertions
Introduce powerpc implementation for the different
abstactions.
Signed-off-by: Ram Pai <linux...@us.ibm.com>
---
tools/testing/selftests/vm/pkey-helpers.h| 109 ++
tools/testing/selftests/vm/protection_keys.c | 40 ++
2 files changed, 118 insertions(
Introduce powerpc implementation for the different
abstactions.
Signed-off-by: Ram Pai
---
tools/testing/selftests/vm/pkey-helpers.h| 109 ++
tools/testing/selftests/vm/protection_keys.c | 40 ++
2 files changed, 118 insertions(+), 31 deletions(-)
diff
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()
Signed-off-by: Ram Pai <linux...@us.ibm.com>
---
tools/t
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
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()
Signed-off-by: Ram Pai
---
tools/testing/selftests/vm/pkey
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
detect write-violation on a page to which write-disabled
key is associated much after the page is mapped.
Signed-off-by: Ram Pai <linux...@us.ibm.com>
---
tools/testing/selftests/vm/protection_keys.c | 12
1 files changed, 12 insertions(+), 0 deletions(-)
diff --git a
detect write-violation on a page to which write-disabled
key is associated much after the page is mapped.
Signed-off-by: Ram Pai
---
tools/testing/selftests/vm/protection_keys.c | 12
1 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/tools/testing/selftests/vm
detect write-violation on a page to which access-disabled
key is associated much after the page is mapped.
Signed-off-by: Ram Pai <linux...@us.ibm.com>
---
tools/testing/selftests/vm/protection_keys.c | 13 +
1 files changed, 13 insertions(+), 0 deletions(-)
diff --git a
detect write-violation on a page to which access-disabled
key is associated much after the page is mapped.
Signed-off-by: Ram Pai
---
tools/testing/selftests/vm/protection_keys.c | 13 +
1 files changed, 13 insertions(+), 0 deletions(-)
diff --git a/tools/testing/selftests/vm
introduce a new allocator that allocates 4k hardware-pages to back
64k linux-page. This allocator is only applicable on powerpc.
Signed-off-by: Ram Pai <linux...@us.ibm.com>
---
tools/testing/selftests/vm/protection_keys.c | 30 ++
1 files changed, 30 insertions
introduce a new allocator that allocates 4k hardware-pages to back
64k linux-page. This allocator is only applicable on powerpc.
Signed-off-by: Ram Pai
---
tools/testing/selftests/vm/protection_keys.c | 30 ++
1 files changed, 30 insertions(+), 0 deletions(-)
diff
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 insertions(+), 1 deletion(-)
---
tools/testing/selftests/vm/pkey-helpers.h |3 ++-
1 files changed,
From: Thiago Jung Bauermann
This test exercises read and write access to the AMR.
Signed-off-by: Thiago Jung Bauermann
---
tools/testing/selftests/powerpc/include/reg.h |1 +
tools/testing/selftests/powerpc/ptrace/Makefile
in run_tests_once () at protection_keys.c:1414
#14 0x100561a4 in main () at protection_keys.c:1459
The fix is to refrain from calling fflush() when inside a signal handler.
The output may not be as pretty but at least the testcase will be able to
move on.
Signed-off-by: Ram Pai
Signed-off
From: Thiago Jung Bauermann
This test exercises read and write access to the AMR.
Signed-off-by: Thiago Jung Bauermann
---
tools/testing/selftests/powerpc/include/reg.h |1 +
tools/testing/selftests/powerpc/ptrace/Makefile|5 +-
From: Thiago Jung Bauermann
This test verifies that the AMR is being written to a
process' core file.
Signed-off-by: Thiago Jung Bauermann
---
tools/testing/selftests/powerpc/ptrace/Makefile|2 +-
From: Thiago Jung Bauermann
This test verifies that the AMR is being written to a
process' core file.
Signed-off-by: Thiago Jung Bauermann
---
tools/testing/selftests/powerpc/ptrace/Makefile|2 +-
tools/testing/selftests/powerpc/ptrace/core-pkey.c | 438
2 files
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.
Signed-off-by: Ram Pai <linux...@us.ibm.com>
---
tools/testing/selftests/vm/protection_keys.c |5 +
1 files changed, 5 insertions
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.
Signed-off-by: Ram Pai
---
tools/testing/selftests/vm/protection_keys.c |5 +
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git
pkey subsystem is supported if the hardware and kernel has support.
We determine that by checking if allocation of a key succeeds or not.
Signed-off-by: Ram Pai <linux...@us.ibm.com>
---
tools/testing/selftests/vm/pkey-helpers.h| 22 --
tools/testing/selfte
pkey subsystem is supported if the hardware and kernel has support.
We determine that by checking if allocation of a key succeeds or not.
Signed-off-by: Ram Pai
---
tools/testing/selftests/vm/pkey-helpers.h| 22 --
tools/testing/selftests/vm/protection_keys.c |9
cleanup the code to satisfy coding styles.
Signed-off-by: Ram Pai <linux...@us.ibm.com>
---
tools/testing/selftests/vm/protection_keys.c | 81 ++
1 files changed, 43 insertions(+), 38 deletions(-)
diff --git a/tools/testing/selftests/vm/protection_keys.c
b
detect access-violation on a page to which access-disabled
key is associated much after the page is mapped.
Signed-off-by: Ram Pai <linux...@us.ibm.com>
---
tools/testing/selftests/vm/protection_keys.c | 19 +++
1 files changed, 19 insertions(+), 0 deletions(-)
diff
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.
Signed-off-by: Ram Pai <linux...@us.ibm.com>
---
tools/testing/selftests/vm/protection_keys.c |2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff
cleanup the code to satisfy coding styles.
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/protection_keys.c
b/tools/testing/selftests/vm
detect access-violation on a page to which access-disabled
key is associated much after the page is mapped.
Signed-off-by: Ram Pai
---
tools/testing/selftests/vm/protection_keys.c | 19 +++
1 files changed, 19 insertions(+), 0 deletions(-)
diff --git a/tools/testing/selftests
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.
Signed-off-by: Ram Pai
---
tools/testing/selftests/vm/protection_keys.c |2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/tools/testing
architectures(using EC2 ubuntu VM instances).
Ram Pai (21):
selftests/x86: Move protecton key selftest to arch neutral directory
selftests/vm: rename all references to pkru to a generic name
selftests/vm: move generic definitions to header file
selftests/vm: typecast the pkey register
selftests/vm
architectures(using EC2 ubuntu VM instances).
Ram Pai (21):
selftests/x86: Move protecton key selftest to arch neutral directory
selftests/vm: rename all references to pkru to a generic name
selftests/vm: move generic definitions to header file
selftests/vm: typecast the pkey register
selftests/vm
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/protection_keys.c | 1407 +
tools/testing/selftests/x86/Makefile
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 |2 +-
tools/testing
Sorry please ignore this series. It was a duplication mistake.
I aborted the send midway, but a few escaped into the cyber.
RP
On Mon, Jan 22, 2018 at 10:26:29AM -0800, Ram Pai wrote:
> Memory protection keys enable applications to protect its
> address space from inadvertent acces
Sorry please ignore this series. It was a duplication mistake.
I aborted the send midway, but a few escaped into the cyber.
RP
On Mon, Jan 22, 2018 at 10:26:29AM -0800, Ram Pai wrote:
> Memory protection keys enable applications to protect its
> address space from inadvertent acces
Since PowerPC and Intel both support memory protection keys, moving
the documenation to arch-neutral directory.
Signed-off-by: Ram Pai <linux...@us.ibm.com>
---
Documentation/vm/protection-keys.txt | 90 +
Documentation/x86/protection-keys.txt
Since PowerPC and Intel both support memory protection keys, moving
the documenation to arch-neutral directory.
Signed-off-by: Ram Pai
---
Documentation/vm/protection-keys.txt | 90 +
Documentation/x86/protection-keys.txt | 90
Memory protection keys enable applications to protect its
address space from inadvertent access from itself.
This feature is now enabled on powerpc architecture.
The patches moves the documentation to arch neutral directory and
captures the latest information.
Ram Pai (2):
Documentation/x86
Memory protection keys enable applications to protect its
address space from inadvertent access from itself.
This feature is now enabled on powerpc architecture.
The patches moves the documentation to arch neutral directory and
captures the latest information.
Ram Pai (2):
Documentation/x86
Add documentation updates that capture PowerPC specific changes.
Signed-off-by: Thiago Jung Bauermann <bauer...@linux.vnet.ibm.com>
Signed-off-by: Ram Pai <linux...@us.ibm.com>
---
Documentation/vm/protection-keys.txt | 84 +
1 files changed, 6
Add documentation updates that capture PowerPC specific changes.
Signed-off-by: Thiago Jung Bauermann
Signed-off-by: Ram Pai
---
Documentation/vm/protection-keys.txt | 84 +
1 files changed, 63 insertions(+), 21 deletions(-)
diff --git a/Documentation/vm
version v1: Initial version
Ram Pai (26):
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 pkey
powerpc: initial pkey plumbing
powerpc: track allocation status of all pkeys
powerpc: helper functi
version v1: Initial version
Ram Pai (26):
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 pkey
powerpc: initial pkey plumbing
powerpc: track allocation status of all pkeys
powerpc: helper functi
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
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
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
On Fri, Jan 19, 2018 at 10:09:41AM -0600, Eric W. Biederman wrote:
> Ram Pai <linux...@us.ibm.com> writes:
>
> > Currently the architecture specific code is expected to
> > display the protection keys in smap for a given vma.
> > This can lead to redundant
On Fri, Jan 19, 2018 at 10:09:41AM -0600, Eric W. Biederman wrote:
> Ram Pai writes:
>
> > Currently the architecture specific code is expected to
> > display the protection keys in smap for a given vma.
> > This can lead to redundant code and possibly to diverg
Store and restore the AMR, IAMR and UAMOR register state of the task
before scheduling out and after scheduling in, respectively.
Signed-off-by: Ram Pai <linux...@us.ibm.com>
---
arch/powerpc/include/asm/mmu_context.h |3 ++
arch/powerpc/include/asm/pkeys.h |4 ++
arch/p
Store and restore the AMR, IAMR and UAMOR register state of the task
before scheduling out and after scheduling in, respectively.
Signed-off-by: Ram Pai
---
arch/powerpc/include/asm/mmu_context.h |3 ++
arch/powerpc/include/asm/pkeys.h |4 ++
arch/powerpc/include/asm/processor.h
This patch provides the implementation of execute-only pkey.
The architecture-independent layer expects the arch-dependent
layer, to support the ability to create and enable a special
key which has execute-only permission.
Acked-by: Balbir Singh <bsinghar...@gmail.com>
Signed-off-by: R
This patch provides the implementation of execute-only pkey.
The architecture-independent layer expects the arch-dependent
layer, to support the ability to create and enable a special
key which has execute-only permission.
Acked-by: Balbir Singh
Signed-off-by: Ram Pai
---
arch/powerpc/include
arch-independent code expects the arch to map
a pkey into the vma's protection bit setting.
The patch provides that ability.
Signed-off-by: Ram Pai <linux...@us.ibm.com>
---
arch/powerpc/include/asm/mman.h |7 ++-
arch/powerpc/include/asm/pkeys.h | 11 +++
arch/powe
arch independent code calls arch_override_mprotect_pkey()
to return a pkey that best matches the requested protection.
This patch provides the implementation.
Signed-off-by: Ram Pai <linux...@us.ibm.com>
---
arch/powerpc/include/asm/mmu_context.h |5
arch/powerpc/include/asm/p
arch independent code calls arch_override_mprotect_pkey()
to return a pkey that best matches the requested protection.
This patch provides the implementation.
Signed-off-by: Ram Pai
---
arch/powerpc/include/asm/mmu_context.h |5
arch/powerpc/include/asm/pkeys.h | 21
arch-independent code expects the arch to map
a pkey into the vma's protection bit setting.
The patch provides that ability.
Signed-off-by: Ram Pai
---
arch/powerpc/include/asm/mman.h |7 ++-
arch/powerpc/include/asm/pkeys.h | 11 +++
arch/powerpc/mm/pkeys.c
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
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
.
BUT, on 4k kernel, bit 3, and 4 could not be freed up. remember?
Hence we have to be satisfied with 5, 6 and 7.
Signed-off-by: Ram Pai <linux...@us.ibm.com>
---
arch/powerpc/include/asm/book3s/64/pgtable.h | 25 -
arch/powerpc/include/asm/mman.h
Map the PTE protection key bits to the HPTE key protection bits,
while creating HPTE entries.
Acked-by: Balbir Singh <bsinghar...@gmail.com>
Signed-off-by: Ram Pai <linux...@us.ibm.com>
---
arch/powerpc/include/asm/book3s/64/mmu-hash.h |5 +
arch/powerpc/include/asm/m
.
BUT, on 4k kernel, bit 3, and 4 could not be freed up. remember?
Hence we have to be satisfied with 5, 6 and 7.
Signed-off-by: Ram Pai
---
arch/powerpc/include/asm/book3s/64/pgtable.h | 25 -
arch/powerpc/include/asm/mman.h |6 ++
arch/powerpc/include/asm
Map the PTE protection key bits to the HPTE key protection bits,
while creating HPTE entries.
Acked-by: Balbir Singh
Signed-off-by: Ram Pai
---
arch/powerpc/include/asm/book3s/64/mmu-hash.h |5 +
arch/powerpc/include/asm/mmu_context.h|6 ++
arch/powerpc/include/asm
helper function that checks if the read/write/execute is allowed
on the pte.
Signed-off-by: Ram Pai <linux...@us.ibm.com>
---
arch/powerpc/include/asm/book3s/64/pgtable.h |4 +++
arch/powerpc/include/asm/pkeys.h |9
arch/powerpc/mm/pkeys.c
helper function that checks if the read/write/execute is allowed
on the pte.
Signed-off-by: Ram Pai
---
arch/powerpc/include/asm/book3s/64/pgtable.h |4 +++
arch/powerpc/include/asm/pkeys.h |9
arch/powerpc/mm/pkeys.c | 28
The value of the pkey, whose protection got violated,
is made available in si_pkey field of the siginfo structure.
Signed-off-by: Ram Pai <linux...@us.ibm.com>
Signed-off-by: Thiago Jung Bauermann <bauer...@linux.vnet.ibm.com>
---
arch/powerpc/include/asm/bug.h |1 +
arch/po
The value of the pkey, whose protection got violated,
is made available in si_pkey field of the siginfo structure.
Signed-off-by: Ram Pai
Signed-off-by: Thiago Jung Bauermann
---
arch/powerpc/include/asm/bug.h |1 +
arch/powerpc/kernel/traps.c| 12 +++-
arch/powerpc/mm
support for pkeys.
Signed-off-by: Ram Pai <linux...@us.ibm.com>
---
arch/powerpc/include/asm/cputable.h | 16 ++---
arch/powerpc/include/asm/pkeys.h|3 ++
arch/powerpc/mm/pkeys.c | 61 +-
3 files changed, 65 insertions(+), 15 del
support for pkeys.
Signed-off-by: Ram Pai
---
arch/powerpc/include/asm/cputable.h | 16 ++---
arch/powerpc/include/asm/pkeys.h|3 ++
arch/powerpc/mm/pkeys.c | 61 +-
3 files changed, 65 insertions(+), 15 deletions(-)
diff --git a/arch
From: Thiago Jung Bauermann <bauer...@linux.vnet.ibm.com>
The AMR/IAMR/UAMOR are part of the program context.
Allow it to be accessed via ptrace and through core files.
Signed-off-by: Ram Pai <linux...@us.ibm.com>
Signed-off-by: Thiago Jung Bauermann <bauer...@linux.vnet.ibm
Make sure that the kernel does not access user pages without
checking their key-protection.
Signed-off-by: Ram Pai <linux...@us.ibm.com>
---
arch/powerpc/include/asm/book3s/64/pgtable.h | 19 +++
1 files changed, 19 insertions(+), 0 deletions(-)
diff --git a/arch/p
Make sure that the kernel does not access user pages without
checking their key-protection.
Signed-off-by: Ram Pai
---
arch/powerpc/include/asm/book3s/64/pgtable.h | 19 +++
1 files changed, 19 insertions(+), 0 deletions(-)
diff --git a/arch/powerpc/include/asm/book3s/64
From: Thiago Jung Bauermann
The AMR/IAMR/UAMOR are part of the program context.
Allow it to be accessed via ptrace and through core files.
Signed-off-by: Ram Pai
Signed-off-by: Thiago Jung Bauermann
---
arch/powerpc/include/asm/pkeys.h|5 +++
arch/powerpc/include/uapi/asm/elf.h
Arch neutral code needs to know if the architecture supports
protection keys to display protection key in smaps. Hence
introducing arch_pkeys_enabled().
This patch also provides x86 implementation for
arch_pkeys_enabled().
Signed-off-by: Ram Pai <linux...@us.ibm.com>
---
arch/x86/inclu
Arch neutral code needs to know if the architecture supports
protection keys to display protection key in smaps. Hence
introducing arch_pkeys_enabled().
This patch also provides x86 implementation for
arch_pkeys_enabled().
Signed-off-by: Ram Pai
---
arch/x86/include/asm/pkeys.h |1
Patch provides the ability for a process to
associate a pkey with a address range.
Signed-off-by: Ram Pai <linux...@us.ibm.com>
---
arch/powerpc/include/asm/systbl.h |1 +
arch/powerpc/include/asm/unistd.h |4 +---
arch/powerpc/include/uapi/asm/unistd.h |1 +
3
Patch provides the ability for a process to
associate a pkey with a address range.
Signed-off-by: Ram Pai
---
arch/powerpc/include/asm/systbl.h |1 +
arch/powerpc/include/asm/unistd.h |4 +---
arch/powerpc/include/uapi/asm/unistd.h |1 +
3 files changed, 3 insertions(+), 3
Finally this patch provides the ability for a process to
allocate and free a protection key.
Signed-off-by: Ram Pai <linux...@us.ibm.com>
---
arch/powerpc/include/asm/systbl.h |2 ++
arch/powerpc/include/asm/unistd.h |4 +---
arch/powerpc/include/uapi/asm/unistd.h |2
Finally this patch provides the ability for a process to
allocate and free a protection key.
Signed-off-by: Ram Pai
---
arch/powerpc/include/asm/systbl.h |2 ++
arch/powerpc/include/asm/unistd.h |4 +---
arch/powerpc/include/uapi/asm/unistd.h |2 ++
3 files changed, 5
if the architecture support pkeys.
x86 arch_show_smap() function is not needed anymore.
Delete it.
Signed-off-by: Ram Pai <linux...@us.ibm.com>
---
arch/x86/kernel/setup.c |8
fs/proc/task_mmu.c | 11 ++-
2 files changed, 6 insertions(+), 13 deletions(-)
diff --git a/ar
if the architecture support pkeys.
x86 arch_show_smap() function is not needed anymore.
Delete it.
Signed-off-by: Ram Pai
---
arch/x86/kernel/setup.c |8
fs/proc/task_mmu.c | 11 ++-
2 files changed, 6 insertions(+), 13 deletions(-)
diff --git a/arch/x86/kernel/setup.c b/arch/x86
Introduce helper functions that can initialize the bits in the AMR,
IAMR and UAMOR register; the bits that correspond to the given pkey.
Reviewed-by: Thiago Jung Bauermann <bauer...@linux.vnet.ibm.com>
Signed-off-by: Ram Pai <linux...@us.ibm.com>
---
arch/powerpc/mm/pk
.
Signed-off-by: Ram Pai <linux...@us.ibm.com>
Signed-off-by: Thiago Jung Bauermann <bauer...@linux.vnet.ibm.com>
---
arch/powerpc/include/asm/reg.h |1 -
arch/powerpc/kernel/exceptions-64s.S |2 +-
arch/powerpc/mm/fault.c | 22 ++
3 f
get_mm_addr_key() helper returns the pkey associated with
an address corresponding to a given mm_struct.
Signed-off-by: Ram Pai <linux...@us.ibm.com>
---
arch/powerpc/include/asm/mmu.h |9 +
arch/powerpc/mm/hash_utils_64.c | 24
2 files chang
Introduce helper functions that can initialize the bits in the AMR,
IAMR and UAMOR register; the bits that correspond to the given pkey.
Reviewed-by: Thiago Jung Bauermann
Signed-off-by: Ram Pai
---
arch/powerpc/mm/pkeys.c | 47 +++
1 files
.
Signed-off-by: Ram Pai
Signed-off-by: Thiago Jung Bauermann
---
arch/powerpc/include/asm/reg.h |1 -
arch/powerpc/kernel/exceptions-64s.S |2 +-
arch/powerpc/mm/fault.c | 22 ++
3 files changed, 23 insertions(+), 2 deletions(-)
diff --git a/arch
201 - 300 of 1259 matches
Mail list logo