<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/tools/testing/selftests/powerpc/security, branch v6.6.131</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v6.6.131</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v6.6.131'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2023-02-15T11:41:00+00:00</updated>
<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 read/write debugfs file, int</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:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=121d340be9a17ed89d523c56203908c01e09a306'/>
<id>urn:sha1:121d340be9a17ed89d523c56203908c01e09a306</id>
<content type='text'>
Debugfs files are not always integers, so make *_file return/write a
byte buffer, and *_int deal with int values specifically. This increases
consistency with the other file read/write helpers.

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/20230203003947.38033-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: Add missing files to .gitignores</title>
<updated>2022-06-29T09:37:04+00:00</updated>
<author>
<name>Michael Ellerman</name>
<email>mpe@ellerman.id.au</email>
</author>
<published>2022-06-16T07:07:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=dd3549c5032d588bf444bc8b8eae5108d0aa055a'/>
<id>urn:sha1:dd3549c5032d588bf444bc8b8eae5108d0aa055a</id>
<content type='text'>
These were missed when the respective tests were added, add them now.

Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://lore.kernel.org/r/20220616070705.1941829-1-mpe@ellerman.id.au
</content>
</entry>
<entry>
<title>selftests/powerpc/pmu: fix spelling mistake "mis-match" -&gt; "mismatch"</title>
<updated>2022-05-22T05:59:54+00:00</updated>
<author>
<name>Colin Ian King</name>
<email>colin.i.king@gmail.com</email>
</author>
<published>2022-03-19T23:20:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=7801cb1dc60f7348687ca1c3aa03a944687563f0'/>
<id>urn:sha1:7801cb1dc60f7348687ca1c3aa03a944687563f0</id>
<content type='text'>
There are a few spelling mistakes in error messages. Fix them.

Signed-off-by: Colin Ian King &lt;colin.i.king@gmail.com&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://lore.kernel.org/r/20220319232025.22067-1-colin.i.king@gmail.com

</content>
</entry>
<entry>
<title>selftests/powerpc: Better reporting in spectre_v2</title>
<updated>2022-05-22T05:58:28+00:00</updated>
<author>
<name>Russell Currey</name>
<email>ruscur@russell.cc</email>
</author>
<published>2021-06-08T06:48:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=48482f4dd3432e5e62873bf0f2e254cfb8ce2ac2'/>
<id>urn:sha1:48482f4dd3432e5e62873bf0f2e254cfb8ce2ac2</id>
<content type='text'>
In commit f3054ffd71b5 ("selftests/powerpc: Return skip code for
spectre_v2"), the spectre_v2 selftest is updated to be aware of cases
where the vulnerability status reported in sysfs is incorrect, skipping
the test instead.

This happens because qemu can misrepresent the mitigation status of the
host to the guest. If the count cache is disabled in the host, and this
is correctly reported to the guest, then the guest won't apply
mitigations. If the guest is then migrated to a new host where
mitigations are necessary, it is now vulnerable because it has not
applied mitigations.

Update the selftest to report when we see excessive misses, indicative of
the count cache being disabled. If software flushing is enabled, also
warn that these flushes are just wasting performance.

Signed-off-by: Russell Currey &lt;ruscur@russell.cc&gt;
[mpe: Rebase and update change log appropriately]
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://lore.kernel.org/r/20210608064809.199116-1-ruscur@russell.cc

</content>
</entry>
<entry>
<title>selftests/powerpc: Fix typo in spectre_v2</title>
<updated>2022-05-04T09:37:46+00:00</updated>
<author>
<name>Russell Currey</name>
<email>ruscur@russell.cc</email>
</author>
<published>2021-06-08T05:48:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=dcbff9ad418497c2608d4b4d9423efc8e87e130e'/>
<id>urn:sha1:dcbff9ad418497c2608d4b4d9423efc8e87e130e</id>
<content type='text'>
Signed-off-by: Russell Currey &lt;ruscur@russell.cc&gt;
Signed-off-by: Christophe Leroy &lt;christophe.leroy@csgroup.eu&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://lore.kernel.org/r/20210608054851.164659-1-ruscur@russell.cc

</content>
</entry>
<entry>
<title>selftests/powerpc/pmu: Add macros to parse event codes</title>
<updated>2022-03-01T12:38:12+00:00</updated>
<author>
<name>Madhavan Srinivasan</name>
<email>maddy@linux.ibm.com</email>
</author>
<published>2022-01-27T07:19:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=6523dce86222451e5ca2df8a46597a217084bfdf'/>
<id>urn:sha1:6523dce86222451e5ca2df8a46597a217084bfdf</id>
<content type='text'>
Each platform has raw event encoding format which specifies the bit
positions for different fields. The fields from event code gets
translated into performance monitoring mode control register (MMCRx)
settings. Patch add macros to extract individual fields from the event
code.

Add functions for sanity checks, since testcases currently are only
supported in power9 and power10.

Signed-off-by: Madhavan Srinivasan &lt;maddy@linux.ibm.com&gt;
[mpe: Read PVR directly rather than using /proc/cpuinfo]
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://lore.kernel.org/r/20220127072012.662451-4-kjain@linux.ibm.com

</content>
</entry>
<entry>
<title>selftests/powerpc: skip tests for unavailable mitigations.</title>
<updated>2021-12-16T10:31:46+00:00</updated>
<author>
<name>Sachin Sant</name>
<email>sachinp@linux.vnet.ibm.com</email>
</author>
<published>2021-12-13T16:42:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=18678591846d668649fbd4f87b4a4c470818d386'/>
<id>urn:sha1:18678591846d668649fbd4f87b4a4c470818d386</id>
<content type='text'>
Mitigation patching test iterates over a set of mitigations irrespective
of whether a certain mitigation is supported/available in the kernel.
This causes following messages on a kernel where some mitigations
are unavailable:

  Spawned threads enabling/disabling mitigations ...
  cat: entry_flush: No such file or directory
  cat: uaccess_flush: No such file or directory
  Waiting for timeout ...
  OK

This patch adds a check for available mitigations in the kernel.

Reported-by: Nageswara R Sastry &lt;rnsastry@linux.ibm.com&gt;
Signed-off-by: Sachin Sant &lt;sachinp@linux.vnet.ibm.com&gt;
Tested-by: Nageswara R Sastry &lt;rnsastry@linux.ibm.com&gt;
Reviewed-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/163941374362.36967.18016981579099073379.sendpatchset@1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa

</content>
</entry>
<entry>
<title>selftests/powerpc/spectre_v2: Return skip code when miss_percent is high</title>
<updated>2021-12-09T11:41:21+00:00</updated>
<author>
<name>Thadeu Lima de Souza Cascardo</name>
<email>cascardo@canonical.com</email>
</author>
<published>2021-12-07T13:05:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=3c42e9542050d49610077e083c7c3f5fd5e26820'/>
<id>urn:sha1:3c42e9542050d49610077e083c7c3f5fd5e26820</id>
<content type='text'>
A mis-match between reported and actual mitigation is not restricted to the
Vulnerable case. The guest might also report the mitigation as "Software
count cache flush" and the host will still mitigate with branch cache
disabled.

So, instead of skipping depending on the detected mitigation, simply skip
whenever the detected miss_percent is the expected one for a fully
mitigated system, that is, above 95%.

Signed-off-by: Thadeu Lima de Souza Cascardo &lt;cascardo@canonical.com&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://lore.kernel.org/r/20211207130557.40566-1-cascardo@canonical.com

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