Re: [PATCH] kunit: Fix NULL-dereference in kunit_init_suite() if suite->log is NULL

2023-12-29 Thread Muhammad Usama Anjum
On 12/18/23 8:17 PM, Richard Fitzgerald wrote: > suite->log must be checked for NULL before passing it to > string_stream_clear(). This was done in kunit_init_test() but was missing > from kunit_init_suite(). > > Signed-off-by: Richard Fitzgerald > Fixes: 6d696c4695c5 ("kunit: add ability to run

Re: [PATCH] kunit: Protect string comparisons against NULL

2023-12-29 Thread Muhammad Usama Anjum
On 12/20/23 8:52 PM, Richard Fitzgerald wrote: > Add NULL checks to KUNIT_BINARY_STR_ASSERTION() so that it will fail > cleanly if either pointer is NULL, instead of causing a NULL pointer > dereference in the strcmp(). > > A test failure could be that a string is unexpectedly NULL. This could > b

Re: [PATCH v2] selftests: uevent: use shared makefile library

2023-12-29 Thread Muhammad Usama Anjum
On 12/22/23 1:49 AM, Antonio Terceiro wrote: > This makes the uevent selftests build not write to the source tree > unconditionally, as that breaks out of tree builds when the source tree > is read-only. It also avoids leaving a git repository in a dirty state > after a build. I can see what you ar

Re: [PATCH v3 0/2] selftests/vDSO: Fix errors on LoongArch

2023-12-29 Thread Muhammad Usama Anjum
On 12/27/23 12:55 PM, Tiezhu Yang wrote: > + Andrew Morton > + Mark Brown > > On 12/13/2023 09:22 AM, Tiezhu Yang wrote: >> v3: Rebase on the next branch of linux-kselftest.git, >>     modify the patch title and update the commit message >> >> v2: Rebase on 6.5-rc1 and update the commit message

Re: [PATCH v3 2/2] selftests/vDSO: Fix runtime errors on LoongArch

2023-12-29 Thread Muhammad Usama Anjum
On 12/13/23 6:23 AM, Tiezhu Yang wrote: > It could not find __vdso_getcpu and __vdso_gettimeofday when test > getcpu and gettimeofday on LoongArch. > > # make headers && cd tools/testing/selftests/vDSO && make > # ./vdso_test_getcpu > Could not find __vdso_getcpu > # ./vdso_test_gettimeofd

Re: [PATCH v3 1/2] selftests/vDSO: Fix building errors on LoongArch

2023-12-29 Thread Muhammad Usama Anjum
On 12/13/23 6:22 AM, Tiezhu Yang wrote: > There exist the following errors when build vDSO selftests on LoongArch: > > # make headers && cd tools/testing/selftests/vDSO && make > ... > error: 'VDSO_VERSION' undeclared (first use in this function) > ... > error: 'VDSO_NAMES' undeclared (f

Re: [PATCH v2 net-next] selftests/net: change shebang to bash to support "source"

2023-12-29 Thread Muhammad Usama Anjum
On 12/29/23 6:19 PM, Yujie Liu wrote: > The patch set [1] added a general lib.sh in net selftests, and converted > several test scripts to source the lib.sh. > > unicast_extensions.sh (converted in [1]) and pmtu.sh (converted in [2]) > have a /bin/sh shebang which may point to various shells in di

Re: [PATCH v2 net-next] selftests/net: change shebang to bash to support "source"

2023-12-29 Thread Hangbin Liu
On Fri, Dec 29, 2023 at 09:19:31PM +0800, Yujie Liu wrote: > The patch set [1] added a general lib.sh in net selftests, and converted > several test scripts to source the lib.sh. > > unicast_extensions.sh (converted in [1]) and pmtu.sh (converted in [2]) > have a /bin/sh shebang which may point to

Re: [PATCH 1/2] selftests/mm: add separate UFFDIO_MOVE test for PMD splitting

2023-12-29 Thread Suren Baghdasaryan
Sorry, I screwed up when sending it out. It's not [1/2], it's supposed to be a stand-alone patch. IOW, don't expect a [2/2] followup :) On Fri, Dec 29, 2023 at 6:56 PM Suren Baghdasaryan wrote: > > Add a test for UFFDIO_MOVE ioctl operating on a hugepage which has to > be split because destinatio

[PATCH 1/2] selftests/mm: add separate UFFDIO_MOVE test for PMD splitting

2023-12-29 Thread Suren Baghdasaryan
Add a test for UFFDIO_MOVE ioctl operating on a hugepage which has to be split because destination is marked with MADV_NOHUGEPAGE. With this we cover all 3 cases: normal page move, hugepage move, hugepage splitting before move. Signed-off-by: Suren Baghdasaryan --- Patch applies over mm-unstable.

[PATCH 1/1] userfaultfd: fix move_pages_pte() splitting folio under RCU read lock

2023-12-29 Thread Suren Baghdasaryan
While testing the split PMD path with lockdep enabled I've got an "Invalid wait context" error caused by split_huge_page_to_list() trying to lock anon_vma->rwsem while inside RCU read section. The issues is due to move_pages_pte() calling split_folio() under RCU read lock. Fix this by unmapping the

Re: [PATCH v2 net-next] selftests/net: change shebang to bash to support "source"

2023-12-29 Thread Przemek Kitszel
On 12/29/23 14:19, Yujie Liu wrote: The patch set [1] added a general lib.sh in net selftests, and converted several test scripts to source the lib.sh. unicast_extensions.sh (converted in [1]) and pmtu.sh (converted in [2]) have a /bin/sh shebang which may point to various shells in different di

Re: [PATCH v9 00/10] Add iommufd nesting (part 2/2)

2023-12-29 Thread Yi Liu
On 2023/12/29 11:00, Tian, Kevin wrote: From: Liu, Yi L Sent: Thursday, December 28, 2023 11:06 PM This series is based on the first part which was merged [1], this series is to add the cache invalidation interface or the userspace to invalidate cache after modifying the stage-1 page table. Thi

Re: [PATCH net-next] selftests/net: change the shebang of unicast_extensions.sh to bash

2023-12-29 Thread Yujie Liu
On Tue, Dec 26, 2023 at 08:51:43PM +0800, Hangbin Liu wrote: > On Tue, Dec 26, 2023 at 04:43:18PM +0800, Yujie Liu wrote: > > Hi Hangbin, > > > > On Mon, Dec 25, 2023 at 08:39:09PM +0800, Hangbin Liu wrote: > > > On Mon, Dec 25, 2023 at 03:21:09PM +0800, Yujie Liu wrote: > > > > The patch set [1]

[PATCH v2 net-next] selftests/net: change shebang to bash to support "source"

2023-12-29 Thread Yujie Liu
The patch set [1] added a general lib.sh in net selftests, and converted several test scripts to source the lib.sh. unicast_extensions.sh (converted in [1]) and pmtu.sh (converted in [2]) have a /bin/sh shebang which may point to various shells in different distributions, but "source" is only avai

Re: [RFC PATCH v3 0/3] Add test to verify probe of devices from discoverable busses

2023-12-29 Thread Nícolas F . R . A . Prado
On Thu, Dec 28, 2023 at 05:53:48PM -0600, Bjorn Helgaas wrote: > I have no opinion about the patches themselves, but just a heads-up > that "busses" may be regarded as a misspelling of "buses", e.g., > https://lore.kernel.org/r/20231223184720.25645-1-tintinm2...@gmail.com, > I'm guessing because co

[PATCH bpf-next 2/2] testcases/bpf: add testcases for skb->csum to ctx_skb.c

2023-12-29 Thread Menglong Dong
The testcases for read/write access of skb->csum is added to ctx_skb.c. And the read access testing for skb->ip_summed is also added. Signed-off-by: Menglong Dong --- .../testing/selftests/bpf/verifier/ctx_skb.c | 43 +++ 1 file changed, 43 insertions(+) diff --git a/tools/test

[PATCH bpf-next 1/2] bpf: add csum/ip_summed fields to __sk_buff

2023-12-29 Thread Menglong Dong
For now, we have to call some helpers when we need to update the csum, such as bpf_l4_csum_replace, bpf_l3_csum_replace, etc. These helpers are not inlined, which causes poor performance. In fact, we can define our own csum update functions in BPF program instead of bpf_l3_csum_replace, which is t

[PATCH bpf-next 0/2] bpf: add csum/ip_summed fields to __sk_buff

2023-12-29 Thread Menglong Dong
For now, we have to call some helpers when we need to update the csum, such as bpf_l4_csum_replace, bpf_l3_csum_replace, etc. These helpers are not inlined, which causes poor performance. In fact, we can define our own csum update functions in BPF program instead of bpf_l3_csum_replace, which is t