Re: [PATCH v9 00/51] powerpc, mm: Memory Protection Keys

2017-11-06 Thread Florian Weimer
* Ram Pai: > On Mon, Nov 06, 2017 at 10:28:41PM +0100, Florian Weimer wrote: >> * Ram Pai: >> >> > Testing: >> > --- >> > This patch series has passed all the protection key >> > tests available in the selftest directory.The >> > tests are updated to work on both x86 and powerpc. >> > The sel

[PATCH] documentation: update list of available compiled-in fonts

2017-11-06 Thread Randy Dunlap
From: Randy Dunlap Update list of available compiled-in fonts in lib/fonts/: add 6x10 and drop RomanLarge (which was reverted 12 years ago). Signed-off-by: Randy Dunlap Cc: Geert Uytterhoeven --- Documentation/fb/fbcon.txt |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- lnx-

Re: [PATCH 0/1] USB Audio Device Class 3.0 Gadget support

2017-11-06 Thread Ruslan Bilovol
On Tue, Nov 7, 2017 at 3:52 AM, Ruslan Bilovol wrote: > Hi, > > This patch adds USB Audio Device Class 3.0 [1] function > support to gadget subsystem. > I didn't add UAC3 support to legacy gadget as it will > make preprocessor configuration too complex (UAC3 device > must have two configurations f

[PATCH 1/1] usb: gadget: add USB Audio Device Class 3.0 gadget support

2017-11-06 Thread Ruslan Bilovol
Recently released USB Audio Class 3.0 specification introduces many significant changes comparing to previous versions, like - new Power Domains, support for LPM/L1 - new Cluster descriptor - changed layout of all class-specific descriptors - new High Capability descriptors - New class-specifi

[PATCH 0/1] USB Audio Device Class 3.0 Gadget support

2017-11-06 Thread Ruslan Bilovol
Hi, This patch adds USB Audio Device Class 3.0 [1] function support to gadget subsystem. I didn't add UAC3 support to legacy gadget as it will make preprocessor configuration too complex (UAC3 device must have two configurations for backward compatibility, first is UAC1/2 and second is UAC3), yet

Re: [v4,1/6] dt-bindings: pmbus: Add Maxim MAX31785 documentation

2017-11-06 Thread Guenter Roeck
On Fri, Nov 03, 2017 at 03:53:01PM +1100, Andrew Jeffery wrote: > Signed-off-by: Andrew Jeffery > Acked-by: Rob Herring Applied to hwmon-next. Thanks, Guenter > --- > .../devicetree/bindings/hwmon/max31785.txt | 22 > ++ > 1 file changed, 22 insertions(+) > creat

Re: [PATCH v9 00/51] powerpc, mm: Memory Protection Keys

2017-11-06 Thread Ram Pai
On Mon, Nov 06, 2017 at 10:28:41PM +0100, Florian Weimer wrote: > * Ram Pai: > > > Testing: > > --- > > This patch series has passed all the protection key > > tests available in the selftest directory.The > > tests are updated to work on both x86 and powerpc. > > The selftests have passed on

Re: [PATCH v4 1/6] dt-bindings: pmbus: Add Maxim MAX31785 documentation

2017-11-06 Thread Rob Herring
On Fri, Nov 03, 2017 at 03:53:01PM +1100, Andrew Jeffery wrote: > Signed-off-by: Andrew Jeffery > --- > .../devicetree/bindings/hwmon/max31785.txt | 22 > ++ > 1 file changed, 22 insertions(+) > create mode 100644 Documentation/devicetree/bindings/hwmon/max31785.txt

Re: [PATCH v9 00/51] powerpc, mm: Memory Protection Keys

2017-11-06 Thread Florian Weimer
* Ram Pai: > Testing: > --- > This patch series has passed all the protection key > tests available in the selftest directory.The > tests are updated to work on both x86 and powerpc. > The selftests have passed on x86 and powerpc hardware. How do you deal with the key reuse problem? Is it th

[PATCHv3 1/1] locking/qspinlock/x86: Avoid test-and-set when PV_DEDICATED is set

2017-11-06 Thread Eduardo Valentin
Currently, the existing qspinlock implementation will fallback to test-and-set if the hypervisor has not set the PV_UNHALT flag. This patch gives the opportunity to guest kernels to select between test-and-set and the regular queueu fair lock implementation based on the PV_DEDICATED KVM feature fl

Re: [PATCH v16 00/13] support "task_isolation" mode

2017-11-06 Thread Christopher Lameter
On Fri, 3 Nov 2017, Chris Metcalf wrote: > However, it doesn't seem possible to do the synchronous cancellation of > the vmstat deferred work with irqs disabled, though if there's a way, > it would be a little cleaner to do that; Christoph? We can certainly > update the statistics with interrupts

Re: [PATCH v2 3/6] PM / core: Add SMART_SUSPEND driver flag

2017-11-06 Thread Rafael J. Wysocki
On Mon, Nov 6, 2017 at 9:09 AM, Ulf Hansson wrote: > On 28 October 2017 at 00:22, Rafael J. Wysocki wrote: >> From: Rafael J. Wysocki >> >> Define and document a SMART_SUSPEND flag to instruct bus types and PM >> domains that the system suspend callbacks provided by the driver can >> cope with r

[PATCH] Documentation/rs485: Fix missing zero init on sample code

2017-11-06 Thread Ricardo Ribalda Delgado
The sample code does not initialize to zero a local variable and then it uses the uninitialized code. Fix in case someone copy/paste the sample code. Signed-off-by: Ricardo Ribalda Delgado --- Documentation/serial/serial-rs485.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --gi

[PATCH v9 00/51] powerpc, mm: Memory Protection Keys

2017-11-06 Thread Ram Pai
Memory protection keys enable applications to protect its address space from inadvertent access from or corruption by itself. These patches along with the pte-bit freeing patch series enables the protection key feature on powerpc; 4k and 64k hashpage kernels. It also changes the generic and x86 co

[PATCH v9 03/51] powerpc: initial pkey plumbing

2017-11-06 Thread Ram Pai
Basic plumbing to initialize the pkey system. Nothing is enabled yet. A later patch will enable it ones all the infrastructure is in place. Signed-off-by: Ram Pai --- arch/powerpc/Kconfig | 15 arch/powerpc/include/asm/mmu_context.h |5 +++ arch/powerpc/i

[PATCH v9 01/51] mm, powerpc, x86: define VM_PKEY_BITx bits if CONFIG_ARCH_HAS_PKEYS is enabled

2017-11-06 Thread Ram Pai
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 |

[PATCH v9 02/51] mm, powerpc, x86: introduce an additional vma bit for powerpc pkey

2017-11-06 Thread Ram Pai
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 ++-

[PATCH v9 05/51] powerpc: helper function to read,write AMR,IAMR,UAMOR registers

2017-11-06 Thread Ram Pai
Implements helper functions to read and write the key related registers; AMR, IAMR, UAMOR. AMR register tracks the read,write permission of a key IAMR register tracks the execute permission of a key UAMOR register enables and disables a key Acked-by: Balbir Singh Reviewed-by: Thiago Jung Bauerma

[PATCH v9 08/51] powerpc: implementation for arch_set_user_pkey_access()

2017-11-06 Thread Ram Pai
This patch provides the detailed implementation for a user to allocate a key and enable it in the hardware. It provides the plumbing, but it cannot be used till the system call is implemented. The next patch will do so. Reviewed-by: Thiago Jung Bauermann Signed-off-by: Ram Pai --- arch/powerp

[PATCH v9 04/51] powerpc: track allocation status of all pkeys

2017-11-06 Thread Ram Pai
Total 32 keys are available on power7 and above. However pkey 0,1 are reserved. So effectively we have 30 pkeys. On 4K kernels, we do not have 5 bits in the PTE to represent all the keys; we only have 3bits.Two of those keys are reserved; pkey 0 and pkey 1. So effectively we have 6 pkeys

[PATCH v9 06/51] powerpc: helper functions to initialize AMR, IAMR and UAMOR registers

2017-11-06 Thread Ram Pai
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 changed

[PATCH v9 07/51] powerpc: cleanup AMR, IAMR when a key is allocated or freed

2017-11-06 Thread Ram Pai
Cleanup the bits corresponding to a key in the AMR, and IAMR register, when the key is newly allocated/activated or is freed. We dont want some residual bits cause the hardware enforce unintended behavior when the key is activated or freed. Reviewed-by: Thiago Jung Bauermann Signed-off-by: Ram Pa

[PATCH v9 11/51] powerpc: introduce execute-only pkey

2017-11-06 Thread Ram Pai
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/a

[PATCH v9 09/51] powerpc: ability to create execute-disabled pkeys

2017-11-06 Thread Ram Pai
powerpc has hardware support to disable execute on a pkey. This patch enables the ability to create execute-disabled keys. Signed-off-by: Ram Pai --- arch/powerpc/include/uapi/asm/mman.h |6 ++ arch/powerpc/mm/pkeys.c | 16 2 files changed, 22 insertions(+

[PATCH v9 10/51] powerpc: store and restore the pkey state across context switches

2017-11-06 Thread Ram Pai
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

[PATCH v9 13/51] powerpc: implementation for arch_override_mprotect_pkey()

2017-11-06 Thread Ram Pai
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 +++

[PATCH v9 15/51] powerpc: Program HPTE key protection bits

2017-11-06 Thread Ram Pai
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/pkey

[PATCH v9 12/51] powerpc: ability to associate pkey to a vma

2017-11-06 Thread Ram Pai
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 |8

[PATCH v9 14/51] powerpc: map vma key-protection bits to pte key bits.

2017-11-06 Thread Ram Pai
Map the key protection bits of the vma to the pkey bits in the PTE. The PTE bits used for pkey are 3,4,5,6 and 57. The first four bits are the same four bits that were freed up initially in this patch series. remember? :-) Without those four bits this patch wouldn't be possible. BUT, o

[PATCH v9 17/51] powerpc: check key protection for user page access

2017-11-06 Thread Ram Pai
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 | 13 + 1 files changed, 13 insertions(+), 0 deletions(-) diff --git a/arch/powerpc/include/asm/book3s/64/pgtable.h

[PATCH v9 16/51] powerpc: helper to validate key-access permissions of a pte

2017-11-06 Thread Ram Pai
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 +

[PATCH v9 18/51] powerpc: implementation for arch_vma_access_permitted()

2017-11-06 Thread Ram Pai
This patch provides the implementation for arch_vma_access_permitted(). Returns true if the requested access is allowed by pkey associated with the vma. Signed-off-by: Ram Pai --- arch/powerpc/include/asm/mmu_context.h |5 +++- arch/powerpc/mm/pkeys.c| 34 ++

[PATCH v9 19/51] powerpc: Handle exceptions caused by pkey violation

2017-11-06 Thread Ram Pai
Handle Data and Instruction exceptions caused by memory protection-key. The CPU will detect the key fault if the HPTE is already programmed with the key. However if the HPTE is not hashed, a key fault will not be detected by the hardware. The software will detect pkey violation in such a case.

[PATCH v9 21/51] powerpc: Deliver SEGV signal on pkey violation

2017-11-06 Thread Ram Pai
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 --- arch/powerpc/include/asm/bug.h |1 + arch/powerpc/kernel/traps.c| 12 - arch/powerpc/mm/fault.c| 55 ++

[PATCH v9 20/51] powerpc: introduce get_mm_addr_key() helper

2017-11-06 Thread Ram Pai
get_mm_addr_key() helper returns the pkey associated with an address corresponding to a given mm_struct. Signed-off-by: Ram Pai --- arch/powerpc/include/asm/mmu.h |9 + arch/powerpc/mm/hash_utils_64.c | 24 2 files changed, 33 insertions(+), 0 deletions(-)

[PATCH v9 23/51] powerpc: Enable pkey subsystem

2017-11-06 Thread Ram Pai
PAPR defines 'ibm,processor-storage-keys' property. It exports two values. The first value holds the number of data-access keys and the second holds the number of instruction-access keys. Due to a bug in the firmware, instruction-access keys is always reported as zero. However any key can be

[PATCH v9 25/51] powerpc: sys_pkey_mprotect() system call

2017-11-06 Thread Ram Pai
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

[PATCH v9 22/51] powerpc/ptrace: Add memory protection key regset

2017-11-06 Thread Ram Pai
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 |1

[PATCH v9 27/51] mm, x86 : introduce arch_pkeys_enabled()

2017-11-06 Thread Ram Pai
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 + arc

[PATCH v9 26/51] powerpc: add sys_pkey_modify() system call

2017-11-06 Thread Ram Pai
sys_pkey_modify() is powerpc specific system call. It enables the ability to modify *any* attribute of a key. Since powerpc disallows modification of IAMR from user space an application is unable to change a key's execute-attribute. This system call helps accomplish the above. Signed-off

[PATCH v9 28/51] mm: display pkey in smaps if arch_pkeys_enabled() is true

2017-11-06 Thread Ram Pai
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 divergent formats in which the key gets displayed. This patch changes the implementation. It displays the pkey only if the archite

[PATCH v9 29/51] mm/mprotect, powerpc/mm/pkeys, x86/mm/pkeys: Add sysfs interface

2017-11-06 Thread Ram Pai
From: Thiago Jung Bauermann Expose useful information for programs using memory protection keys. Provide implementation for powerpc and x86. On a powerpc system with pkeys support, here is what is shown: $ head /sys/kernel/mm/protection_keys/* ==> /sys/kernel/mm/protection_keys/disable_access_s

[PATCH v9 31/51] Documentation/vm: PowerPC specific updates to memory protection keys

2017-11-06 Thread Ram Pai
Add documentation updates that capture PowerPC specific changes. Signed-off-by: Thiago Jung Bauermann Signed-off-by: Ram Pai --- Documentation/vm/protection-keys.txt | 126 +++--- 1 files changed, 101 insertions(+), 25 deletions(-) diff --git a/Documentation/vm/pro

[PATCH v9 30/51] Documentation/x86: Move protecton key documentation to arch neutral directory

2017-11-06 Thread Ram Pai
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 | 85 + Documentation/x86/protection-keys.txt | 85

[PATCH v9 32/51] selftest/x86: Move protecton key selftest to arch neutral directory

2017-11-06 Thread Ram Pai
Signed-off-by: Ram Pai --- tools/testing/selftests/vm/Makefile |1 + tools/testing/selftests/vm/pkey-helpers.h | 220 tools/testing/selftests/vm/protection_keys.c | 1395 + tools/testing/selftests/x86/Makefile |2 +- tools/testing/self

[PATCH v9 33/51] selftest/vm: rename all references to pkru to a generic name

2017-11-06 Thread Ram Pai
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(+), 1

[PATCH v9 37/51] selftest/vm: fix the wrong assert in pkey_disable_set()

2017-11-06 Thread Ram Pai
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/selfte

[PATCH v9 34/51] selftest/vm: move generic definitions to header file

2017-11-06 Thread Ram Pai
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 | 54 -- 2 files changed, 57 insertions(+), 59 del

[PATCH v9 35/51] selftest/vm: typecast the pkey register

2017-11-06 Thread Ram Pai
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 | 71 ++ 2 files changed, 52 insertions(+), 46 de

[PATCH v9 36/51] selftest/vm: generic function to handle shadow key register

2017-11-06 Thread Ram Pai
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 a/to

[PATCH v9 40/51] selftest/vm: fix alloc_random_pkey() to make it really random

2017-11-06 Thread Ram Pai
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/protection

[PATCH v9 39/51] selftest/vm: clear the bits in shadow reg when a pkey is freed.

2017-11-06 Thread Ram Pai
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 fi

[PATCH v9 38/51] selftest/vm: fixed bugs in pkey_disable_clear()

2017-11-06 Thread Ram Pai
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 ++-- 1

[PATCH v9 45/51] selftest/vm: fix an assertion in test_pkey_alloc_exhaust()

2017-11-06 Thread Ram Pai
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-helpers

[PATCH v9 41/51] selftest/vm: introduce two arch independent abstraction

2017-11-06 Thread Ram Pai
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(+), 3

[PATCH v9 44/51] selftest/vm: powerpc implementation for generic abstraction

2017-11-06 Thread Ram Pai
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 | 38 ++ 2 files changed, 117 insertions(+), 30 deletions(-) diff --g

[PATCH v9 42/51] selftest/vm: pkey register should match shadow pkey

2017-11-06 Thread Ram Pai
expected_pkey_fault() is comparing the contents of pkey register with 0. This may not be true all the time. There could be bits set by default by the architecture which can never be changed. Hence compare the value against shadow pkey register, which is supposed to track the bits accurately all thr

[PATCH v9 46/51] selftest/vm: associate key on a mapped page and detect access violation

2017-11-06 Thread Ram Pai
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/

[PATCH v9 48/51] selftest/vm: detect write violation on a mapped access-denied-key page

2017-11-06 Thread Ram Pai
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/prot

[PATCH v9 47/51] selftest/vm: associate key on a mapped page and detect write violation

2017-11-06 Thread Ram Pai
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/protec

[PATCH v9 50/51] selftests/powerpc: Add ptrace tests for Protection Key register

2017-11-06 Thread Ram Pai
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 +- .../testing/selftests/powerpc/ptrace/ptrace-pkey

[PATCH v9 49/51] selftest/vm: sub-page allocator

2017-11-06 Thread Ram Pai
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 --gi

[PATCH v9 51/51] selftests/powerpc: Add core file test for Protection Key register

2017-11-06 Thread Ram Pai
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 c

[PATCH v9 43/51] selftest/vm: generic cleanup

2017-11-06 Thread Ram Pai
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/protec

[PATCH v9 24/51] powerpc: sys_pkey_alloc() and sys_pkey_free() system calls

2017-11-06 Thread Ram Pai
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 inser

Re: [PATCH v2 3/6] PM / core: Add SMART_SUSPEND driver flag

2017-11-06 Thread Ulf Hansson
On 28 October 2017 at 00:22, Rafael J. Wysocki wrote: > From: Rafael J. Wysocki > > Define and document a SMART_SUSPEND flag to instruct bus types and PM > domains that the system suspend callbacks provided by the driver can > cope with runtime-suspended devices, so from the driver's perspective

Re: [PATCH v2 1/6] PM / core: Add NEVER_SKIP and SMART_PREPARE driver flags

2017-11-06 Thread Ulf Hansson
On 28 October 2017 at 00:17, Rafael J. Wysocki wrote: > From: Rafael J. Wysocki > > The motivation for this change is to provide a way to work around > a problem with the direct-complete mechanism used for avoiding > system suspend/resume handling for devices in runtime suspend. > > The problem i