<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-dev/tools/testing/selftests/powerpc/mm/Makefile, branch master</title>
<subtitle>Linux kernel development work - see feature branches</subtitle>
<id>https://git.zx2c4.com/linux-dev/atom/tools/testing/selftests/powerpc/mm/Makefile?h=master</id>
<link rel='self' href='https://git.zx2c4.com/linux-dev/atom/tools/testing/selftests/powerpc/mm/Makefile?h=master'/>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/'/>
<updated>2022-08-26T01:02:21Z</updated>
<entry>
<title>selftests/powerpc: Add a test for execute-only memory</title>
<updated>2022-08-26T01:02:21Z</updated>
<author>
<name>Nicholas Miehlbradt</name>
<email>nicholas@linux.ibm.com</email>
</author>
<published>2022-08-17T05:06:40Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=98acee3f8db451eaab9fbd422e523c228aacf08c'/>
<id>urn:sha1:98acee3f8db451eaab9fbd422e523c228aacf08c</id>
<content type='text'>
This selftest is designed to cover execute-only protections
on the Radix MMU but will also work with Hash.

The tests are based on those found in pkey_exec_test with modifications
to use the generic mprotect() instead of the pkey variants.

Signed-off-by: Nicholas Miehlbradt &lt;nicholas@linux.ibm.com&gt;
Signed-off-by: Russell Currey &lt;ruscur@russell.cc&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://lore.kernel.org/r/20220817050640.406017-2-ruscur@russell.cc

</content>
</entry>
<entry>
<title>selftests/powerpc: Add a test of 4PB SLB handling</title>
<updated>2022-04-29T03:43:22Z</updated>
<author>
<name>Michael Ellerman</name>
<email>mpe@ellerman.id.au</email>
</author>
<published>2022-03-17T14:39:25Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=e96a76ee5283d509f2bf45133d147e77f73a1b15'/>
<id>urn:sha1:e96a76ee5283d509f2bf45133d147e77f73a1b15</id>
<content type='text'>
Add a test for a bug we had in the 4PB address space SLB handling. It
was fixed in commit 4c2de74cc869 ("powerpc/64: Interrupts save PPR on
stack rather than thread_struct").

Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://lore.kernel.org/r/20220317143925.1030447-1-mpe@ellerman.id.au
</content>
</entry>
<entry>
<title>selftests/powerpc: Test for spurious kernel memory faults on radix</title>
<updated>2021-04-08T11:17:42Z</updated>
<author>
<name>Jordan Niethe</name>
<email>jniethe5@gmail.com</email>
</author>
<published>2021-02-08T03:29:57Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=29e3ea8cbd2958cf237b84652ec236803f2c6202'/>
<id>urn:sha1:29e3ea8cbd2958cf237b84652ec236803f2c6202</id>
<content type='text'>
Previously when mapping kernel memory on radix, no ptesync was
included which would periodically lead to unhandled spurious faults.
Mapping kernel memory is used when code patching with Strict RWX
enabled. As suggested by Chris Riedl, turning ftrace on and off does a
large amount of code patching so is a convenient way to see this kind
of fault.

Add a selftest to try and trigger this kind of a spurious fault. It
tests for 30 seconds which is usually long enough for the issue to
show up.

Signed-off-by: Jordan Niethe &lt;jniethe5@gmail.com&gt;
[mpe: Rename it to better reflect what it does, rather than the symptom]
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://lore.kernel.org/r/20210208032957.1232102-2-jniethe5@gmail.com
</content>
</entry>
<entry>
<title>Revert "powerpc/64s: Remove PROT_SAO support"</title>
<updated>2020-08-24T04:12:53Z</updated>
<author>
<name>Shawn Anastasio</name>
<email>shawn@anastas.io</email>
</author>
<published>2020-08-21T18:55:56Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=12564485ed8caac3c18572793ec01330792c7191'/>
<id>urn:sha1:12564485ed8caac3c18572793ec01330792c7191</id>
<content type='text'>
This reverts commit 5c9fa16e8abd342ce04dc830c1ebb2a03abf6c05.

Since PROT_SAO can still be useful for certain classes of software,
reintroduce it. Concerns about guest migration for LPARs using SAO
will be addressed next.

Signed-off-by: Shawn Anastasio &lt;shawn@anastas.io&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://lore.kernel.org/r/20200821185558.35561-2-shawn@anastas.io
</content>
</entry>
<entry>
<title>selftests/powerpc: Add test of stack expansion logic</title>
<updated>2020-07-29T11:02:11Z</updated>
<author>
<name>Michael Ellerman</name>
<email>mpe@ellerman.id.au</email>
</author>
<published>2020-07-24T09:25:24Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=c9938a9dac95be7650218cdd8e9d1f882e7b5691'/>
<id>urn:sha1:c9938a9dac95be7650218cdd8e9d1f882e7b5691</id>
<content type='text'>
We have custom stack expansion checks that it turns out are extremely
badly tested and contain bugs, surprise. So add some tests that
exercise the code and capture the current boundary conditions.

The signal test currently fails on 64-bit kernels because the 2048
byte allowance for the signal frame is too small, we will fix that in
a subsequent patch.

Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://lore.kernel.org/r/20200724092528.1578671-1-mpe@ellerman.id.au
</content>
</entry>
<entry>
<title>selftests/powerpc: Add test for pkey siginfo verification</title>
<updated>2020-07-29T11:02:10Z</updated>
<author>
<name>Sandipan Das</name>
<email>sandipan@linux.ibm.com</email>
</author>
<published>2020-07-27T04:00:40Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=c27f2fd1705a7e19ef2dc2b986c0d1cde3c3dbe7'/>
<id>urn:sha1:c27f2fd1705a7e19ef2dc2b986c0d1cde3c3dbe7</id>
<content type='text'>
Commit c46241a370a61 ("powerpc/pkeys: Check vma before
returning key fault error to the user") fixes a bug which
causes the kernel to set the wrong pkey in siginfo when a
pkey fault occurs after two competing threads that have
allocated different pkeys, one fully permissive and 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 &lt;sandipan@linux.ibm.com&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://lore.kernel.org/r/ce40b6ee270bda52e8f4088578ed2faf7d1d509a.1595821792.git.sandipan@linux.ibm.com
</content>
</entry>
<entry>
<title>powerpc/64s: Remove PROT_SAO support</title>
<updated>2020-07-21T14:01:25Z</updated>
<author>
<name>Nicholas Piggin</name>
<email>npiggin@gmail.com</email>
</author>
<published>2020-07-03T01:19:57Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=5c9fa16e8abd342ce04dc830c1ebb2a03abf6c05'/>
<id>urn:sha1:5c9fa16e8abd342ce04dc830c1ebb2a03abf6c05</id>
<content type='text'>
ISA v3.1 does not support the SAO storage control attribute required to
implement PROT_SAO. PROT_SAO was used by specialised system software
(Lx86) that has been discontinued for about 7 years, and is not thought
to be used elsewhere, so removal should not cause problems.

We rather remove it than keep support for older processors, because
live migrating guest partitions to newer processors may not be possible
if SAO is in use (or worse allowed with silent races).

- PROT_SAO stays in the uapi header so code using it would still build.
- arch_validate_prot() is removed, the generic version rejects PROT_SAO
  so applications would get a failure at mmap() time.

Signed-off-by: Nicholas Piggin &lt;npiggin@gmail.com&gt;
[mpe: Drop KVM change for the time being]
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://lore.kernel.org/r/20200703011958.1166620-3-npiggin@gmail.com
</content>
</entry>
<entry>
<title>selftests/powerpc: Add test for execute-disabled pkeys</title>
<updated>2020-06-30T04:37:54Z</updated>
<author>
<name>Sandipan Das</name>
<email>sandipan@linux.ibm.com</email>
</author>
<published>2020-06-04T12:56:10Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=1addb6444791f9e87fce0eb9882ec96a4a76e615'/>
<id>urn:sha1:1addb6444791f9e87fce0eb9882ec96a4a76e615</id>
<content type='text'>
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 &lt;sandipan@linux.ibm.com&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://lore.kernel.org/r/20200604125610.649668-4-sandipan@linux.ibm.com
</content>
</entry>
<entry>
<title>selftests/powerpc: Move Hash MMU check to utilities</title>
<updated>2020-06-30T04:37:51Z</updated>
<author>
<name>Sandipan Das</name>
<email>sandipan@linux.ibm.com</email>
</author>
<published>2020-06-04T12:56:09Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=c405b738daf9d8e8a5aedfeb6be851681e65e54b'/>
<id>urn:sha1:c405b738daf9d8e8a5aedfeb6be851681e65e54b</id>
<content type='text'>
This moves a function to test if the MMU is in Hash mode
under the generic test utilities.

Signed-off-by: Sandipan Das &lt;sandipan@linux.ibm.com&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://lore.kernel.org/r/20200604125610.649668-3-sandipan@linux.ibm.com
</content>
</entry>
<entry>
<title>selftests/powerpc: Add a test of bad (out-of-range) accesses</title>
<updated>2020-01-06T05:25:27Z</updated>
<author>
<name>Michael Ellerman</name>
<email>mpe@ellerman.id.au</email>
</author>
<published>2019-05-20T10:20:51Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=5eb7cfb3a2b178f3d443301cda0825bb9f475657'/>
<id>urn:sha1:5eb7cfb3a2b178f3d443301cda0825bb9f475657</id>
<content type='text'>
Userspace isn't allowed to access certain address ranges, make sure we
actually test that to at least some degree.

This would have caught the recent bug where the SLB fault handler was
incorrectly called on an out-of-range access when using the Radix MMU.
It also would have caught the bug we had in get_region_id() where we
were inserting SLB entries for bad addresses.

Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Signed-off-by: Nicholas Piggin &lt;npiggin@gmail.com&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://lore.kernel.org/r/20190520102051.12103-1-mpe@ellerman.id.au
</content>
</entry>
</feed>
