<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/tools/testing/selftests/powerpc/ptrace, branch v6.7</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v6.7</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v6.7'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2023-08-16T13:54:50+00:00</updated>
<entry>
<title>selftests/powerpc/ptrace: Update ptrace-perf watchpoint selftest</title>
<updated>2023-08-16T13:54:50+00:00</updated>
<author>
<name>Benjamin Gray</name>
<email>bgray@linux.ibm.com</email>
</author>
<published>2023-08-01T01:17:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=58709f6fc327a997daeeca77aa5e6bd4d4c238cf'/>
<id>urn:sha1:58709f6fc327a997daeeca77aa5e6bd4d4c238cf</id>
<content type='text'>
Now that ptrace and perf are no longer exclusive, update the
test to exercise interesting interactions.

An assembly file is used for the children to allow precise instruction
choice and addresses, while avoiding any compiler quirks.

Signed-off-by: Benjamin Gray &lt;bgray@linux.ibm.com&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://msgid.link/20230801011744.153973-7-bgray@linux.ibm.com

</content>
</entry>
<entry>
<title>selftests/powerpc/ptrace: Declare test temporary variables as volatile</title>
<updated>2023-08-02T12:22:19+00:00</updated>
<author>
<name>Benjamin Gray</name>
<email>bgray@linux.ibm.com</email>
</author>
<published>2023-07-25T00:58:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=c3062ede9927053754ba27b280afe00b9b31b37a'/>
<id>urn:sha1:c3062ede9927053754ba27b280afe00b9b31b37a</id>
<content type='text'>
While the target is volatile, the temporary variables used to access the
target cast away the volatile. This is undefined behaviour, and a
compiler may optimise away/reorder these accesses, breaking the test.

This was observed with GCC 13.1.1, but it can be difficult to reproduce
because of the dependency on compiler behaviour.

Signed-off-by: Benjamin Gray &lt;bgray@linux.ibm.com&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://msgid.link/20230725005841.28854-5-bgray@linux.ibm.com

</content>
</entry>
<entry>
<title>selftests/powerpc/ptrace: Fix typo in pid_max search error</title>
<updated>2023-08-02T12:22:19+00:00</updated>
<author>
<name>Benjamin Gray</name>
<email>bgray@linux.ibm.com</email>
</author>
<published>2023-07-25T00:58:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=fc6732a8556c1099b89f4777a96bd6a1ae5a4378'/>
<id>urn:sha1:fc6732a8556c1099b89f4777a96bd6a1ae5a4378</id>
<content type='text'>
pid_max_addr() searches for the 'pid_max' symbol in /proc/kallsyms, and
prints an error if it cannot find it. The error message has a typo,
calling it pix_max.

Signed-off-by: Benjamin Gray &lt;bgray@linux.ibm.com&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://msgid.link/20230725005841.28854-4-bgray@linux.ibm.com

</content>
</entry>
<entry>
<title>selftests/powerpc/ptrace: Explain why tests are skipped</title>
<updated>2023-08-02T12:22:19+00:00</updated>
<author>
<name>Benjamin Gray</name>
<email>bgray@linux.ibm.com</email>
</author>
<published>2023-07-25T00:58:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=68877ff20a7f4f773069784cfe4f6fe9c7b9a841'/>
<id>urn:sha1:68877ff20a7f4f773069784cfe4f6fe9c7b9a841</id>
<content type='text'>
Many tests require specific hardware features/configurations that a
typical machine might not have. As a result, it's common to see a test
is skipped. But it is tedious to find out why a test is skipped
when all it gives is the file location of the skip macro.

Convert SKIP_IF() to SKIP_IF_MSG(), with appropriate descriptions of why
the test is being skipped. This gives a general idea of why a test is
skipped, which can be looked into further if it doesn't make sense.

Signed-off-by: Benjamin Gray &lt;bgray@linux.ibm.com&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://msgid.link/20230725005841.28854-3-bgray@linux.ibm.com

</content>
</entry>
<entry>
<title>selftests/powerpc: Fix incorrect kernel headers search path</title>
<updated>2023-02-15T11:41:00+00:00</updated>
<author>
<name>Mathieu Desnoyers</name>
<email>mathieu.desnoyers@efficios.com</email>
</author>
<published>2023-01-27T13:57:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=4f11410bf6da87defe8fd59b0413f0d9f71744da'/>
<id>urn:sha1:4f11410bf6da87defe8fd59b0413f0d9f71744da</id>
<content type='text'>
Use $(KHDR_INCLUDES) as lookup path for kernel headers. This prevents
building against kernel headers from the build environment in scenarios
where kernel headers are installed into a specific output directory
(O=...).

Cc: stable@vger.kernel.org # v5.18+
Signed-off-by: Mathieu Desnoyers &lt;mathieu.desnoyers@efficios.com&gt;
Acked-by: Shuah Khan &lt;skhan@linuxfoundation.org&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://lore.kernel.org/r/20230127135755.79929-22-mathieu.desnoyers@efficios.com
</content>
</entry>
<entry>
<title>selftests/powerpc: Add generic read/write file util</title>
<updated>2023-02-09T12:56:45+00:00</updated>
<author>
<name>Benjamin Gray</name>
<email>bgray@linux.ibm.com</email>
</author>
<published>2023-02-03T00:39:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=a974f0c131891027fe8490e654a220151b4caa82'/>
<id>urn:sha1:a974f0c131891027fe8490e654a220151b4caa82</id>
<content type='text'>
File read/write is reimplemented in about 5 different ways in the
various PowerPC selftests. This indicates it should be a common util.

Add a common read_file / write_file implementation and convert users
to it where (easily) possible.

Signed-off-by: Benjamin Gray &lt;bgray@linux.ibm.com&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://lore.kernel.org/r/20230203003947.38033-2-bgray@linux.ibm.com

</content>
</entry>
<entry>
<title>selftests/powerpc: Add ptrace setup_core_pattern() null-terminator</title>
<updated>2022-12-02T07:04:27+00:00</updated>
<author>
<name>Benjamin Gray</name>
<email>bgray@linux.ibm.com</email>
</author>
<published>2022-11-28T04:19:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=94ba4f2c33f42dae7813dc169a177e922a39560c'/>
<id>urn:sha1:94ba4f2c33f42dae7813dc169a177e922a39560c</id>
<content type='text'>
- malloc() does not zero the buffer,
- fread() does not null-terminate it's output,
- `cat /proc/sys/kernel/core_pattern | hexdump -C` shows the file is
  not inherently null-terminated

So using string operations on the buffer is risky. Explicitly add a null
character to the end to make it safer.

Signed-off-by: Benjamin Gray &lt;bgray@linux.ibm.com&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://lore.kernel.org/r/20221128041948.58339-3-bgray@linux.ibm.com

</content>
</entry>
<entry>
<title>selftests/powerpc: Use mfspr/mtspr macros</title>
<updated>2022-12-02T07:04:27+00:00</updated>
<author>
<name>Benjamin Gray</name>
<email>bgray@linux.ibm.com</email>
</author>
<published>2022-11-28T04:19:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=aecfd680099ba518c34dff2941017c5aa97def52'/>
<id>urn:sha1:aecfd680099ba518c34dff2941017c5aa97def52</id>
<content type='text'>
No need to write inline asm for mtspr/mfspr, we have macros for this
in reg.h

Signed-off-by: Benjamin Gray &lt;bgray@linux.ibm.com&gt;
Reviewed-by: Andrew Donnellan &lt;ajd@linux.ibm.com&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://lore.kernel.org/r/20221128041948.58339-2-bgray@linux.ibm.com

</content>
</entry>
<entry>
<title>selftests/powerpc: Account for offline cpus in perf-hwbreak test</title>
<updated>2022-11-30T10:46:47+00:00</updated>
<author>
<name>Naveen N. Rao</name>
<email>naveen.n.rao@linux.vnet.ibm.com</email>
</author>
<published>2022-11-22T06:40:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=260095926d3956071c6699a28824c3f0fa7cd97a'/>
<id>urn:sha1:260095926d3956071c6699a28824c3f0fa7cd97a</id>
<content type='text'>
For systemwide tests, use online cpu mask to only open events on online
cpus. This enables this test to work on systems in lower SMT modes.

Signed-off-by: Naveen N. Rao &lt;naveen.n.rao@linux.vnet.ibm.com&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://lore.kernel.org/r/15fd447dcefd19945a7d31f0a475349f548a3603.1669096083.git.naveen.n.rao@linux.vnet.ibm.com

</content>
</entry>
<entry>
<title>selftests/powerpc: Bump up rlimit for perf-hwbreak test</title>
<updated>2022-11-30T10:46:47+00:00</updated>
<author>
<name>Naveen N. Rao</name>
<email>naveen.n.rao@linux.vnet.ibm.com</email>
</author>
<published>2022-11-22T06:40:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=616ad3f4aac287c48b66c92cb777395b4465ed4f'/>
<id>urn:sha1:616ad3f4aac287c48b66c92cb777395b4465ed4f</id>
<content type='text'>
The systemwide perf hardware breakpoint test tries to open a perf event
on each cpu. On large systems, we run out of file descriptors and fail
the test. Instead, have the test set the file descriptor limit to an
arbitraty high value.

Reported-by: Rohan Deshpande &lt;rohan_d@linux.vnet.ibm.com&gt;
Signed-off-by: Naveen N. Rao &lt;naveen.n.rao@linux.vnet.ibm.com&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://lore.kernel.org/r/187fed5843cecc1e5066677b6296ee88337d7bef.1669096083.git.naveen.n.rao@linux.vnet.ibm.com

</content>
</entry>
</feed>
