<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/tools/testing/selftests/powerpc, branch linux-4.20.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.20.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.20.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2018-11-15T12:05:17Z</updated>
<entry>
<title>selftests/powerpc: Adjust wild_bctr to build with old binutils</title>
<updated>2018-11-15T12:05:17Z</updated>
<author>
<name>Gustavo Romero</name>
</author>
<published>2018-11-15T02:33:30Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b2fed34a628df6118b5d4e13f49a33e15f704fa9'/>
<id>urn:sha1:b2fed34a628df6118b5d4e13f49a33e15f704fa9</id>
<content type='text'>
Currently the selftest wild_bctr can fail to build when an old gcc is
used, notably on gcc using a binutils version &lt;= 2.27, because the
assembler does not support the integer suffix UL.

This patch adjusts the wild_bctr test so the REG_POISON value is still
treated as an unsigned long for the shifts on compilation but the UL
suffix is absent on the stringification, so the inline asm code
generated has no UL suffixes.

Signed-off-by: Gustavo Romero &lt;gromero@linux.vnet.ibm.com&gt;
[mpe: Wrap long line]
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
</content>
</entry>
<entry>
<title>selftests/powerpc: Fix wild_bctr test to work on ppc64</title>
<updated>2018-11-12T03:47:54Z</updated>
<author>
<name>Michael Ellerman</name>
</author>
<published>2018-11-12T02:46:06Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=2c7645b0f7d1014f2636393de7906c6bfd25939f'/>
<id>urn:sha1:2c7645b0f7d1014f2636393de7906c6bfd25939f</id>
<content type='text'>
The selftest I recently added to test branching to an out-of-bounds
NIP doesn't work on 64-bit big endian. It does fail but not in the
right way. That is it SEGVs trying to load from the opd at BAD_NIP,
but it never gets as far as branching to BAD_NIP.

To fix it we need to create an opd which is reachable but which holds
the bad address.

Fixes: b7683fc66eba ("selftests/powerpc: Add a test of wild bctr")
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
</content>
</entry>
<entry>
<title>selftests/powerpc: Fix compilation issue due to asm label</title>
<updated>2018-10-31T23:06:03Z</updated>
<author>
<name>Naveen N. Rao</name>
</author>
<published>2018-10-31T17:18:13Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=1936f094e164cc13ebf17aba1d6b34e033e64188'/>
<id>urn:sha1:1936f094e164cc13ebf17aba1d6b34e033e64188</id>
<content type='text'>
We are using 'dscr_insn' as a label in inline asm to identify if a
SIGILL was generated by the mtspr instruction at that point. However,
with inline assembly, the compiler is still free to duplicate the asm
statement for optimization purposes, which results in the label being
defined twice with the error:
	/tmp/ccerQCql.s:874: Error: symbol `dscr_insn' is already defined

With different compiler versions, we may also see:
	/tmp/ccJzLDlN.o:(.toc+0x0): undefined reference to `dscr_insn'

Remove the use of the label in the inline assembly. Instead, just look
for the offending instruction in the signal handler.

Fixes: d2bf793237b3 ("selftests/powerpc: Add test to verify rfi flush across a system call")
Reported-by: Breno Leitao &lt;leitao@debian.org&gt;
Signed-off-by: Naveen N. Rao &lt;naveen.n.rao@linux.vnet.ibm.com&gt;
Tested-by: Breno Leitao &lt;leitao@debian.org&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
</content>
</entry>
<entry>
<title>selftests/powerpc/cache_shape: Fix out-of-tree build</title>
<updated>2018-10-31T12:56:22Z</updated>
<author>
<name>Michael Ellerman</name>
</author>
<published>2018-10-29T11:23:53Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=69f8117f17b332a68cd8f4bf8c2d0d3d5b84efc5'/>
<id>urn:sha1:69f8117f17b332a68cd8f4bf8c2d0d3d5b84efc5</id>
<content type='text'>
Use TEST_GEN_PROGS and don't redefine all, this makes the out-of-tree
build work. We need to move the extra dependencies below the include
of lib.mk, because it adds the $(OUTPUT) prefix if it's defined.

We can also drop the clean rule, lib.mk does it for us.

Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
</content>
</entry>
<entry>
<title>selftests/powerpc/switch_endian: Fix out-of-tree build</title>
<updated>2018-10-31T12:56:21Z</updated>
<author>
<name>Michael Ellerman</name>
</author>
<published>2018-10-29T11:23:52Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=266bac361d5677e61a6815bd29abeb3bdced2b07'/>
<id>urn:sha1:266bac361d5677e61a6815bd29abeb3bdced2b07</id>
<content type='text'>
For the out-of-tree build to work we need to tell switch_endian_test
to look for check-reversed.S in $(OUTPUT).

Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
</content>
</entry>
<entry>
<title>selftests/powerpc/pmu: Link ebb tests with -no-pie</title>
<updated>2018-10-31T12:56:21Z</updated>
<author>
<name>Joel Stanley</name>
</author>
<published>2018-10-29T11:23:51Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=98415da03ae6559dc62899fd31e55e194779c45b'/>
<id>urn:sha1:98415da03ae6559dc62899fd31e55e194779c45b</id>
<content type='text'>
When running the ebb tests after building on a ppc64le Ubuntu machine:

 $ pmu/ebb/reg_access_test: error while loading shared libraries:
 R_PPC64_ADDR16_HI reloc at 0x000000013a965130 for symbol `' out of
 range

This is because the Ubuntu toolchain builds has PIE enabled by default.
Change it to be always off instead.

Signed-off-by: Joel Stanley &lt;joel@jms.id.au&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
</content>
</entry>
<entry>
<title>selftests/powerpc/signal: Fix out-of-tree build</title>
<updated>2018-10-31T12:56:20Z</updated>
<author>
<name>Joel Stanley</name>
</author>
<published>2018-10-29T11:23:50Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=27825349d7b238533a47e3d98b8bb0efd886b752'/>
<id>urn:sha1:27825349d7b238533a47e3d98b8bb0efd886b752</id>
<content type='text'>
We should use TEST_GEN_PROGS, not TEST_PROGS. That tells the selftests
makefile (lib.mk) that those tests are generated (built), and so it
adds the $(OUTPUT) prefix for us, making the out-of-tree build work
correctly.

It also means we don't need our own clean rule, lib.mk does it.

We also have to update the signal_tm rule to use $(OUTPUT).

Signed-off-by: Joel Stanley &lt;joel@jms.id.au&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
</content>
</entry>
<entry>
<title>selftests/powerpc/ptrace: Fix out-of-tree build</title>
<updated>2018-10-31T12:56:19Z</updated>
<author>
<name>Joel Stanley</name>
</author>
<published>2018-10-29T11:23:49Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c39b79082a38a4f8c801790edecbbb4d62ed2992'/>
<id>urn:sha1:c39b79082a38a4f8c801790edecbbb4d62ed2992</id>
<content type='text'>
We should use TEST_GEN_PROGS, not TEST_PROGS. That tells the selftests
makefile (lib.mk) that those tests are generated (built), and so it
adds the $(OUTPUT) prefix for us, making the out-of-tree build work
correctly.

It also means we don't need our own clean rule, lib.mk does it.

We also have to update the ptrace-pkey and core-pkey rules to use
$(OUTPUT).

Signed-off-by: Joel Stanley &lt;joel@jms.id.au&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
</content>
</entry>
<entry>
<title>selftests: powerpc: Fix warning for security subdir</title>
<updated>2018-10-31T03:36:33Z</updated>
<author>
<name>Joel Stanley</name>
</author>
<published>2018-10-22T12:09:26Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a0aebae07f211c05d64be886e56d352eea86350b'/>
<id>urn:sha1:a0aebae07f211c05d64be886e56d352eea86350b</id>
<content type='text'>
typing 'make' inside tools/testing/selftests/powerpc gave a build
warning:

BUILD_TARGET=tools/testing/selftests/powerpc/security; mkdir -p $BUILD_TARGET; make OUTPUT=$BUILD_TARGET -k -C security all
make[1]: Entering directory 'tools/testing/selftests/powerpc/security'
../../lib.mk:20: ../../../../scripts/subarch.include: No such file or directory
make[1]: *** No rule to make target '../../../../scripts/subarch.include'.
make[1]: Failed to remake makefile '../../../../scripts/subarch.include'.

The build is one level deeper than lib.mk thinks it is. Set top_srcdir
to set things straight.

Note that the test program is still built.

Signed-off-by: Joel Stanley &lt;joel@jms.id.au&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
</content>
</entry>
<entry>
<title>selftests/powerpc: Relax L1d miss targets for rfi_flush test</title>
<updated>2018-10-30T12:11:04Z</updated>
<author>
<name>Naveen N. Rao</name>
</author>
<published>2018-10-23T08:04:56Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a95ecac5cb2fc8a8ee606991384d33ee121df00c'/>
<id>urn:sha1:a95ecac5cb2fc8a8ee606991384d33ee121df00c</id>
<content type='text'>
When running the rfi_flush test, if the system is loaded, we see two
issues:
1. The L1d misses when rfi_flush is disabled increase significantly due
to other workloads interfering with the cache.
2. The L1d misses when rfi_flush is enabled sometimes goes slightly
below the expected number of misses.

To address these, let's relax the expected number of L1d misses:
1. When rfi_flush is disabled, we allow upto half the expected number of
the misses for when rfi_flush is enabled.
2. When rfi_flush is enabled, we allow ~1% lower number of cache misses.

Reported-by: Joel Stanley &lt;joel@jms.id.au&gt;
Signed-off-by: Naveen N. Rao &lt;naveen.n.rao@linux.vnet.ibm.com&gt;
Tested-by: Joel Stanley &lt;joel@jms.id.au&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
</content>
</entry>
</feed>
