<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/tools, branch v6.8.9</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v6.8.9</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v6.8.9'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2024-05-02T14:35:34Z</updated>
<entry>
<title>RISC-V: selftests: cbo: Ensure asm operands match constraints, take 2</title>
<updated>2024-05-02T14:35:34Z</updated>
<author>
<name>Andrew Jones</name>
<email>ajones@ventanamicro.com</email>
</author>
<published>2024-03-22T13:47:28Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=bfd2fdbd1e6610a1ab39452b30217d4fb4de3529'/>
<id>urn:sha1:bfd2fdbd1e6610a1ab39452b30217d4fb4de3529</id>
<content type='text'>
[ Upstream commit 49408400d683ae4f41e414dfcb615166cc93be5c ]

Commit 0de65288d75f ("RISC-V: selftests: cbo: Ensure asm operands
match constraints") attempted to ensure MK_CBO() would always
provide to a compile-time constant when given a constant, but
cpu_to_le32() isn't necessarily going to do that. Switch to manually
shifting the bytes, when needed, to finally get this right.

Reported-by: Woodrow Shen &lt;woodrow.shen@sifive.com&gt;
Closes: https://lore.kernel.org/all/CABquHATcBTUwfLpd9sPObBgNobqQKEAZ2yxk+TWSpyO5xvpXpg@mail.gmail.com/
Fixes: a29e2a48afe3 ("RISC-V: selftests: Add CBO tests")
Fixes: 0de65288d75f ("RISC-V: selftests: cbo: Ensure asm operands match constraints")
Signed-off-by: Andrew Jones &lt;ajones@ventanamicro.com&gt;
Link: https://lore.kernel.org/r/20240322134728.151255-2-ajones@ventanamicro.com
Signed-off-by: Palmer Dabbelt &lt;palmer@rivosinc.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>selftests/seccomp: Handle EINVAL on unshare(CLONE_NEWPID)</title>
<updated>2024-05-02T14:35:24Z</updated>
<author>
<name>Terry Tritton</name>
<email>terry.tritton@linaro.org</email>
</author>
<published>2024-01-24T14:13:55Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=17f0ac34151403081cc3f6ad63e16f609106f497'/>
<id>urn:sha1:17f0ac34151403081cc3f6ad63e16f609106f497</id>
<content type='text'>
commit ecaaa55c9fa5e8058445a8b891070b12208cdb6d upstream.

unshare(CLONE_NEWPID) can return EINVAL if the kernel does not have the
CONFIG_PID_NS option enabled.

Add a check on these calls to skip the test if we receive EINVAL.

Signed-off-by: Terry Tritton &lt;terry.tritton@linaro.org&gt;
Link: https://lore.kernel.org/r/20240124141357.1243457-2-terry.tritton@linaro.org
Signed-off-by: Kees Cook &lt;keescook@chromium.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>selftests/seccomp: Change the syscall used in KILL_THREAD test</title>
<updated>2024-05-02T14:35:24Z</updated>
<author>
<name>Terry Tritton</name>
<email>terry.tritton@linaro.org</email>
</author>
<published>2024-01-24T14:13:56Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=63d90bfb8b514957e76766c3dca6dfdc3cf51f03'/>
<id>urn:sha1:63d90bfb8b514957e76766c3dca6dfdc3cf51f03</id>
<content type='text'>
commit 471dbc547612adeaa769e48498ef591c6c95a57a upstream.

The Bionic version of pthread_create used on Android calls the prctl
function to give the stack and thread local storage a useful name. This
will cause the KILL_THREAD test to fail as it will kill the thread as
soon as it is created.

change the test to use getpid instead of prctl.

Signed-off-by: Terry Tritton &lt;terry.tritton@linaro.org&gt;
Link: https://lore.kernel.org/r/20240124141357.1243457-3-terry.tritton@linaro.org
Signed-off-by: Kees Cook &lt;keescook@chromium.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>selftests/seccomp: user_notification_addfd check nextfd is available</title>
<updated>2024-05-02T14:35:24Z</updated>
<author>
<name>Terry Tritton</name>
<email>terry.tritton@linaro.org</email>
</author>
<published>2024-01-24T14:13:57Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=3552b6bb90dcfbde2f500dacd7d37e1f0ad51cc8'/>
<id>urn:sha1:3552b6bb90dcfbde2f500dacd7d37e1f0ad51cc8</id>
<content type='text'>
commit 8e3c9f9f3a0742cd12b682a1766674253b33fcf0 upstream.

Currently the user_notification_addfd test checks what the next expected
file descriptor will be by incrementing a variable nextfd. This does not
account for file descriptors that may already be open before the test is
started and will cause the test to fail if any exist.

Replace nextfd++ with a function get_next_fd which will check and return
the next available file descriptor.

Signed-off-by: Terry Tritton &lt;terry.tritton@linaro.org&gt;
Link: https://lore.kernel.org/r/20240124141357.1243457-4-terry.tritton@linaro.org
Signed-off-by: Kees Cook &lt;keescook@chromium.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>tools: ynl: don't ignore errors in NLMSG_DONE messages</title>
<updated>2024-05-02T14:35:17Z</updated>
<author>
<name>Jakub Kicinski</name>
<email>kuba@kernel.org</email>
</author>
<published>2024-04-20T02:08:26Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=997c7abd551007b25607d28c242be05923c640ad'/>
<id>urn:sha1:997c7abd551007b25607d28c242be05923c640ad</id>
<content type='text'>
[ Upstream commit a44f2eb106a46f2275a79de54ce0ea63e4f3d8c8 ]

NLMSG_DONE contains an error code, it has to be extracted.
Prior to this change all dumps will end in success,
and in case of failure the result is silently truncated.

Fixes: e4b48ed460d3 ("tools: ynl: add a completely generic client")
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
Reviewed-by: Donald Hunter &lt;donald.hunter@gmail.com&gt;
Link: https://lore.kernel.org/r/20240420020827.3288615-1-kuba@kernel.org
Signed-off-by: Paolo Abeni &lt;pabeni@redhat.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>selftests/powerpc/papr-vpd: Fix missing variable initialization</title>
<updated>2024-04-27T15:12:56Z</updated>
<author>
<name>Nathan Lynch</name>
<email>nathanl@linux.ibm.com</email>
</author>
<published>2024-04-04T22:02:09Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=c8dbaa9ea2a1c4db5c8b5f27c2babe28b78b5e93'/>
<id>urn:sha1:c8dbaa9ea2a1c4db5c8b5f27c2babe28b78b5e93</id>
<content type='text'>
[ Upstream commit 210cfef579260ed6c3b700e7baeae51a5e183f43 ]

The "close handle without consuming VPD" testcase has inconsistent
results because it fails to initialize the location code object it
passes to ioctl() to create a VPD handle. Initialize the location code
to the empty string as intended.

Signed-off-by: Nathan Lynch &lt;nathanl@linux.ibm.com&gt;
Fixes: 9118c5d32bdd ("powerpc/selftests: Add test for papr-vpd")
Reported-by: Geetika Moolchandani &lt;geetika@linux.ibm.com&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://msgid.link/20240404-papr-vpd-test-uninit-lc-v2-1-37bff46c65a5@linux.ibm.com
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>iommufd: Add config needed for iommufd_fail_nth</title>
<updated>2024-04-27T15:12:54Z</updated>
<author>
<name>Muhammad Usama Anjum</name>
<email>usama.anjum@collabora.com</email>
</author>
<published>2024-03-25T09:00:48Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=da77713592ef86e13d55edb9aad8256d0df1fab6'/>
<id>urn:sha1:da77713592ef86e13d55edb9aad8256d0df1fab6</id>
<content type='text'>
[ Upstream commit 2760c51b8040d7cffedc337939e7475a17cc4b19 ]

Add FAULT_INJECTION_DEBUG_FS and FAILSLAB configurations to the kconfig
fragment for the iommfd selftests. These kconfigs are needed by the
iommufd_fail_nth test.

Fixes: a9af47e382a4 ("iommufd/selftest: Test IOMMU_HWPT_GET_DIRTY_BITMAP")
Link: https://lore.kernel.org/r/20240325090048.1423908-1-usama.anjum@collabora.com
Signed-off-by: Muhammad Usama Anjum &lt;usama.anjum@collabora.com&gt;
Signed-off-by: Jason Gunthorpe &lt;jgg@nvidia.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>perf lock contention: Add a missing NULL check</title>
<updated>2024-04-27T15:12:54Z</updated>
<author>
<name>Namhyung Kim</name>
<email>namhyung@kernel.org</email>
</author>
<published>2024-04-09T22:55:42Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=1dbd4215c764c3af72b882d784d1c01947b1a15e'/>
<id>urn:sha1:1dbd4215c764c3af72b882d784d1c01947b1a15e</id>
<content type='text'>
[ Upstream commit f3408580bac8ce5cd76e7391e529c0a22e7c7eb2 ]

I got a report for a failure in BPF verifier on a recent kernel with
perf lock contention command.  It checks task-&gt;sighand-&gt;siglock without
checking if sighand is NULL or not.  Let's add one.

  ; if (&amp;curr-&gt;sighand-&gt;siglock == (void *)lock)
  265: (79) r1 = *(u64 *)(r0 +2624)     ; frame1: R0_w=trusted_ptr_task_struct(off=0,imm=0)
                                        ;         R1_w=rcu_ptr_or_null_sighand_struct(off=0,imm=0)
  266: (b7) r2 = 0                      ; frame1: R2_w=0
  267: (0f) r1 += r2
  R1 pointer arithmetic on rcu_ptr_or_null_ prohibited, null-check it first
  processed 164 insns (limit 1000000) max_states_per_insn 1 total_states 15 peak_states 15 mark_read 5
  -- END PROG LOAD LOG --
  libbpf: prog 'contention_end': failed to load: -13
  libbpf: failed to load object 'lock_contention_bpf'
  libbpf: failed to load BPF skeleton 'lock_contention_bpf': -13
  Failed to load lock-contention BPF skeleton
  lock contention BPF setup failed
  lock contention did not detect any lock contention

Fixes: 1811e82767dcc ("perf lock contention: Track and show siglock with address")
Reviewed-by: Ian Rogers &lt;irogers@google.com&gt;
Acked-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
Cc: Song Liu &lt;song@kernel.org&gt;
Cc: bpf@vger.kernel.org
Signed-off-by: Namhyung Kim &lt;namhyung@kernel.org&gt;
Link: https://lore.kernel.org/r/20240409225542.1870999-1-namhyung@kernel.org
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>perf annotate: Make sure to call symbol__annotate2() in TUI</title>
<updated>2024-04-27T15:12:54Z</updated>
<author>
<name>Namhyung Kim</name>
<email>namhyung@kernel.org</email>
</author>
<published>2024-04-05T21:17:57Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=6450c4f23ccdc3db241d5bb44d9d0f26b7e5faf3'/>
<id>urn:sha1:6450c4f23ccdc3db241d5bb44d9d0f26b7e5faf3</id>
<content type='text'>
[ Upstream commit 2b8dbf69ec60faf6c7db49e57d7f316409ccec92 ]

The symbol__annotate2() initializes some data structures needed by TUI.
It has a logic to prevent calling it multiple times by checking if it
has the annotated source.  But data type profiling uses a different
code (symbol__annotate) to allocate the annotated lines in advance.
So TUI missed to call symbol__annotate2() when it shows the annotation
browser.

Make symbol__annotate() reentrant and handle that situation properly.
This fixes a crash in the annotation browser started by perf report in
TUI like below.

  $ perf report -s type,sym --tui
  # and press 'a' key and then move down

Fixes: 81e57deec325 ("perf report: Support data type profiling")
Reviewed-by: Ian Rogers &lt;irogers@google.com&gt;
Signed-off-by: Namhyung Kim &lt;namhyung@kernel.org&gt;
Link: https://lore.kernel.org/r/20240405211800.1412920-2-namhyung@kernel.org
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>selftests/tcp_ao: Printing fixes to confirm with format-security</title>
<updated>2024-04-27T15:12:51Z</updated>
<author>
<name>Dmitry Safonov</name>
<email>0x7f454c46@gmail.com</email>
</author>
<published>2024-04-13T01:42:55Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=1763b3c51e276d602a28da2b0c045fdf9bf4c72f'/>
<id>urn:sha1:1763b3c51e276d602a28da2b0c045fdf9bf4c72f</id>
<content type='text'>
[ Upstream commit b476c93654d748c13624f7c7d0ba191c56a8092e ]

On my new laptop with packages from nixos-unstable, gcc 12.3.0 produces
&gt; lib/setup.c: In function ‘__test_msg’:
&gt; lib/setup.c:20:9: error: format not a string literal and no format arguments [-Werror=format-security]
&gt;    20 |         ksft_print_msg(buf);
&gt;       |         ^~~~~~~~~~~~~~
&gt; lib/setup.c: In function ‘__test_ok’:
&gt; lib/setup.c:26:9: error: format not a string literal and no format arguments [-Werror=format-security]
&gt;    26 |         ksft_test_result_pass(buf);
&gt;       |         ^~~~~~~~~~~~~~~~~~~~~
&gt; lib/setup.c: In function ‘__test_fail’:
&gt; lib/setup.c:32:9: error: format not a string literal and no format arguments [-Werror=format-security]
&gt;    32 |         ksft_test_result_fail(buf);
&gt;       |         ^~~~~~~~~~~~~~~~~~~~~
&gt; lib/setup.c: In function ‘__test_xfail’:
&gt; lib/setup.c:38:9: error: format not a string literal and no format arguments [-Werror=format-security]
&gt;    38 |         ksft_test_result_xfail(buf);
&gt;       |         ^~~~~~~~~~~~~~~~~~~~~~
&gt; lib/setup.c: In function ‘__test_error’:
&gt; lib/setup.c:44:9: error: format not a string literal and no format arguments [-Werror=format-security]
&gt;    44 |         ksft_test_result_error(buf);
&gt;       |         ^~~~~~~~~~~~~~~~~~~~~~
&gt; lib/setup.c: In function ‘__test_skip’:
&gt; lib/setup.c:50:9: error: format not a string literal and no format arguments [-Werror=format-security]
&gt;    50 |         ksft_test_result_skip(buf);
&gt;       |         ^~~~~~~~~~~~~~~~~~~~~
&gt; cc1: some warnings being treated as errors

As the buffer was already pre-printed into, print it as a string
rather than a format-string.

Fixes: cfbab37b3da0 ("selftests/net: Add TCP-AO library")
Signed-off-by: Dmitry Safonov &lt;0x7f454c46@gmail.com&gt;
Reported-by: Muhammad Usama Anjum &lt;usama.anjum@collabora.com&gt;
Signed-off-by: Paolo Abeni &lt;pabeni@redhat.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
</feed>
