* Re: [PATCH v12 02/22] selftests/vm: rename all references to pkru to a generic name
[not found] ` <1519264541-7621-3-git-send-email-linuxram@us.ibm.com>
@ 2018-03-16 21:55 ` Dave Hansen
0 siblings, 0 replies; 24+ messages in thread
From: Dave Hansen @ 2018-03-16 21:55 UTC (permalink / raw)
To: Ram Pai, shuahkh, linux-kselftest
Cc: mpe, linuxppc-dev, linux-mm, x86, linux-arch, linux-doc,
linux-kernel, mingo, akpm, benh, paulus, khandual, aneesh.kumar,
bsingharora, hbabu, mhocko, bauerman, ebiederm, arnd
On 02/21/2018 05:55 PM, Ram Pai wrote:
> int pkey_set(int pkey, unsigned long rights, unsigned long flags)
> {
> u32 mask = (PKEY_DISABLE_ACCESS|PKEY_DISABLE_WRITE);
> - u32 old_pkru = __rdpkru();
> - u32 new_pkru;
> + u32 old_pkey_reg = __rdpkey_reg();
> + u32 new_pkey_reg;
If we're not using the _actual_ instruction names ("rdpkru"), I think
I'd rather this be something more readable, like: __read_pkey_reg().
But, it's OK-ish the way it is.
Reviewed-by: Dave Hansen <dave.hansen@intel.com>
--
To unsubscribe from this list: send the line "unsubscribe linux-doc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH v12 04/22] selftests/vm: typecast the pkey register
[not found] ` <1519264541-7621-5-git-send-email-linuxram@us.ibm.com>
@ 2018-03-16 21:58 ` Dave Hansen
2018-03-26 19:38 ` Thiago Jung Bauermann
0 siblings, 1 reply; 24+ messages in thread
From: Dave Hansen @ 2018-03-16 21:58 UTC (permalink / raw)
To: Ram Pai, shuahkh, linux-kselftest
Cc: mpe, linuxppc-dev, linux-mm, x86, linux-arch, linux-doc,
linux-kernel, mingo, akpm, benh, paulus, khandual, aneesh.kumar,
bsingharora, hbabu, mhocko, bauerman, ebiederm, arnd
On 02/21/2018 05:55 PM, Ram Pai wrote:
> -static inline unsigned int _rdpkey_reg(int line)
> +static inline pkey_reg_t _rdpkey_reg(int line)
> {
> - unsigned int pkey_reg = __rdpkey_reg();
> + pkey_reg_t pkey_reg = __rdpkey_reg();
>
> - dprintf4("rdpkey_reg(line=%d) pkey_reg: %x shadow: %x\n",
> + dprintf4("rdpkey_reg(line=%d) pkey_reg: %016lx shadow: %016lx\n",
> line, pkey_reg, shadow_pkey_reg);
> assert(pkey_reg == shadow_pkey_reg);
Hmm. So we're using %lx for an int? Doesn't the compiler complain
about this?
--
To unsubscribe from this list: send the line "unsubscribe linux-doc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH v12 05/22] selftests/vm: generic function to handle shadow key register
[not found] ` <1519264541-7621-6-git-send-email-linuxram@us.ibm.com>
@ 2018-03-16 22:05 ` Dave Hansen
0 siblings, 0 replies; 24+ messages in thread
From: Dave Hansen @ 2018-03-16 22:05 UTC (permalink / raw)
To: Ram Pai, shuahkh, linux-kselftest
Cc: mpe, linuxppc-dev, linux-mm, x86, linux-arch, linux-doc,
linux-kernel, mingo, akpm, benh, paulus, khandual, aneesh.kumar,
bsingharora, hbabu, mhocko, bauerman, ebiederm, arnd
On 02/21/2018 05:55 PM, Ram Pai wrote:
> +static inline u32 pkey_to_shift(int pkey)
> +{
> + return pkey * PKEY_BITS_PER_PKEY;
> +}
pkey_bit_position(), perhaps?
> +static inline pkey_reg_t reset_bits(int pkey, pkey_reg_t bits)
> +{
> + u32 shift = pkey_to_shift(pkey);
> +
> + return ~(bits << shift);
> +}
I'd prefer clear_pkey_flags() or maybe clear_pkey_bits(). "reset" can
mean "reset to 0" or "reset to 1".
Also, why the u32 here? Isn't an int more appropriate?
> +static inline pkey_reg_t left_shift_bits(int pkey, pkey_reg_t bits)
> +{
> + u32 shift = pkey_to_shift(pkey);
> +
> + return (bits << shift);
> +}
> +
> +static inline pkey_reg_t right_shift_bits(int pkey, pkey_reg_t bits)
> +{
> + u32 shift = pkey_to_shift(pkey);
> +
> + return (bits >> shift);
> +}
Some comments on these would be handy. Basically that this takes a
per-key flags value and puts it at the right position so it can be
shoved in the register.
--
To unsubscribe from this list: send the line "unsubscribe linux-doc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH v12 06/22] selftests/vm: fix the wrong assert in pkey_disable_set()
[not found] ` <1519264541-7621-7-git-send-email-linuxram@us.ibm.com>
@ 2018-03-16 22:06 ` Dave Hansen
0 siblings, 0 replies; 24+ messages in thread
From: Dave Hansen @ 2018-03-16 22:06 UTC (permalink / raw)
To: Ram Pai, shuahkh, linux-kselftest
Cc: mpe, linuxppc-dev, linux-mm, x86, linux-arch, linux-doc,
linux-kernel, mingo, akpm, benh, paulus, khandual, aneesh.kumar,
bsingharora, hbabu, mhocko, bauerman, ebiederm, arnd
On 02/21/2018 05:55 PM, Ram Pai wrote:
> 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.hansen@intel.com>
> cc: Florian Weimer <fweimer@redhat.com>
> Signed-off-by: Ram Pai <linuxram@us.ibm.com>
> ---
> tools/testing/selftests/vm/protection_keys.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/tools/testing/selftests/vm/protection_keys.c b/tools/testing/selftests/vm/protection_keys.c
> index 83216c5..0109388 100644
> --- a/tools/testing/selftests/vm/protection_keys.c
> +++ b/tools/testing/selftests/vm/protection_keys.c
> @@ -443,7 +443,7 @@ void pkey_disable_set(int pkey, int flags)
> dprintf1("%s(%d) pkey_reg: 0x%lx\n",
> __func__, pkey, rdpkey_reg());
> if (flags)
> - pkey_assert(rdpkey_reg() > orig_pkey_reg);
> + pkey_assert(rdpkey_reg() >= orig_pkey_reg);
> dprintf1("END<---%s(%d, 0x%x)\n", __func__,
> pkey, flags);
> }
I'm not sure about this one. Did this cause a problem for you?
Why would you call this and ask no bits to be set?
--
To unsubscribe from this list: send the line "unsubscribe linux-doc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH v12 07/22] selftests/vm: fixed bugs in pkey_disable_clear()
[not found] ` <1519264541-7621-8-git-send-email-linuxram@us.ibm.com>
@ 2018-03-16 22:08 ` Dave Hansen
2018-03-28 20:47 ` Thiago Jung Bauermann
0 siblings, 1 reply; 24+ messages in thread
From: Dave Hansen @ 2018-03-16 22:08 UTC (permalink / raw)
To: Ram Pai, shuahkh, linux-kselftest
Cc: mpe, linuxppc-dev, linux-mm, x86, linux-arch, linux-doc,
linux-kernel, mingo, akpm, benh, paulus, khandual, aneesh.kumar,
bsingharora, hbabu, mhocko, bauerman, ebiederm, arnd
On 02/21/2018 05:55 PM, Ram Pai wrote:
> --- a/tools/testing/selftests/vm/protection_keys.c
> +++ b/tools/testing/selftests/vm/protection_keys.c
> @@ -461,7 +461,7 @@ void pkey_disable_clear(int pkey, int flags)
> pkey, pkey, pkey_rights);
> pkey_assert(pkey_rights >= 0);
>
> - pkey_rights |= flags;
> + pkey_rights &= ~flags;
>
> ret = pkey_set(pkey, pkey_rights, 0);
> /* pkey_reg and flags have the same format */
> @@ -475,7 +475,7 @@ void pkey_disable_clear(int pkey, int flags)
> dprintf1("%s(%d) pkey_reg: 0x%016lx\n", __func__,
> pkey, rdpkey_reg());
> if (flags)
> - assert(rdpkey_reg() > orig_pkey_reg);
> + assert(rdpkey_reg() < orig_pkey_reg);
> }
>
> void pkey_write_allow(int pkey)
This seems so horribly wrong that I wonder how it worked in the first
place. Any idea?
--
To unsubscribe from this list: send the line "unsubscribe linux-doc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH v12 08/22] selftests/vm: clear the bits in shadow reg when a pkey is freed.
[not found] ` <1519264541-7621-9-git-send-email-linuxram@us.ibm.com>
@ 2018-03-16 22:10 ` Dave Hansen
0 siblings, 0 replies; 24+ messages in thread
From: Dave Hansen @ 2018-03-16 22:10 UTC (permalink / raw)
To: Ram Pai, shuahkh, linux-kselftest
Cc: mpe, linuxppc-dev, linux-mm, x86, linux-arch, linux-doc,
linux-kernel, mingo, akpm, benh, paulus, khandual, aneesh.kumar,
bsingharora, hbabu, mhocko, bauerman, ebiederm, arnd
On 02/21/2018 05:55 PM, Ram Pai wrote:
> 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.
...
> diff --git a/tools/testing/selftests/vm/protection_keys.c b/tools/testing/selftests/vm/protection_keys.c
> index ca54a95..aaf9f09 100644
> --- a/tools/testing/selftests/vm/protection_keys.c
> +++ b/tools/testing/selftests/vm/protection_keys.c
> @@ -582,6 +582,9 @@ int alloc_pkey(void)
> int sys_pkey_free(unsigned long pkey)
> {
> int ret = syscall(SYS_pkey_free, pkey);
> +
> + if (!ret)
> + shadow_pkey_reg &= reset_bits(pkey, PKEY_DISABLE_ACCESS);
> dprintf1("%s(pkey=%ld) syscall ret: %d\n", __func__, pkey, ret);
> return ret;
> }
Did this cause problems for you in practice?
On x86, sys_pkey_free() does not affect PKRU, so this isn't quite right.
I'd much rather have the actual tests explicitly clear the PKRU bits
and also in the process clear the shadow bits.
--
To unsubscribe from this list: send the line "unsubscribe linux-doc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH v12 09/22] selftests/vm: fix alloc_random_pkey() to make it really random
[not found] ` <1519264541-7621-10-git-send-email-linuxram@us.ibm.com>
@ 2018-03-16 22:13 ` Dave Hansen
0 siblings, 0 replies; 24+ messages in thread
From: Dave Hansen @ 2018-03-16 22:13 UTC (permalink / raw)
To: Ram Pai, shuahkh, linux-kselftest
Cc: mpe, linuxppc-dev, linux-mm, x86, linux-arch, linux-doc,
linux-kernel, mingo, akpm, benh, paulus, khandual, aneesh.kumar,
bsingharora, hbabu, mhocko, bauerman, ebiederm, arnd
On 02/21/2018 05:55 PM, Ram Pai wrote:
> alloc_random_pkey() was allocating the same pkey every time.
> Not all pkeys were geting tested. fixed it.
...
> @@ -602,13 +603,15 @@ int alloc_random_pkey(void)
> int alloced_pkeys[NR_PKEYS];
> int nr_alloced = 0;
> int random_index;
> +
> memset(alloced_pkeys, 0, sizeof(alloced_pkeys));
> + srand((unsigned int)time(NULL));
>
> /* allocate every possible key and make a note of which ones we got */
> max_nr_pkey_allocs = NR_PKEYS;
> - max_nr_pkey_allocs = 1;
> for (i = 0; i < max_nr_pkey_allocs; i++) {
> int new_pkey = alloc_pkey();
The srand() is probably useful, but won't this always just do a single
alloc_pkey() now? That seems like it will mean we always use the first
one the kernel gives us, which isn't random.
> - dprintf1("%s()::%d, ret: %d pkey_reg: 0x%x shadow: 0x%x\n", __func__,
> - __LINE__, ret, __rdpkey_reg(), shadow_pkey_reg);
> + dprintf1("%s()::%d, ret: %d pkey_reg: 0x%x shadow: 0x%016lx\n",
> + __func__, __LINE__, ret, __rdpkey_reg(), shadow_pkey_reg);
> return ret;
> }
This belonged in the pkey_reg_t patch, I think.
--
To unsubscribe from this list: send the line "unsubscribe linux-doc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH v12 10/22] selftests/vm: introduce two arch independent abstraction
[not found] ` <1519264541-7621-11-git-send-email-linuxram@us.ibm.com>
@ 2018-03-16 22:15 ` Dave Hansen
0 siblings, 0 replies; 24+ messages in thread
From: Dave Hansen @ 2018-03-16 22:15 UTC (permalink / raw)
To: Ram Pai, shuahkh, linux-kselftest
Cc: mpe, linuxppc-dev, linux-mm, x86, linux-arch, linux-doc,
linux-kernel, mingo, akpm, benh, paulus, khandual, aneesh.kumar,
bsingharora, hbabu, mhocko, bauerman, ebiederm, arnd
On 02/21/2018 05:55 PM, Ram Pai wrote:
> open_hugepage_file() <- opens the huge page file
> get_start_key() <-- provides the first non-reserved key.
>
Looks reasonable.
Reviewed-by: Dave Hansen <dave.hansen@intel.com>
--
To unsubscribe from this list: send the line "unsubscribe linux-doc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH v12 11/22] selftests/vm: pkey register should match shadow pkey
[not found] ` <1519264541-7621-12-git-send-email-linuxram@us.ibm.com>
@ 2018-03-16 22:19 ` Dave Hansen
0 siblings, 0 replies; 24+ messages in thread
From: Dave Hansen @ 2018-03-16 22:19 UTC (permalink / raw)
To: Ram Pai, shuahkh, linux-kselftest
Cc: mpe, linuxppc-dev, linux-mm, x86, linux-arch, linux-doc,
linux-kernel, mingo, akpm, benh, paulus, khandual, aneesh.kumar,
bsingharora, hbabu, mhocko, bauerman, ebiederm, arnd
On 02/21/2018 05:55 PM, Ram Pai wrote:
> 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 throughout
>
> cc: Dave Hansen <dave.hansen@intel.com>
> cc: Florian Weimer <fweimer@redhat.com>
> Signed-off-by: Ram Pai <linuxram@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..6054093 100644
> --- a/tools/testing/selftests/vm/protection_keys.c
> +++ b/tools/testing/selftests/vm/protection_keys.c
> @@ -926,10 +926,10 @@ void expected_pkey_fault(int pkey)
> pkey_assert(last_pkey_faults + 1 == pkey_faults);
> pkey_assert(last_si_pkey == pkey);
> /*
> - * The signal handler shold have cleared out PKEY register to let the
> + * The signal handler shold have cleared out pkey-register to let the
Heh, you randomly changed the formatting and didn't bother with my awful
typo. :)
> * test program continue. We now have to restore it.
> */
> - if (__rdpkey_reg() != 0)
> + if (__rdpkey_reg() != shadow_pkey_reg)
> pkey_assert(0);
>
> __wrpkey_reg(shadow_pkey_reg);
>
I don't think this should be "shadow_pkey_reg". This was just trying to
double-check that the signal handler messed around with PKRU the way we
expected.
We could also just check that the disable bits for 'pkey' are clear at
this point. That would be almost as good.
--
To unsubscribe from this list: send the line "unsubscribe linux-doc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH v12 12/22] selftests/vm: generic cleanup
[not found] ` <1519264541-7621-13-git-send-email-linuxram@us.ibm.com>
@ 2018-03-16 22:22 ` Dave Hansen
0 siblings, 0 replies; 24+ messages in thread
From: Dave Hansen @ 2018-03-16 22:22 UTC (permalink / raw)
To: Ram Pai, shuahkh, linux-kselftest
Cc: mpe, linuxppc-dev, linux-mm, x86, linux-arch, linux-doc,
linux-kernel, mingo, akpm, benh, paulus, khandual, aneesh.kumar,
bsingharora, hbabu, mhocko, bauerman, ebiederm, arnd
On 02/21/2018 05:55 PM, Ram Pai wrote:
> cleanup the code to satisfy coding styles.
>
> cc: Dave Hansen <dave.hansen@intel.com>
> cc: Florian Weimer <fweimer@redhat.com>
> Signed-off-by: Ram Pai <linuxram@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/tools/testing/selftests/vm/protection_keys.c
> index 6054093..6fdd8f5 100644
> --- a/tools/testing/selftests/vm/protection_keys.c
> +++ b/tools/testing/selftests/vm/protection_keys.c
> @@ -4,7 +4,7 @@
> *
> * There are examples in here of:
> * * how to set protection keys on memory
> - * * how to set/clear bits in pkey registers (the rights register)
> + * * how to set/clear bits in Protection Key registers (the rights register)
I don't think CodingStyle says to do this. :)
> * * how to handle SEGV_PKUERR signals and extract pkey-relevant
> * information from the siginfo
> *
> @@ -13,13 +13,18 @@
> * prefault pages in at malloc, or not
> * protect MPX bounds tables with protection keys?
> * make sure VMA splitting/merging is working correctly
> - * OOMs can destroy mm->mmap (see exit_mmap()), so make sure it is immune to pkeys
> - * look for pkey "leaks" where it is still set on a VMA but "freed" back to the kernel
> - * do a plain mprotect() to a mprotect_pkey() area and make sure the pkey sticks
> + * OOMs can destroy mm->mmap (see exit_mmap()),
> + * so make sure it is immune to pkeys
> + * look for pkey "leaks" where it is still set on a VMA
> + * but "freed" back to the kernel
> + * do a plain mprotect() to a mprotect_pkey() area and make
> + * sure the pkey sticks
Ram, I'm not sure where this came from, but this looks horrid. Please
don't do this to the file
> * Compile like this:
> - * gcc -o protection_keys -O2 -g -std=gnu99 -pthread -Wall protection_keys.c -lrt -ldl -lm
> - * gcc -m32 -o protection_keys_32 -O2 -g -std=gnu99 -pthread -Wall protection_keys.c -lrt -ldl -lm
> + * gcc -o protection_keys -O2 -g -std=gnu99
> + * -pthread -Wall protection_keys.c -lrt -ldl -lm
> + * gcc -m32 -o protection_keys_32 -O2 -g -std=gnu99
> + * -pthread -Wall protection_keys.c -lrt -ldl -lm
> */
Please just leave this, or remove it from the file. It was a long line
so it could be copied and pasted, this ruins that.
> #define _GNU_SOURCE
> #include <errno.h>
> @@ -251,26 +256,11 @@ void signal_handler(int signum, siginfo_t *si, void *vucontext)
> dprintf1("signal pkey_reg from pkey_reg: %016lx\n", __rdpkey_reg());
> dprintf1("pkey from siginfo: %jx\n", siginfo_pkey);
> *(u64 *)pkey_reg_ptr = 0x00000000;
> - dprintf1("WARNING: set PRKU=0 to allow faulting instruction to continue\n");
> + dprintf1("WARNING: set PKEY_REG=0 to allow faulting instruction "
> + "to continue\n");
> pkey_faults++;
> dprintf1("<<<<==================================================\n");
> return;
> - if (trapno == 14) {
> - fprintf(stderr,
> - "ERROR: In signal handler, page fault, trapno = %d, ip = %016lx\n",
> - trapno, ip);
> - fprintf(stderr, "si_addr %p\n", si->si_addr);
> - fprintf(stderr, "REG_ERR: %lx\n",
> - (unsigned long)uctxt->uc_mcontext.gregs[REG_ERR]);
> - exit(1);
> - } else {
> - fprintf(stderr, "unexpected trap %d! at 0x%lx\n", trapno, ip);
> - fprintf(stderr, "si_addr %p\n", si->si_addr);
> - fprintf(stderr, "REG_ERR: %lx\n",
> - (unsigned long)uctxt->uc_mcontext.gregs[REG_ERR]);
> - exit(2);
> - }
> - dprint_in_signal = 0;
> }
I think this is just randomly removing code now.
I think you should probably just drop this patch. It's not really
brining anything useful.
--
To unsubscribe from this list: send the line "unsubscribe linux-doc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH v12 13/22] selftests/vm: powerpc implementation for generic abstraction
[not found] ` <1519264541-7621-14-git-send-email-linuxram@us.ibm.com>
@ 2018-03-16 22:23 ` Dave Hansen
0 siblings, 0 replies; 24+ messages in thread
From: Dave Hansen @ 2018-03-16 22:23 UTC (permalink / raw)
To: Ram Pai, shuahkh, linux-kselftest
Cc: mpe, linuxppc-dev, linux-mm, x86, linux-arch, linux-doc,
linux-kernel, mingo, akpm, benh, paulus, khandual, aneesh.kumar,
bsingharora, hbabu, mhocko, bauerman, ebiederm, arnd
On 02/21/2018 05:55 PM, Ram Pai wrote:
> static inline u32 pkey_to_shift(int pkey)
> {
> +#if defined(__i386__) || defined(__x86_64__) /* arch */
> return pkey * PKEY_BITS_PER_PKEY;
> +#elif __powerpc64__ /* arch */
> + return (NR_PKEYS - pkey - 1) * PKEY_BITS_PER_PKEY;
> +#endif /* arch */
> }
I really detest the #if #else style. Can't we just have a pkey_ppc.h
and a pkey_x86.h or something?
--
To unsubscribe from this list: send the line "unsubscribe linux-doc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH v12 14/22] selftests/vm: clear the bits in shadow reg when a pkey is freed.
[not found] ` <1519264541-7621-15-git-send-email-linuxram@us.ibm.com>
@ 2018-03-16 22:24 ` Dave Hansen
0 siblings, 0 replies; 24+ messages in thread
From: Dave Hansen @ 2018-03-16 22:24 UTC (permalink / raw)
To: Ram Pai, shuahkh, linux-kselftest
Cc: mpe, linuxppc-dev, linux-mm, x86, linux-arch, linux-doc,
linux-kernel, mingo, akpm, benh, paulus, khandual, aneesh.kumar,
bsingharora, hbabu, mhocko, bauerman, ebiederm, arnd
On 02/21/2018 05:55 PM, Ram Pai wrote:
> diff --git a/tools/testing/selftests/vm/protection_keys.c b/tools/testing/selftests/vm/protection_keys.c
> index c4c73e6..e82bd88 100644
> --- a/tools/testing/selftests/vm/protection_keys.c
> +++ b/tools/testing/selftests/vm/protection_keys.c
> @@ -586,7 +586,8 @@ int sys_pkey_free(unsigned long pkey)
> int ret = syscall(SYS_pkey_free, pkey);
>
> if (!ret)
> - shadow_pkey_reg &= reset_bits(pkey, PKEY_DISABLE_ACCESS);
> + shadow_pkey_reg &= reset_bits(pkey,
> + PKEY_DISABLE_ACCESS | PKEY_DISABLE_WRITE);
> dprintf1("%s(pkey=%ld) syscall ret: %d\n", __func__, pkey, ret);
> return ret;
> }
What about your EXEC bit?
--
To unsubscribe from this list: send the line "unsubscribe linux-doc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH v12 15/22] selftests/vm: powerpc implementation to check support for pkey
[not found] ` <1519264541-7621-16-git-send-email-linuxram@us.ibm.com>
@ 2018-03-16 22:26 ` Dave Hansen
0 siblings, 0 replies; 24+ messages in thread
From: Dave Hansen @ 2018-03-16 22:26 UTC (permalink / raw)
To: Ram Pai, shuahkh, linux-kselftest
Cc: mpe, linuxppc-dev, linux-mm, x86, linux-arch, linux-doc,
linux-kernel, mingo, akpm, benh, paulus, khandual, aneesh.kumar,
bsingharora, hbabu, mhocko, bauerman, ebiederm, arnd
On 02/21/2018 05:55 PM, Ram Pai wrote:
> #define PAGE_SIZE (0x1UL << 16)
> -static inline int cpu_has_pku(void)
> +static inline bool is_pkey_supported(void)
> {
> - return 1;
> + /*
> + * No simple way to determine this.
> + * lets try allocating a key and see if it succeeds.
> + */
> + int ret = sys_pkey_alloc(0, 0);
> +
> + if (ret > 0) {
> + sys_pkey_free(ret);
> + return true;
> + }
> + return false;
> }
The point of doing this was to have a test for the CPU that way separate
from the syscalls.
Can you leave cpu_has_pkeys() in place?
--
To unsubscribe from this list: send the line "unsubscribe linux-doc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH v12 16/22] selftests/vm: fix an assertion in test_pkey_alloc_exhaust()
[not found] ` <1519264541-7621-17-git-send-email-linuxram@us.ibm.com>
@ 2018-03-16 22:28 ` Dave Hansen
0 siblings, 0 replies; 24+ messages in thread
From: Dave Hansen @ 2018-03-16 22:28 UTC (permalink / raw)
To: Ram Pai, shuahkh, linux-kselftest
Cc: mpe, linuxppc-dev, linux-mm, x86, linux-arch, linux-doc,
linux-kernel, mingo, akpm, benh, paulus, khandual, aneesh.kumar,
bsingharora, hbabu, mhocko, bauerman, ebiederm, arnd
On 02/21/2018 05:55 PM, Ram Pai wrote:
> +static inline int arch_reserved_keys(void)
> +{
> +#if defined(__i386__) || defined(__x86_64__) /* arch */
> + return NR_RESERVED_PKEYS;
> +#elif __powerpc64__ /* arch */
> + if (sysconf(_SC_PAGESIZE) == 4096)
> + return NR_RESERVED_PKEYS_4K;
> + else
> + return NR_RESERVED_PKEYS_64K;
> +#else /* arch */
> + NOT SUPPORTED
> +#endif /* arch */
> +}
Yeah, this is hideous.
Please either do it in one header:
#ifdef x86..
static inline int arch_reserved_keys(void)
{
}
...
#elif ppc
static inline int arch_reserved_keys(void)
{
}
...
#else
#error
#endif
Or in multiple:
#ifdef x86..
#include <pkey_x86.h>
#elif ppc
#include <pkey_ppc.h>
#else
#error
#endif
--
To unsubscribe from this list: send the line "unsubscribe linux-doc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH v12 17/22] selftests/vm: associate key on a mapped page and detect access violation
[not found] ` <1519264541-7621-18-git-send-email-linuxram@us.ibm.com>
@ 2018-03-16 22:30 ` Dave Hansen
0 siblings, 0 replies; 24+ messages in thread
From: Dave Hansen @ 2018-03-16 22:30 UTC (permalink / raw)
To: Ram Pai, shuahkh, linux-kselftest
Cc: mpe, linuxppc-dev, linux-mm, x86, linux-arch, linux-doc,
linux-kernel, mingo, akpm, benh, paulus, khandual, aneesh.kumar,
bsingharora, hbabu, mhocko, bauerman, ebiederm, arnd
On 02/21/2018 05:55 PM, Ram Pai wrote:
> detect access-violation on a page to which access-disabled
> key is associated much after the page is mapped.
Looks fine to me. Did this actually find a bug for you?
Acked-by: Dave Hansen <dave.hansen@intel.com>
--
To unsubscribe from this list: send the line "unsubscribe linux-doc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH v12 18/22] selftests/vm: associate key on a mapped page and detect write violation
[not found] ` <1519264541-7621-19-git-send-email-linuxram@us.ibm.com>
@ 2018-03-16 22:30 ` Dave Hansen
0 siblings, 0 replies; 24+ messages in thread
From: Dave Hansen @ 2018-03-16 22:30 UTC (permalink / raw)
To: Ram Pai, shuahkh, linux-kselftest
Cc: mpe, linuxppc-dev, linux-mm, x86, linux-arch, linux-doc,
linux-kernel, mingo, akpm, benh, paulus, khandual, aneesh.kumar,
bsingharora, hbabu, mhocko, bauerman, ebiederm, arnd
On 02/21/2018 05:55 PM, Ram Pai wrote:
> detect write-violation on a page to which write-disabled
> key is associated much after the page is mapped.
The more tests the merrier.
Acked-by: Dave Hansen <dave.hansen@intel.com>
--
To unsubscribe from this list: send the line "unsubscribe linux-doc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH v12 19/22] selftests/vm: detect write violation on a mapped access-denied-key page
[not found] ` <1519264541-7621-20-git-send-email-linuxram@us.ibm.com>
@ 2018-03-16 22:31 ` Dave Hansen
0 siblings, 0 replies; 24+ messages in thread
From: Dave Hansen @ 2018-03-16 22:31 UTC (permalink / raw)
To: Ram Pai, shuahkh, linux-kselftest
Cc: mpe, linuxppc-dev, linux-mm, x86, linux-arch, linux-doc,
linux-kernel, mingo, akpm, benh, paulus, khandual, aneesh.kumar,
bsingharora, hbabu, mhocko, bauerman, ebiederm, arnd
On 02/21/2018 05:55 PM, Ram Pai wrote:
> detect write-violation on a page to which access-disabled
> key is associated much after the page is mapped.
Acked-by: Dave Hansen <dave.hansen@intel.com>
--
To unsubscribe from this list: send the line "unsubscribe linux-doc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH v12 20/22] selftests/vm: testcases must restore pkey-permissions
[not found] ` <1519264541-7621-21-git-send-email-linuxram@us.ibm.com>
@ 2018-03-16 22:32 ` Dave Hansen
0 siblings, 0 replies; 24+ messages in thread
From: Dave Hansen @ 2018-03-16 22:32 UTC (permalink / raw)
To: Ram Pai, shuahkh, linux-kselftest
Cc: mpe, linuxppc-dev, linux-mm, x86, linux-arch, linux-doc,
linux-kernel, mingo, akpm, benh, paulus, khandual, aneesh.kumar,
bsingharora, hbabu, mhocko, bauerman, ebiederm, arnd
On 02/21/2018 05:55 PM, Ram Pai wrote:
> Generally the signal handler restores the state of the pkey register
> before returning. However there are times when the read/write operation
> can legitamely fail without invoking the signal handler. Eg: A
> sys_read() operaton to a write-protected page should be disallowed. In
> such a case the state 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.
Oh, that's a good point.
Could we just do this in a common place, though? Like reset the
register after each test? Seems more foolproof.
--
To unsubscribe from this list: send the line "unsubscribe linux-doc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH v12 21/22] selftests/vm: sub-page allocator
[not found] ` <1519264541-7621-22-git-send-email-linuxram@us.ibm.com>
@ 2018-03-16 22:33 ` Dave Hansen
0 siblings, 0 replies; 24+ messages in thread
From: Dave Hansen @ 2018-03-16 22:33 UTC (permalink / raw)
To: Ram Pai, shuahkh, linux-kselftest
Cc: mpe, linuxppc-dev, linux-mm, x86, linux-arch, linux-doc,
linux-kernel, mingo, akpm, benh, paulus, khandual, aneesh.kumar,
bsingharora, hbabu, mhocko, bauerman, ebiederm, arnd
On 02/21/2018 05:55 PM, Ram Pai wrote:
...
> @@ -888,6 +917,7 @@ void setup_hugetlbfs(void)
> void *(*pkey_malloc[])(long size, int prot, u16 pkey) = {
>
> malloc_pkey_with_mprotect,
> + malloc_pkey_with_mprotect_subpage,
> malloc_pkey_anon_huge,
> malloc_pkey_hugetlb
> /* can not do direct with the pkey_mprotect() API:
I think I'd rather have an #ifdef on the array entries than have the
malloc entry do nothing on x86. Maybe have a ppc-specific section at
the end?
--
To unsubscribe from this list: send the line "unsubscribe linux-doc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH v12 22/22] selftests/vm: Fix deadlock in protection_keys.c
[not found] ` <1519264541-7621-23-git-send-email-linuxram@us.ibm.com>
@ 2018-03-16 22:34 ` Dave Hansen
0 siblings, 0 replies; 24+ messages in thread
From: Dave Hansen @ 2018-03-16 22:34 UTC (permalink / raw)
To: Ram Pai, shuahkh, linux-kselftest
Cc: mpe, linuxppc-dev, linux-mm, x86, linux-arch, linux-doc,
linux-kernel, mingo, akpm, benh, paulus, khandual, aneesh.kumar,
bsingharora, hbabu, mhocko, bauerman, ebiederm, arnd
On 02/21/2018 05:55 PM, Ram Pai wrote:
> From: Thiago Jung Bauermann <bauerman@linux.vnet.ibm.com>
>
> The sig_chld() handler calls dprintf2() taking care of setting
> dprint_in_signal so that sigsafe_printf() won't call printf().
> Unfortunately, this precaution is is negated by dprintf_level(), which
> has a call to fflush().
>
> This function acquires a lock, which means that if the signal interrupts an
> ongoing fflush() the process will deadlock. At least on powerpc this is
> easy to trigger, resulting in the following backtrace when attaching to the
> frozen process:
Ugh, yeah, I've run into this too.
Acked-by: Dave Hansen <dave.hansen@intel.com>
--
To unsubscribe from this list: send the line "unsubscribe linux-doc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH v12 04/22] selftests/vm: typecast the pkey register
2018-03-16 21:58 ` [PATCH v12 04/22] selftests/vm: typecast the pkey register Dave Hansen
@ 2018-03-26 19:38 ` Thiago Jung Bauermann
0 siblings, 0 replies; 24+ messages in thread
From: Thiago Jung Bauermann @ 2018-03-26 19:38 UTC (permalink / raw)
To: Dave Hansen
Cc: Ram Pai, shuahkh, linux-kselftest, mpe, linuxppc-dev, linux-mm,
x86, linux-arch, linux-doc, linux-kernel, mingo, akpm, benh,
paulus, khandual, aneesh.kumar, bsingharora, hbabu, mhocko,
ebiederm, arnd
Dave Hansen <dave.hansen@intel.com> writes:
> On 02/21/2018 05:55 PM, Ram Pai wrote:
>> -static inline unsigned int _rdpkey_reg(int line)
>> +static inline pkey_reg_t _rdpkey_reg(int line)
>> {
>> - unsigned int pkey_reg = __rdpkey_reg();
>> + pkey_reg_t pkey_reg = __rdpkey_reg();
>>
>> - dprintf4("rdpkey_reg(line=%d) pkey_reg: %x shadow: %x\n",
>> + dprintf4("rdpkey_reg(line=%d) pkey_reg: %016lx shadow: %016lx\n",
>> line, pkey_reg, shadow_pkey_reg);
>> assert(pkey_reg == shadow_pkey_reg);
>
> Hmm. So we're using %lx for an int? Doesn't the compiler complain
> about this?
It doesn't because dprintf4() doesn't have the annotation that tells the
compiler that it takes printf-like arguments. Once I add it:
--- a/tools/testing/selftests/vm/pkey-helpers.h
+++ b/tools/testing/selftests/vm/pkey-helpers.h
@@ -54,6 +54,10 @@
#define DPRINT_IN_SIGNAL_BUF_SIZE 4096
extern int dprint_in_signal;
extern char dprint_in_signal_buffer[DPRINT_IN_SIGNAL_BUF_SIZE];
+
+#ifdef __GNUC__
+__attribute__((format(printf, 1, 2)))
+#endif
static inline void sigsafe_printf(const char *format, ...)
{
va_list ap;
Then it does complain about it. I'm working on a fix where each arch
will define a format string to use for its pkey_reg_t and use it like
this:
--- a/tools/testing/selftests/vm/pkey-helpers.h
+++ b/tools/testing/selftests/vm/pkey-helpers.h
@@ -19,6 +19,7 @@
#define u32 uint32_t
#define u64 uint64_t
#define pkey_reg_t u32
+#define PKEY_REG_FMT "%016x"
#ifdef __i386__
#ifndef SYS_mprotect_key
@@ -112,7 +113,8 @@ static inline pkey_reg_t _read_pkey_reg(int line)
{
pkey_reg_t pkey_reg = __read_pkey_reg();
- dprintf4("read_pkey_reg(line=%d) pkey_reg: %016lx shadow: %016lx\n",
+ dprintf4("read_pkey_reg(line=%d) pkey_reg: "PKEY_REG_FMT
+ " shadow: "PKEY_REG_FMT"\n",
line, pkey_reg, shadow_pkey_reg);
assert(pkey_reg == shadow_pkey_reg);
--
Thiago Jung Bauermann
IBM Linux Technology Center
--
To unsubscribe from this list: send the line "unsubscribe linux-doc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH v12 07/22] selftests/vm: fixed bugs in pkey_disable_clear()
2018-03-16 22:08 ` [PATCH v12 07/22] selftests/vm: fixed bugs in pkey_disable_clear() Dave Hansen
@ 2018-03-28 20:47 ` Thiago Jung Bauermann
2018-03-28 20:55 ` Dave Hansen
0 siblings, 1 reply; 24+ messages in thread
From: Thiago Jung Bauermann @ 2018-03-28 20:47 UTC (permalink / raw)
To: Dave Hansen
Cc: Ram Pai, shuahkh, linux-kselftest, mpe, linuxppc-dev, linux-mm,
x86, linux-arch, linux-doc, linux-kernel, mingo, akpm, benh,
paulus, khandual, aneesh.kumar, bsingharora, hbabu, mhocko,
ebiederm, arnd
Dave Hansen <dave.hansen@intel.com> writes:
> On 02/21/2018 05:55 PM, Ram Pai wrote:
>> --- a/tools/testing/selftests/vm/protection_keys.c
>> +++ b/tools/testing/selftests/vm/protection_keys.c
>> @@ -461,7 +461,7 @@ void pkey_disable_clear(int pkey, int flags)
>> pkey, pkey, pkey_rights);
>> pkey_assert(pkey_rights >= 0);
>>
>> - pkey_rights |= flags;
>> + pkey_rights &= ~flags;
>>
>> ret = pkey_set(pkey, pkey_rights, 0);
>> /* pkey_reg and flags have the same format */
>> @@ -475,7 +475,7 @@ void pkey_disable_clear(int pkey, int flags)
>> dprintf1("%s(%d) pkey_reg: 0x%016lx\n", __func__,
>> pkey, rdpkey_reg());
>> if (flags)
>> - assert(rdpkey_reg() > orig_pkey_reg);
>> + assert(rdpkey_reg() < orig_pkey_reg);
>> }
>>
>> void pkey_write_allow(int pkey)
>
> This seems so horribly wrong that I wonder how it worked in the first
> place. Any idea?
The code simply wasn't used. pkey_disable_clear() is called by
pkey_write_allow() and pkey_access_allow(), but before this patch series
nothing called either of these functions.
--
Thiago Jung Bauermann
IBM Linux Technology Center
--
To unsubscribe from this list: send the line "unsubscribe linux-doc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH v12 07/22] selftests/vm: fixed bugs in pkey_disable_clear()
2018-03-28 20:47 ` Thiago Jung Bauermann
@ 2018-03-28 20:55 ` Dave Hansen
2018-03-28 23:51 ` Thiago Jung Bauermann
0 siblings, 1 reply; 24+ messages in thread
From: Dave Hansen @ 2018-03-28 20:55 UTC (permalink / raw)
To: Thiago Jung Bauermann
Cc: Ram Pai, shuahkh, linux-kselftest, mpe, linuxppc-dev, linux-mm,
x86, linux-arch, linux-doc, linux-kernel, mingo, akpm, benh,
paulus, khandual, aneesh.kumar, bsingharora, hbabu, mhocko,
ebiederm, arnd
On 03/28/2018 01:47 PM, Thiago Jung Bauermann wrote:
>>> if (flags)
>>> - assert(rdpkey_reg() > orig_pkey_reg);
>>> + assert(rdpkey_reg() < orig_pkey_reg);
>>> }
>>>
>>> void pkey_write_allow(int pkey)
>> This seems so horribly wrong that I wonder how it worked in the first
>> place. Any idea?
> The code simply wasn't used. pkey_disable_clear() is called by
> pkey_write_allow() and pkey_access_allow(), but before this patch series
> nothing called either of these functions.
>
Ahh, that explains it. Can that get stuck in the changelog, please?
--
To unsubscribe from this list: send the line "unsubscribe linux-doc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH v12 07/22] selftests/vm: fixed bugs in pkey_disable_clear()
2018-03-28 20:55 ` Dave Hansen
@ 2018-03-28 23:51 ` Thiago Jung Bauermann
0 siblings, 0 replies; 24+ messages in thread
From: Thiago Jung Bauermann @ 2018-03-28 23:51 UTC (permalink / raw)
To: Dave Hansen
Cc: Ram Pai, shuahkh, linux-kselftest, mpe, linuxppc-dev, linux-mm,
x86, linux-arch, linux-doc, linux-kernel, mingo, akpm, benh,
paulus, khandual, aneesh.kumar, bsingharora, hbabu, mhocko,
ebiederm, arnd
Dave Hansen <dave.hansen@intel.com> writes:
> On 03/28/2018 01:47 PM, Thiago Jung Bauermann wrote:
>>>> if (flags)
>>>> - assert(rdpkey_reg() > orig_pkey_reg);
>>>> + assert(rdpkey_reg() < orig_pkey_reg);
>>>> }
>>>>
>>>> void pkey_write_allow(int pkey)
>>> This seems so horribly wrong that I wonder how it worked in the first
>>> place. Any idea?
>> The code simply wasn't used. pkey_disable_clear() is called by
>> pkey_write_allow() and pkey_access_allow(), but before this patch series
>> nothing called either of these functions.
>>
>
> Ahh, that explains it. Can that get stuck in the changelog, please?
Yes, will be in the next version.
--
Thiago Jung Bauermann
IBM Linux Technology Center
--
To unsubscribe from this list: send the line "unsubscribe linux-doc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 24+ messages in thread
end of thread, other threads:[~2018-03-28 23:52 UTC | newest]
Thread overview: 24+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <1519264541-7621-1-git-send-email-linuxram@us.ibm.com>
[not found] ` <1519264541-7621-3-git-send-email-linuxram@us.ibm.com>
2018-03-16 21:55 ` [PATCH v12 02/22] selftests/vm: rename all references to pkru to a generic name Dave Hansen
[not found] ` <1519264541-7621-5-git-send-email-linuxram@us.ibm.com>
2018-03-16 21:58 ` [PATCH v12 04/22] selftests/vm: typecast the pkey register Dave Hansen
2018-03-26 19:38 ` Thiago Jung Bauermann
[not found] ` <1519264541-7621-6-git-send-email-linuxram@us.ibm.com>
2018-03-16 22:05 ` [PATCH v12 05/22] selftests/vm: generic function to handle shadow key register Dave Hansen
[not found] ` <1519264541-7621-7-git-send-email-linuxram@us.ibm.com>
2018-03-16 22:06 ` [PATCH v12 06/22] selftests/vm: fix the wrong assert in pkey_disable_set() Dave Hansen
[not found] ` <1519264541-7621-8-git-send-email-linuxram@us.ibm.com>
2018-03-16 22:08 ` [PATCH v12 07/22] selftests/vm: fixed bugs in pkey_disable_clear() Dave Hansen
2018-03-28 20:47 ` Thiago Jung Bauermann
2018-03-28 20:55 ` Dave Hansen
2018-03-28 23:51 ` Thiago Jung Bauermann
[not found] ` <1519264541-7621-9-git-send-email-linuxram@us.ibm.com>
2018-03-16 22:10 ` [PATCH v12 08/22] selftests/vm: clear the bits in shadow reg when a pkey is freed Dave Hansen
[not found] ` <1519264541-7621-10-git-send-email-linuxram@us.ibm.com>
2018-03-16 22:13 ` [PATCH v12 09/22] selftests/vm: fix alloc_random_pkey() to make it really random Dave Hansen
[not found] ` <1519264541-7621-11-git-send-email-linuxram@us.ibm.com>
2018-03-16 22:15 ` [PATCH v12 10/22] selftests/vm: introduce two arch independent abstraction Dave Hansen
[not found] ` <1519264541-7621-12-git-send-email-linuxram@us.ibm.com>
2018-03-16 22:19 ` [PATCH v12 11/22] selftests/vm: pkey register should match shadow pkey Dave Hansen
[not found] ` <1519264541-7621-13-git-send-email-linuxram@us.ibm.com>
2018-03-16 22:22 ` [PATCH v12 12/22] selftests/vm: generic cleanup Dave Hansen
[not found] ` <1519264541-7621-14-git-send-email-linuxram@us.ibm.com>
2018-03-16 22:23 ` [PATCH v12 13/22] selftests/vm: powerpc implementation for generic abstraction Dave Hansen
[not found] ` <1519264541-7621-15-git-send-email-linuxram@us.ibm.com>
2018-03-16 22:24 ` [PATCH v12 14/22] selftests/vm: clear the bits in shadow reg when a pkey is freed Dave Hansen
[not found] ` <1519264541-7621-16-git-send-email-linuxram@us.ibm.com>
2018-03-16 22:26 ` [PATCH v12 15/22] selftests/vm: powerpc implementation to check support for pkey Dave Hansen
[not found] ` <1519264541-7621-17-git-send-email-linuxram@us.ibm.com>
2018-03-16 22:28 ` [PATCH v12 16/22] selftests/vm: fix an assertion in test_pkey_alloc_exhaust() Dave Hansen
[not found] ` <1519264541-7621-18-git-send-email-linuxram@us.ibm.com>
2018-03-16 22:30 ` [PATCH v12 17/22] selftests/vm: associate key on a mapped page and detect access violation Dave Hansen
[not found] ` <1519264541-7621-19-git-send-email-linuxram@us.ibm.com>
2018-03-16 22:30 ` [PATCH v12 18/22] selftests/vm: associate key on a mapped page and detect write violation Dave Hansen
[not found] ` <1519264541-7621-20-git-send-email-linuxram@us.ibm.com>
2018-03-16 22:31 ` [PATCH v12 19/22] selftests/vm: detect write violation on a mapped access-denied-key page Dave Hansen
[not found] ` <1519264541-7621-21-git-send-email-linuxram@us.ibm.com>
2018-03-16 22:32 ` [PATCH v12 20/22] selftests/vm: testcases must restore pkey-permissions Dave Hansen
[not found] ` <1519264541-7621-22-git-send-email-linuxram@us.ibm.com>
2018-03-16 22:33 ` [PATCH v12 21/22] selftests/vm: sub-page allocator Dave Hansen
[not found] ` <1519264541-7621-23-git-send-email-linuxram@us.ibm.com>
2018-03-16 22:34 ` [PATCH v12 22/22] selftests/vm: Fix deadlock in protection_keys.c Dave Hansen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).