gt;
LGTM.
Reviewed-by: Sandipan Das
Kumar K.V
Signed-off-by: Sandipan Das
---
Previous versions can be found at:
v1:
https://lore.kernel.org/linuxppc-dev/20210430075557.893819-1-sandi...@linux.ibm.com/
Changes in v2:
- Added review tag from Aneesh.
- Used pfn_to_kaddr() based on Christophe's suggestion.
---
arch/powerpc/pl
On 30/04/21 2:12 pm, Christophe Leroy wrote:
>
>
> Le 30/04/2021 à 09:55, Sandipan Das a écrit :
>> Trace memory is cleared and the corresponding dcache lines
>> are flushed after allocation. However, this should not be
>> done using the PFN. This adds th
Trace memory is cleared and the corresponding dcache lines
are flushed after allocation. However, this should not be
done using the PFN. This adds the missing __va() conversion.
Fixes: 2ac02e5ecec0 ("powerpc/mm: Remove dcache flush from memory remove.")
Signed-off-by: Sandipan Das
ango...@linux.ibm.com
> v3->v4:
> - CONFIG_PPC64 check was not required, remove it.
> - Use SZ_ macros instead of hardcoded numbers.
>
Acked-by: Sandipan Das
3987ef267a ("powerpc: sstep: Add support for darn instruction")
Signed-off-by: Sandipan Das
---
arch/powerpc/lib/sstep.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/powerpc/lib/sstep.c b/arch/powerpc/lib/sstep.c
index 11f14b209d7f..683f7c20f74b 100644
--- a/arch
em as unknown. The kernel
can then fallback to executing such instructions on hardware.
Fixes: 0016a4cf5582 ("powerpc: Emulate most Book I instructions in
emulate_step()")
Signed-off-by: Sandipan Das
---
Previous versions can be found at:
v3:
https://lore.kernel.org/linuxppc-dev/202102
On 04/02/21 1:09 pm, Naveen N. Rao wrote:
> [...]
>
> I'm afraid there is one more thing. scripts/checkpatch.pl reports:
>
> WARNING: 'an userspace' may be misspelled - perhaps 'a userspace'?
> #52:
> While an userspace program having an instruction word like
>
>
> ERROR: swit
On 04/02/21 12:44 pm, Sandipan Das wrote:
> The Power ISA says that the fixed-point load and update
> instructions must neither use R0 for the base address (RA)
> nor have the destination (RT) and the base address (RA) as
> the same register. Similarly, for fixed-point stores an
3987ef267a ("powerpc: sstep: Add support for darn instruction")
Signed-off-by: Sandipan Das
---
arch/powerpc/lib/sstep.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/powerpc/lib/sstep.c b/arch/powerpc/lib/sstep.c
index 9138967eb82e..e7e8bc974c0f 100644
--- a/arch
em as unknown. The kernel
can then fallback to executing such instructions on hardware.
Fixes: 0016a4cf5582 ("powerpc: Emulate most Book I instructions in
emulate_step()")
Signed-off-by: Sandipan Das
---
Previous versions can be found at:
v2:
https://lore.kernel.org/linuxppc-dev/202102
On 03/02/21 3:19 pm, Naveen N. Rao wrote:
> [...]
>
> Wouldn't it be easier to just do the below at the end? Or, am I missing
> something?
>
> diff --git a/arch/powerpc/lib/sstep.c b/arch/powerpc/lib/sstep.c
> index ede093e9623472..a2d726d2a5e9d1 100644
> --- a/arch/powerpc/lib/sstep.c
> +++ b
On 03/02/21 3:19 pm, Naveen N. Rao wrote:
> [...]
>
> Wouldn't it be easier to just do the below at the end? Or, am I missing
> something?
>
> diff --git a/arch/powerpc/lib/sstep.c b/arch/powerpc/lib/sstep.c
> index ede093e9623472..a2d726d2a5e9d1 100644
> --- a/arch/powerpc/lib/sstep.c
> +++ b/a
3987ef267a ("powerpc: sstep: Add support for darn instruction")
Signed-off-by: Sandipan Das
---
arch/powerpc/lib/sstep.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/powerpc/lib/sstep.c b/arch/powerpc/lib/sstep.c
index 230d1ae77ef5..9ea6822f4c55 100644
--- a/arch
d-by: Ravi Bangoria
Signed-off-by: Sandipan Das
---
Previous versions can be found at:
v1:
https://lore.kernel.org/linuxppc-dev/20201119054139.244083-2-sandi...@linux.ibm.com/
Changes in v2:
- Jump to unknown_opcode instead of returning -1 for invalid
instruction forms.
---
arch/powerpc/lib/ss
ated as unknown by the emulation infrastructure when
RA = 0 or RA = RT. The kernel will then fallback to executing
the instruction on hardware.
Fixes: 0016a4cf5582 ("powerpc: Emulate most Book I instructions in
emulate_step()")
Reviewed-by: Ravi Bangoria
Signed-off-by: Sandipan Das
---
et userspace AMR correctly on
exec")
commit 48a8ab4eeb82 ("powerpc/book3s64/pkeys: Don't update SPRN_AMR when in
kernel mode")
Signed-off-by: Sandipan Das
---
arch/powerpc/include/asm/mmu_context.h | 3 ---
arch/powerpc/include/asm/pkeys.h | 6 --
2 files changed
9
> +-
> 1 file changed, 27 insertions(+), 22 deletions(-)
>
Thanks for fixing this.
Reviewed-by: Sandipan Das
s on scv and addpcis
> [v2] Fixed description
>
> arch/powerpc/lib/sstep.c | 46
> --
> 1 file changed, 44 insertions(+), 2 deletions(-)
>
Reviewed-by: Sandipan Das
tests/powerpc: Add test for execute-disabled pkeys")
Fixes: c27f2fd1705a ("selftests/powerpc: Add test for pkey siginfo
verification")
Signed-off-by: Sandipan Das
---
tools/testing/selftests/powerpc/mm/pkey_exec_prot.c | 2 +-
tools/testing/selftests/powerpc/mm/pkey_siginfo.c | 2
Hi,
On 25/11/20 3:39 pm, Ravi Bangoria wrote:
>
>> diff --git a/arch/powerpc/lib/sstep.c b/arch/powerpc/lib/sstep.c
>> index 855457ed09b5..25a5436be6c6 100644
>> --- a/arch/powerpc/lib/sstep.c
>> +++ b/arch/powerpc/lib/sstep.c
>> @@ -2157,11 +2157,15 @@ int analyse_instr(struct instruction_op *op
ated as unknown by the emulation infrastructure when
RA = 0 or RA = RT. The kernel will then fallback to executing
the instruction on hardware.
Signed-off-by: Sandipan Das
---
arch/powerpc/lib/sstep.c | 22 ++
1 file changed, 22 insertions(+)
diff --git a/arch/powerpc/lib
aforementioned instructions to make sure that they
are treated as unknown by the emulation infrastructure when
RA = 0. The kernel will then fallback to executing the
instruction on hardware.
Signed-off-by: Sandipan Das
---
arch/powerpc/lib/sstep.c | 16
1 file changed, 16
On 27/08/20 9:39 am, Aneesh Kumar K.V wrote:
> Signed-off-by: Aneesh Kumar K.V
> ---
> arch/powerpc/mm/book3s64/pkeys.c | 7 ++-
> 1 file changed, 6 insertions(+), 1 deletion(-)
>
Reviewed-by: Sandipan Das
On 27/08/20 9:39 am, Aneesh Kumar K.V wrote:
> Signed-off-by: Aneesh Kumar K.V
> ---
> arch/powerpc/mm/book3s64/pkeys.c | 7 ++-
> 1 file changed, 6 insertions(+), 1 deletion(-)
>
Reviewed-by: Sandipan Das
On 27/08/20 9:39 am, Aneesh Kumar K.V wrote:
> Radix use IAMR Key 0 and hash translation use IAMR key 3.
>
> Signed-off-by: Aneesh Kumar K.V
> ---
> arch/powerpc/include/asm/book3s/64/kup.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
Reviewed-by: Sandipan Das
On 27/08/20 9:39 am, Aneesh Kumar K.V wrote:
> Radix use AMR Key 0 and hash translation use AMR key 3.
>
> Signed-off-by: Aneesh Kumar K.V
> ---
> arch/powerpc/include/asm/book3s/64/kup.h | 9 -
> 1 file changed, 4 insertions(+), 5 deletions(-)
>
Reviewed-by: Sandipan Das
chieve the same.
>
> Signed-off-by: Aneesh Kumar K.V
> ---
> arch/powerpc/include/asm/book3s/64/kup.h | 12 +---
> 1 file changed, 9 insertions(+), 3 deletions(-)
>
Reviewed-by: Sandipan Das
, 61 deletions(-)
>
Reviewed-by: Sandipan Das
-by: Aneesh Kumar K.V
> ---
> arch/powerpc/kernel/process.c | 9 +
> 1 file changed, 9 insertions(+)
>
Reviewed-by: Sandipan Das
off-by: Aneesh Kumar K.V
> ---
> arch/powerpc/include/asm/book3s/64/pkeys.h | 2 ++
> arch/powerpc/kernel/process.c | 6 +-
> arch/powerpc/mm/book3s64/pkeys.c | 16 ++--
> 3 files changed, 9 insertions(+), 15 deletions(-)
>
Reviewed-by: Sandipan Das
powerpc/kernel/asm-offsets.c| 2 +
> arch/powerpc/kernel/entry_64.S | 6 +-
> arch/powerpc/kernel/exceptions-64s.S | 4 +-
> arch/powerpc/kernel/syscall_64.c | 30 +++-
> 6 files changed, 192 insertions(+), 31 deletions(-)
>
Reviewed-by: Sandipan Das
bpage.c | 2 +-
> arch/powerpc/mm/book3s64/hash_pgtable.c | 2 +-
> arch/powerpc/mm/book3s64/hash_utils.c | 10
> arch/powerpc/mm/book3s64/pkeys.c | 4
> 11 files changed, 37 insertions(+), 18 deletions(-)
>
Reviewed-by: Sandipan Das
return -1;
> +
> prefix_r = GET_PREFIX_R(word);
> ra = GET_PREFIX_RA(suffix);
> op->update_reg = ra;
>
LGTM
Reviewed-by: Sandipan Das
ned-off-by: Sandipan Das
---
Previous versions can be found at:
v3:
https://lore.kernel.org/linuxppc-dev/1bb744b0c7ed3985a5b73289f4de629ac0aeaf7c.1596453627.git.sandi...@linux.ibm.com/
v2:
https://lore.kernel.org/linuxppc-dev/566dde119ce71f00f9642807ba30ceb7f54c9bfa.1596441105.git.sandi...@linux.i
On 04/08/20 5:53 pm, Michael Ellerman wrote:
> Sandipan Das writes:
>> On 04/08/20 6:38 am, Michael Ellerman wrote:
>>> Sandipan Das writes:
>>>> On 03/08/20 4:32 pm, Michael Ellerman wrote:
>>>>> Sachin Sant writes:
>>>>>
Hi Michael,
On 04/08/20 6:38 am, Michael Ellerman wrote:
> Sandipan Das writes:
>> On 03/08/20 4:32 pm, Michael Ellerman wrote:
>>> Sachin Sant writes:
>>>>> On 02-Aug-2020, at 10:58 PM, Sandipan Das wrote:
>>>>> On 02/08/20 4:45 pm, Sachin Sant
On 03/08/20 4:34 pm, Michael Ellerman wrote:
> Sandipan Das writes:
>> On some distros, there are conflicts w.r.t to redefinition
>> of pkey syscall numbers which cause build failures. This
>> fixes them.
>>
>> Reported-by: Sachin Sant
>> Signed-o
Hi Michael,
On 03/08/20 4:32 pm, Michael Ellerman wrote:
> Sachin Sant writes:
>>> On 02-Aug-2020, at 10:58 PM, Sandipan Das wrote:
>>> On 02/08/20 4:45 pm, Sachin Sant wrote:
>>>> pkey_exec_prot test from linuxppc merge branch (3f68564f1f5a) fails to
On some distros, there are conflicts w.r.t to redefinition
of pkey syscall numbers which cause build failures. This
fixes them.
Reported-by: Sachin Sant
Signed-off-by: Sandipan Das
---
Previous versions can be found at:
v2:
https://lore.kernel.org/linuxppc-dev
On some distros, there are conflicts w.r.t to redefinition
of pkey syscall numbers which cause build failures. This
fixes them.
Reported-by: Sachin Sant
Signed-off-by: Sandipan Das
---
Previous versions can be found at:
v1:
https://lore.kernel.org/linuxppc-dev/20200803074043.466809-1-sandi
CALL(__NR_pkey_alloc,
sys_pkey_alloc)
/usr/include/asm-generic/unistd.h:732:__SYSCALL(__NR_pkey_free,
sys_pkey_free)
Reported-by: Sachin Sant
Signed-off-by: Sandipan Das
---
tools/testing/selftests/powerpc/include/pkeys.h | 5 +
1 file changed, 5 insertions(+)
diff --git a/tools/testi
Hi Sachin,
On 02/08/20 4:45 pm, Sachin Sant wrote:
> pkey_exec_prot test from linuxppc merge branch (3f68564f1f5a) fails to
> build due to following error:
>
> gcc -std=gnu99 -O2 -Wall -Werror
> -DGIT_VERSION='"v5.8-rc7-1276-g3f68564f1f5a"'
> -I/home/sachin/linux/tools/testing/selftests/powerpc
CPUs as reported by get_nprocs_conf().
Fixes: 3752e453f6ba ("selftests/powerpc: Add tests of PMU EBBs")
Reported-by: Shirisha Ganta
Signed-off-by: Sandipan Das
Reviewed-by: Kamalesh Babulal
---
Previous versions can be found at:
v2:
https://lore.kernel.org/linuxppc-dev/2020060907373
Hi Srikar, Michael,
On 29/07/20 9:33 pm, Srikar Dronamraju wrote:
> * Sandipan Das [2020-06-09 13:07:33]:
>
>> The size of the CPU affinity mask must be large enough for
>> systems with a very large number of CPUs. Otherwise, tests
>> which try to determine the fir
the
other restrictive, attempt to protect a common page at the
same time. This adds a test to detect the bug.
Signed-off-by: Sandipan Das
---
tools/testing/selftests/powerpc/mm/.gitignore | 1 +
tools/testing/selftests/powerpc/mm/Makefile | 5 +-
.../selftests/powerpc/mm/pkey_siginfo.c
This adds a helper similar to FAIL_IF() which lets a
program exit with code 1 (to indicate failure) when
the given condition is true.
Signed-off-by: Sandipan Das
---
tools/testing/selftests/powerpc/include/utils.h | 9 +
1 file changed, 9 insertions(+)
diff --git a/tools/testing
check
the behaviour of pkeys with read, write but no execute
rights and all the rights, in favour of checking all the
possible combinations of read, write and execute rights
to be able to detect bugs like the one mentioned above.
Signed-off-by: Sandipan Das
---
.../selftests/powerpc/mm/pkey_exec_prot.
The gettid() syscall wrapper was first introduced in
glibc 2.30. This adds a wrapper for use in distros
running older versions.
Suggested-by: Christophe Leroy
Suggested-by: Michael Ellerman
Signed-off-by: Sandipan Das
---
tools/testing/selftests/powerpc/include/utils.h | 10 ++
1 file
This adds some new pkey-related helper to print
access rights of a pkey in the "rwx" format and
to generate different valid combinations of pkey
rights starting from a given combination.
Signed-off-by: Sandipan Das
---
.../testing/selftests/powerpc/include/pk
This moves all the pkey-related helpers to a new header
file and also a helper to print error messages in signal
handlers to the existing utils header file.
Signed-off-by: Sandipan Das
---
.../testing/selftests/powerpc/include/pkeys.h | 108 ++
.../testing/selftests/powerpc
/linuxppc-dev/cover.1594897099.git.sandi...@linux.ibm.com/
Changes in v2:
- Added a wrapper for the gettid syscall based on suggestions
from Michael and Christophe.
Sandipan Das (6):
selftests/powerpc: Move pkey helpers to headers
selftests/powerpc: Add pkey helpers for rights
selftests/powerpc
On 27/07/20 5:22 am, Michael Ellerman wrote:
> Christophe Leroy writes:
>> Michael Ellerman a écrit :
>>> Sandipan Das writes:
>>>> diff --git a/tools/testing/selftests/powerpc/mm/pkey_siginfo.c
>>>> b/tools/testing/selftests/powerpc/mm/pkey_sigi
the
other restrictive, attempt to protect a common page at the
same time. This adds a test to detect the bug.
Signed-off-by: Sandipan Das
---
tools/testing/selftests/powerpc/mm/.gitignore | 1 +
tools/testing/selftests/powerpc/mm/Makefile | 5 +-
.../selftests/powerpc/mm/pkey_siginfo.c
This adds a helper similar to FAIL_IF() which lets a
program exit with code 1 (to indicate failure) when
the given condition is true.
Signed-off-by: Sandipan Das
---
tools/testing/selftests/powerpc/include/utils.h | 9 +
1 file changed, 9 insertions(+)
diff --git a/tools/testing
check
the behaviour of pkeys with read, write but no execute
rights and all the rights, in favour of checking all the
possible combinations of read, write and execute rights
to be able to detect bugs like the one mentioned above.
Signed-off-by: Sandipan Das
---
.../selftests/powerpc/mm/pkey_exec_prot.
This adds some new pkey-related helper to print
access rights of a pkey in the "rwx" format and
to generate different valid combinations of pkey
rights starting from a given combination.
Signed-off-by: Sandipan Das
---
.../testing/selftests/powerpc/include/pk
This moves all the pkey-related helpers to a new header
file and also a helper to print error messages in signal
handlers to the existing utils header file.
Signed-off-by: Sandipan Das
---
.../testing/selftests/powerpc/include/pkeys.h | 108 ++
.../testing/selftests/powerpc
Based on recent bugs found in the pkey infrastructure, this
improves the test for execute-disabled pkeys and adds a new
test for detecting inconsistencies with the pkey reported by
the signal information upon getting a fault.
Sandipan Das (5):
selftests/powerpc: Move pkey helpers to headers
Hi Bala,
On 22/06/20 12:39 pm, Balamuruhan S wrote:
> add provision to declare test is a negative scenario, verify
> whether emulation fails and avoid executing it.
>
> Signed-off-by: Balamuruhan S
> ---
> arch/powerpc/lib/test_emulate_step.c | 46 ++--
> 1 file changed,
e/asm/ppc-opcode.h | 35 ++
> arch/powerpc/lib/test_emulate_step.c | 155 ++
> 2 files changed, 91 insertions(+), 99 deletions(-)
> [...]
>
Acked-by: Sandipan Das
-
> arch/powerpc/net/bpf_jit_comp.c | 132 ++--
> arch/powerpc/net/bpf_jit_comp64.c | 278 +-
> 6 files changed, 378 insertions(+), 373 deletions(-)
> [...]
>
Acked-by: Sandipan Das
et/bpf_jit.h| 18 +-
> arch/powerpc/net/bpf_jit32.h | 10 +-
> arch/powerpc/net/bpf_jit64.h | 4 ++--
> arch/powerpc/net/bpf_jit_comp.c | 2 +-
> arch/powerpc/net/bpf_jit_comp64.c | 20 ++--
> 5 files changed, 19 insertions(+), 35 deletions(-)
> [...]
>
Acked-by: Sandipan Das
CPUs as reported by get_nprocs().
Fixes: 3752e453f6ba ("selftests/powerpc: Add tests of PMU EBBs")
Reported-by: Shirisha Ganta
Signed-off-by: Sandipan Das
Reviewed-by: Kamalesh Babulal
---
Previous versions can be found at:
v1:
https://lore.kernel.org/linuxppc-dev/20200608144212.9851
On 08/06/20 8:12 pm, Sandipan Das wrote:
> The size of the cpu set must be large enough for systems
> with a very large number of CPUs. Otherwise, tests which
> try to determine the first online CPU by calling
> sched_getaffinity() will fail. This makes sure that the
> size of th
On 08/06/20 8:12 pm, Sandipan Das wrote:
> The size of the cpu set must be large enough for systems
> with a very large number of CPUs. Otherwise, tests which
> try to determine the first online CPU by calling
> sched_getaffinity() will fail. This makes sure that the
> size of th
get_nprocs().
Fixes: 3752e453f6ba ("selftests/powerpc: Add tests of PMU EBBs")
Reported-by: Shirisha Ganta
Signed-off-by: Sandipan Das
---
tools/testing/selftests/powerpc/utils.c | 33 -
1 file changed, 21 insertions(+), 12 deletions(-)
diff --git a/too
The Power ISA mandates that all writes to the Authority
Mask Register (AMR) must always be preceded as well as
succeeded by a context synchronizing instruction.
This makes sure that the tests follow this requirement
when attempting to update a pkey's access rights.
Signed-off-by: Sandipa
Apart from read and write access, memory protection keys can
also be used for restricting execute permission of pages on
powerpc. This adds a test to verify if the feature works as
expected.
Signed-off-by: Sandipan Das
---
tools/testing/selftests/powerpc/mm/.gitignore | 1 +
tools/testing
This moves a function to test if the MMU is in Hash mode
under the generic test utilities.
Signed-off-by: Sandipan Das
---
.../testing/selftests/powerpc/include/utils.h | 1 +
tools/testing/selftests/powerpc/mm/Makefile | 2 +-
.../selftests/powerpc/mm/bad_accesses.c | 28
v2:
- Added .gitignore entry for test binary.
- Fixed builds for older distros where siginfo_t might not have si_pkey as
a formal member based on discussion with Michael.
Sandipan Das (3):
selftests: powerpc: Fix pkey access right updates
selftests: powerpc: Move Hash MMU check to utilities
Hi Michael,
On 01/06/20 7:29 am, Sandipan Das wrote:
> Hi Michael,
>
> Thanks for your suggestions. I had a few questions regarding some
> of them.
>
> On 29/05/20 7:18 am, Michael Ellerman wrote:
>>> [...]
>>> +
>>> +static void pkeyreg_set(un
Hi Michael,
Thanks for your suggestions. I had a few questions regarding some
of them.
On 29/05/20 7:18 am, Michael Ellerman wrote:
>> [...]
>> +
>> +static void pkeyreg_set(unsigned long uamr)
>> +{
>> +asm volatile("isync; mtspr 0xd, %0; isync;" : : "r"(uamr));
>> +}
>
> You can use m
Apart from read and write access, memory protection keys can
also be used for restricting execute permission of pages on
powerpc. This adds a test to verify if the feature works as
expected.
Signed-off-by: Sandipan Das
---
Previous versions can be found at
v1:
https://lore.kernel.org/linuxppc
Hi Michael,
On 26/05/20 6:05 pm, Michael Ellerman wrote:
> [...]
>> +
>> +/* Override definitions as they might be inconsistent */
>> +#undef PKEY_DISABLE_ACCESS
>> +#define PKEY_DISABLE_ACCESS 0x3
>
> Why would they be inconsistent?
>
The definition in sys/mman.h still uses the value specific
Hi Florian,
On 08/05/20 11:31 pm, Florian Weimer wrote:
> * Sandipan Das:
>
>> The Power ISA mandates that all writes to the Authority
>> Mask Register (AMR) must always be preceded as well as
>> succeeded by a context-synchronizing instruction. This
>> appl
pkeys: introduce powerpc support")
Reported-by: Aneesh Kumar K.V
Suggested-by: Aneesh Kumar K.V
Signed-off-by: Sandipan Das
---
tools/testing/selftests/vm/pkey-powerpc.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/tools/testing/selftests/vm/pkey-powerpc.h
b/too
: 130f573c2a79 ("selftests/vm/pkeys: introduce powerpc support")
Reported-by: Aneesh Kumar K.V
Signed-off-by: Sandipan Das
---
tools/testing/selftests/vm/pkey-powerpc.h | 8 ++--
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/tools/testing/selftests/vm/pkey-powerpc.h
b/too
Some fixes for the powerpc bits w.r.t to the way the pkey
access rights are defined and how the permission register
is updated.
Sandipan Das (2):
selftests: vm: pkeys: Fix powerpc access right definitions
selftests: vm: pkeys: Fix powerpc access right updates
tools/testing/selftests/vm/pkey
Apart from read and write access, memory protection keys can
also be used for restricting execute permission of pages on
powerpc. This adds a test to verify if the feature works as
expected.
Signed-off-by: Sandipan Das
---
tools/testing/selftests/powerpc/mm/Makefile | 3 +-
.../selftests
Hi Mike,
On 28/04/20 12:39 am, Mike Kravetz wrote:
> On 4/27/20 10:25 AM, Mike Kravetz wrote:
>> On 4/26/20 10:04 PM, Sandipan Das wrote:
>>> On 18/04/20 12:20 am, Mike Kravetz wrote:
>>>> Now that architectures provide arch_hugetlb_valid_size(), parsing
>&g
Hi Mike,
On 18/04/20 12:20 am, Mike Kravetz wrote:
> Now that architectures provide arch_hugetlb_valid_size(), parsing
> of "hugepagesz=" can be done in architecture independent code.
> Create a single routine to handle hugepagesz= parsing and remove
> all arch specific routines. We can also remo
This ensures that both 32-bit and 64-bit binaries are generated
when this is built on a x86_64 system. Most of the changes have
been borrowed from tools/testing/selftests/x86/Makefile.
Signed-off-by: Sandipan Das
Acked-by: Dave Hansen
Tested-by: Dave Hansen
---
tools/testing/selftests/vm
function alignment on
page size. Since this can only be done at build time,
64K is used as the alignment factor as that also ensures
4K alignment.
Signed-off-by: Sandipan Das
Acked-by: Dave Hansen
---
tools/testing/selftests/vm/pkey-powerpc.h| 2 +-
tools/testing/selftests/vm/protection_keys.c | 5
: Sandipan Das
Acked-by: Dave Hansen
---
tools/testing/selftests/vm/pkey-powerpc.h | 6 --
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/tools/testing/selftests/vm/pkey-powerpc.h
b/tools/testing/selftests/vm/pkey-powerpc.h
index d31665c48f5ed..02bd4dd7d467a 100644
--- a/tools
From: Ram Pai
Ensure that pkey-0 is allocated on start and that it can
be attached dynamically in various modes, without failures.
cc: Dave Hansen
cc: Florian Weimer
Signed-off-by: Ram Pai
Signed-off-by: Sandipan Das
Acked-by: Dave Hansen
---
tools/testing/selftests/vm/protection_keys.c
From: Ram Pai
This introduces a new allocator that allocates 4K hardware
pages to back 64K linux pages. This allocator is available
only on powerpc.
cc: Dave Hansen
cc: Florian Weimer
Signed-off-by: Ram Pai
Signed-off-by: Thiago Jung Bauermann
Signed-off-by: Sandipan Das
Acked-by: Dave
From: Ram Pai
Detect write-violation on a page to which access-disabled
key is associated much after the page is mapped.
cc: Dave Hansen
cc: Florian Weimer
Signed-off-by: Ram Pai
Acked-by: Dave Hansen
Signed-off-by: Sandipan Das
---
tools/testing/selftests/vm/protection_keys.c | 13
From: Ram Pai
Detect write-violation on a page to which write-disabled
key is associated much after the page is mapped.
cc: Dave Hansen
cc: Florian Weimer
Signed-off-by: Ram Pai
Acked-by: Dave Hansen
Signed-off-by: Sandipan Das
---
tools/testing/selftests/vm/protection_keys.c | 12
From: Ram Pai
Detect access-violation on a page to which access-disabled
key is associated much after the page is mapped.
cc: Dave Hansen
cc: Florian Weimer
Signed-off-by: Ram Pai
Acked-by: Dave Hansen
Signed-off: Sandipan Das
---
tools/testing/selftests/vm/protection_keys.c | 19
From: Ram Pai
For the pkeys subsystem to work, both the CPU and the
kernel need to have support. So, additionally check if
the kernel supports pkeys apart from the CPU feature
checks.
cc: Dave Hansen
cc: Florian Weimer
Signed-off-by: Ram Pai
Signed-off-by: Sandipan Das
Acked-by: Dave Hansen
-off-by: Sandipan Das
Acked-by: Dave Hansen
---
tools/testing/selftests/vm/protection_keys.c | 11 ++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/tools/testing/selftests/vm/protection_keys.c
b/tools/testing/selftests/vm/protection_keys.c
index e6de078a9196f
From: "Desnes A. Nunes do Rosario"
The number of reserved pkeys in a PowerNV environment is
different from that on PowerVM or KVM.
Tested on PowerVM and PowerNV environments.
Signed-off-by: "Desnes A. Nunes do Rosario"
Signed-off-by: Ram Pai
Signed-off-by: Sandipan Das
A
(), all of its
dependencies and other similar functions have been
moved ahead of the signal handler.
cc: Dave Hansen
cc: Florian Weimer
Signed-off-by: Ram Pai
Signed-off-by: Sandipan Das
Acked-by: Dave Hansen
---
tools/testing/selftests/vm/pkey-helpers.h| 2 +
tools/testing/selftests/vm
From: Ram Pai
This introduces some generic abstractions and provides
the corresponding architecture-specfic implementations
for these abstractions.
cc: Dave Hansen
cc: Florian Weimer
Signed-off-by: Ram Pai
Signed-off-by: Thiago Jung Bauermann
Signed-off-by: Sandipan Das
Acked-by: Dave
From: Ram Pai
alloc_random_pkey() was allocating the same pkey every
time. Not all pkeys were geting tested. This fixes it.
cc: Dave Hansen
cc: Florian Weimer
Signed-off-by: Ram Pai
Acked-by: Dave Hansen
Signed-off-by: Sandipan Das
---
tools/testing/selftests/vm/protection_keys.c | 3
The huge page size can vary across architectures. This will
ensure that the correct huge page size is used when accessing
the hugetlb controls under sysfs. Instead of using a hardcoded
page size (i.e. 2MB), this now uses the HPAGE_SIZE macro which
is arch-specific.
Signed-off-by: Sandipan Das
Florian Weimer
Signed-off-by: Ram Pai
Signed-off-by: Sandipan Das
Acked-by: Dave Hansen
---
tools/testing/selftests/vm/protection_keys.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/testing/selftests/vm/protection_keys.c
b/tools/testing/selftests/vm/protecti
-by: Sandipan Das
---
tools/testing/selftests/vm/protection_keys.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/testing/selftests/vm/protection_keys.c
b/tools/testing/selftests/vm/protection_keys.c
index bed9d4de12b48..4b1ddb526228d 100644
--- a/tools/testing
This introduces some functions that help with setting
or clearing bits of a particular pkey. This also adds
an abstraction for getting a pkey's bit position in
the pkey register as this may vary across architectures.
Signed-off-by: Sandipan Das
Acked-by: Dave Hansen
---
tools/testing/self
1 - 100 of 321 matches
Mail list logo