* 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
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-
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
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
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
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
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
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
* 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
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
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
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
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
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
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
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
Signed-off-by: Ram Pai
---
fs/proc/task_mmu.c |1 +
include/linux/mm.h |3 ++-
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
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
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
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
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
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
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(+
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
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 +++
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
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
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
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
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 +
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 ++
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.
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 ++
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(-)
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 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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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/
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
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
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
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
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
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
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
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
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
67 matches
Mail list logo