Re: [PATCH v5 1/2] selftests: net: Create veth pair for testing in networkless kernel

2024-08-09 Thread Jakub Kicinski
On Fri, 9 Aug 2024 16:53:26 + Abhinav Jain wrote: > On Thu, 8 Aug 2024 09:23:09 -0700, Jakub Kicinski wrote: > > A number of checks now return SKIP because veth doesn't support all > > ethtool APIs. > > > > In netdev selftests we try to make sure SKIP is only used when test > > cannot be perfo

Re: [PATCH net-next v2] selftests: net: py: support verbose printing, display executed commands

2024-08-09 Thread Jakub Kicinski
On Fri, 9 Aug 2024 14:36:17 +0200 Petr Machata wrote: > > +env_level = env.get('VERBOSE') > > +set_verbosity(env_level) > > + > > Actually, the ksft_setup() here was merged last week, and I think that > would be a better place to put this stuff. It already handles > DISRUPTIVE, it should

Re: [PATCH net-next v18 07/14] memory-provider: dmabuf devmem memory provider

2024-08-09 Thread Jakub Kicinski
On Fri, 9 Aug 2024 16:45:50 +0100 Pavel Begunkov wrote: > > I think this is good, and it doesn't seem hacky to me, because we can > > check the page_pools of the netdev while we hold rtnl, so we can be > > sure nothing is messing with the pp configuration in the meantime. > > Like you say below it

Re: [PATCH 1/2] mm: Retry migration earlier upon refcount mismatch

2024-08-09 Thread Christoph Lameter (Ampere)
On Fri, 9 Aug 2024, David Hildenbrand wrote: This really seems to be the latest point where we can "easily" back off and unlock the source folio -- in this function :) I wonder if we should be smarter in the migrate_pages_batch() loop when we start the actual migrations via migrate_folio_mo

Re: [PATCH bpf-next v2 4/4] selftests/bpf: convert test_skb_cgroup_id_user to test_progs

2024-08-09 Thread Martin KaFai Lau
On 8/6/24 12:55 AM, Alexis Lothoré (eBPF Foundation) wrote: diff --git a/tools/testing/selftests/bpf/prog_tests/cgroup_ancestor.c b/tools/testing/selftests/bpf/prog_tests/cgroup_ancestor.c new file mode 100644 index ..4e41463533c0 --- /dev/null +++ b/tools/testing/selftests/bpf/prog_

Re: [PATCH bpf-next v2 2/4] selftests/bpf: convert test_cgroup_storage to test_progs

2024-08-09 Thread Martin KaFai Lau
On 8/6/24 12:55 AM, Alexis Lothoré (eBPF Foundation) wrote: +++ b/tools/testing/selftests/bpf/prog_tests/cgroup_storage.c @@ -0,0 +1,65 @@ +// SPDX-License-Identifier: GPL-2.0 + +#include +#include "cgroup_helpers.h" +#include "cgroup_storage.skel.h" + +#define TEST_CGROUP "/test-bpf-cgroup-stor

Re: [PATCH v2 2/3] iommu/dma: Support MSIs through nested domains

2024-08-09 Thread Nicolin Chen
On Fri, Aug 09, 2024 at 07:49:10PM -0300, Jason Gunthorpe wrote: > On Fri, Aug 09, 2024 at 12:18:42PM -0700, Nicolin Chen wrote: > > > > The bigger issue is that we still have the hypervisor GIC driver > > > controlling things and it will need to know to use the guest provided > > > MSI address ca

Re: [PATCH bpf-next v2 1/4] selftests/bpf: convert get_current_cgroup_id_user to test_progs

2024-08-09 Thread Martin KaFai Lau
On 8/6/24 12:55 AM, Alexis Lothoré (eBPF Foundation) wrote: +void test_cgroup_get_current_cgroup_id(void) +{ + struct get_cgroup_id_kern *skel; + const struct timespec req = { + .tv_sec = 0, + .tv_nsec = 1, + }; + int cgroup_fd; + __u64 uc

Re: [PATCH RFT v8 4/9] fork: Add shadow stack support to clone3()

2024-08-09 Thread Mark Brown
On Fri, Aug 09, 2024 at 07:19:26PM +0100, Catalin Marinas wrote: > On Thu, Aug 08, 2024 at 09:15:25AM +0100, Mark Brown wrote: > > + /* This should really be an atomic cmpxchg. It is not. */ > > + if (access_remote_vm(mm, addr, &val, sizeof(val), > > +FOLL_FORCE) != si

Re: [PATCH 2/2] selftests/mm: Do not fail test for a single migration failure

2024-08-09 Thread Christoph Lameter (Ampere)
On Fri, 9 Aug 2024, Shuah Khan wrote: "Given that migration is a best-effort service, it is wrong to fail the test for just a single failure; hence, fail the test after 100 consecutive failures (where 100 is still a subjective choice)." You do want to mention the above here. The reason being,

Re: [PATCH v2 2/3] iommu/dma: Support MSIs through nested domains

2024-08-09 Thread Jason Gunthorpe
On Fri, Aug 09, 2024 at 08:00:34AM +, Tian, Kevin wrote: > > - IOMMUFD should provide VMM a way to tell the gPA (or directly + > > GITS_TRANSLATER?). Then kernel should do the stage-2 mapping. I > > have talked to Jason about this a while ago, and we have a few > > thoughts how to implem

Re: [PATCH v2 2/3] iommu/dma: Support MSIs through nested domains

2024-08-09 Thread Jason Gunthorpe
On Fri, Aug 09, 2024 at 12:18:42PM -0700, Nicolin Chen wrote: > > The bigger issue is that we still have the hypervisor GIC driver > > controlling things and it will need to know to use the guest provided > > MSI address captured during the MSI trap, not its own address. I don't > > have an idea h

Re: [PATCH v9 00/13] riscv: Add support for xtheadvector

2024-08-09 Thread Conor Dooley
On Tue, Aug 06, 2024 at 05:31:36PM -0700, Charlie Jenkins wrote: > xtheadvector is a custom extension that is based upon riscv vector > version 0.7.1 [1]. All of the vector routines have been modified to > support this alternative vector version based upon whether xtheadvector > was determined to b

Re: [bug report] selftests/bpf: BPF register range bounds tester

2024-08-09 Thread Dan Carpenter
On Fri, Aug 09, 2024 at 10:19:54AM -0700, Andrii Nakryiko wrote: > On Fri, Aug 9, 2024 at 4:23 AM Dan Carpenter wrote: > > > > Hello Andrii Nakryiko, > > > > This is a semi-automatic email about new static checker warnings. > > > > Commit 8863238993e2 ("selftests/bpf: BPF register range bounds > >

Re: [PATCH v2 2/3] iommu/dma: Support MSIs through nested domains

2024-08-09 Thread Nicolin Chen
On Fri, Aug 09, 2024 at 06:43:47PM +0100, Robin Murphy wrote: > On 2024-08-09 9:00 am, Tian, Kevin wrote: > > > From: Nicolin Chen > > > Sent: Friday, August 9, 2024 7:00 AM > > > > > > On Thu, Aug 08, 2024 at 01:38:44PM +0100, Robin Murphy wrote: > > > > On 06/08/2024 9:25 am, Tian, Kevin wrote:

Re: [PATCH] selftests/mm: compaction_test: Fix off by one in check_compaction()

2024-08-09 Thread Dan Carpenter
On Fri, Aug 09, 2024 at 11:20:48AM -0600, Shuah Khan wrote: > On 8/9/24 06:32, Dan Carpenter wrote: > > The "initial_nr_hugepages" variable is unsigned long so it takes up to > > 20 characters to print, plus 1 more character for the NUL terminator. > > Unfortunately, this buffer is not quite large

Re: [PATCH v2 2/3] iommu/dma: Support MSIs through nested domains

2024-08-09 Thread Nicolin Chen
On Fri, Aug 09, 2024 at 03:41:36PM -0300, Jason Gunthorpe wrote: > On Thu, Aug 08, 2024 at 01:38:44PM +0100, Robin Murphy wrote: > > On 06/08/2024 9:25 am, Tian, Kevin wrote: > > > > From: Nicolin Chen > > > > Sent: Saturday, August 3, 2024 8:32 AM > > > > > > > > From: Robin Murphy > > > > > >

Re: [PATCH] selftests/alsa/Makefile: fix relative rpath usage

2024-08-09 Thread Eugene Syromiatnikov
On Fri, 9 Aug 2024 at 19:01, Shuah Khan wrote: > > On 8/8/24 19:00, Eugene Syromiatnikov wrote: > > On Thu, Aug 08, 2024 at 02:20:21PM -0600, Shuah Khan wrote: > >> Wouldn't make sense to fix fix this in selftests main Makefile > >> instead of changing the all the test makefiles > > > > As of now,

Re: [PATCH v2 2/3] iommu/dma: Support MSIs through nested domains

2024-08-09 Thread Jason Gunthorpe
On Thu, Aug 08, 2024 at 01:38:44PM +0100, Robin Murphy wrote: > On 06/08/2024 9:25 am, Tian, Kevin wrote: > > > From: Nicolin Chen > > > Sent: Saturday, August 3, 2024 8:32 AM > > > > > > From: Robin Murphy > > > > > > Currently, iommu-dma is the only place outside of IOMMUFD and drivers > > >

Re: [PATCH RFT v8 4/9] fork: Add shadow stack support to clone3()

2024-08-09 Thread Catalin Marinas
On Thu, Aug 08, 2024 at 09:15:25AM +0100, Mark Brown wrote: > diff --git a/arch/x86/kernel/shstk.c b/arch/x86/kernel/shstk.c > index 059685612362..d7005974aff5 100644 > --- a/arch/x86/kernel/shstk.c > +++ b/arch/x86/kernel/shstk.c > @@ -191,44 +191,105 @@ void reset_thread_features(void) > cu

Re: [PATCH v2 2/3] iommu/dma: Support MSIs through nested domains

2024-08-09 Thread Robin Murphy
On 2024-08-09 9:00 am, Tian, Kevin wrote: From: Nicolin Chen Sent: Friday, August 9, 2024 7:00 AM On Thu, Aug 08, 2024 at 01:38:44PM +0100, Robin Murphy wrote: On 06/08/2024 9:25 am, Tian, Kevin wrote: From: Nicolin Chen Sent: Saturday, August 3, 2024 8:32 AM From: Robin Murphy Currently,

Re: [PATCH] selftests/mm: compaction_test: Fix off by one in check_compaction()

2024-08-09 Thread Shuah Khan
On 8/9/24 06:32, Dan Carpenter wrote: The "initial_nr_hugepages" variable is unsigned long so it takes up to 20 characters to print, plus 1 more character for the NUL terminator. Unfortunately, this buffer is not quite large enough for the terminator to fit. Also use snprintf() for a belt and su

Re: [bug report] selftests/bpf: BPF register range bounds tester

2024-08-09 Thread Andrii Nakryiko
On Fri, Aug 9, 2024 at 4:23 AM Dan Carpenter wrote: > > Hello Andrii Nakryiko, > > This is a semi-automatic email about new static checker warnings. > > Commit 8863238993e2 ("selftests/bpf: BPF register range bounds > tester") from Nov 11, 2023, leads to the following Smatch complaint: > > ./t

Re: [bug report] selftests/bpf: add trusted global subprog arg tests

2024-08-09 Thread Andrii Nakryiko
On Fri, Aug 9, 2024 at 4:32 AM Dan Carpenter wrote: > > Hello Andrii Nakryiko, > > This is a semi-automatic email about new static checker warnings. > > Commit c381203eadb7 ("selftests/bpf: add trusted global subprog arg > tests") from Jan 29, 2024, leads to the following Smatch complaint: > >

Re: [PATCH 2/2] selftests/mm: Do not fail test for a single migration failure

2024-08-09 Thread Shuah Khan
On 8/9/24 04:31, Dev Jain wrote: Do not fail the test for just a single instance of migration failure, since migration is a best-effort service. The cover letter says: "Given that migration is a best-effort service, it is wrong to fail the test for just a single failure; hence, fail the test a

Re: [PATCH] selftests/alsa/Makefile: fix relative rpath usage

2024-08-09 Thread Shuah Khan
On 8/8/24 19:00, Eugene Syromiatnikov wrote: On Thu, Aug 08, 2024 at 02:20:21PM -0600, Shuah Khan wrote: Wouldn't make sense to fix fix this in selftests main Makefile instead of changing the all the test makefiles As of now, the usage of rpath is localised, so it is relatively easy to evaluat

Re: [PATCH v5 1/2] selftests: net: Create veth pair for testing in networkless kernel

2024-08-09 Thread Abhinav Jain
On Thu, 8 Aug 2024 09:23:09 -0700, Jakub Kicinski wrote: > A number of checks now return SKIP because veth doesn't support all > ethtool APIs. > > In netdev selftests we try to make sure SKIP is only used when test > cannot be performed because of limitations of the environment. > For example some

Re: [PATCH] selftests: memfd_secret: don't build memfd_secret test on unsupported arches

2024-08-09 Thread Shuah Khan
On 8/9/24 01:56, Muhammad Usama Anjum wrote: [1] mentions that memfd_secret is only supported on arm64, riscv, x86 and x86_64 for now. It doesn't support other architectures. I found the build error on arm and decided to send the fix as it was creating noise on KernelCI. Hence I'm adding conditio

Testing Quality Call notes - 2024-08-08

2024-08-09 Thread Laura Nao
Hello, KernelCI is hosting a bi-weekly call on Thursday to discuss improvements to existing upstream tests, the development of new tests to increase kernel testing coverage, and the enablement of these tests in KernelCI. Below is a list of the tests the community has been working on and their

Re: [PATCH v2 3/3] iommufd/selftest: Add coverage for reserved IOVAs

2024-08-09 Thread kernel test robot
Hi Nicolin, kernel test robot noticed the following build errors: [auto build test ERROR on shuah-kselftest/next] [also build test ERROR on shuah-kselftest/fixes linus/master v6.11-rc2 next-20240809] [cannot apply to joro-iommu/next] [If your patch is applied to the wrong git tree, kindly drop

Re: [RFC 4/5] selftests: KVM: SNP IOCTL test

2024-08-09 Thread Sean Christopherson
On Wed, Jul 10, 2024, Pratik R. Sampat wrote: > Introduce testing of SNP ioctl calls. This patch includes both positive > and negative tests of various parameters such as flags, page types and > policies. > > Signed-off-by: Pratik R. Sampat > --- > .../selftests/kvm/x86_64/sev_smoke_test.c |

Re: [PATCH net-next v18 07/14] memory-provider: dmabuf devmem memory provider

2024-08-09 Thread Pavel Begunkov
On 8/9/24 15:10, Mina Almasry wrote: On Thu, Aug 8, 2024 at 10:24 PM Jakub Kicinski wrote: On Thu, 8 Aug 2024 16:36:24 -0400 Mina Almasry wrote: How do you know that the driver: - supports net_iov at all (let's not make implicit assumptions based on presence of queue API); - supports

Re: [RFC 3/5] selftests: KVM: SEV IOCTL test

2024-08-09 Thread Sean Christopherson
On Thu, Jul 11, 2024, Pratik Rajesh Sampat wrote: > >> +static void sev_guest_status_assert(struct kvm_vm *vm, uint32_t type) > >> +{ > >> + struct kvm_sev_guest_status status; > >> + bool cond; > >> + int ret; > >> + > >> + ret = __vm_sev_ioctl(vm, KVM_SEV_GUEST_STATUS, &status); > >> + cond

Re: [RFC 2/5] selftests: KVM: Decouple SEV ioctls from asserts

2024-08-09 Thread Sean Christopherson
On Wed, Jul 10, 2024, Pratik R. Sampat wrote: > This commit separates the SEV, SEV-ES, SEV-SNP ioctl calls from its Don't start with "This commit". Please read Documentation/process/maintainer-kvm-x86.rst, and by extension, Documentation/process/maintainer-tip.rst. > positive test asserts. This

Re: [PATCH net-next v18 07/14] memory-provider: dmabuf devmem memory provider

2024-08-09 Thread Mina Almasry
On Thu, Aug 8, 2024 at 10:24 PM Jakub Kicinski wrote: > > On Thu, 8 Aug 2024 16:36:24 -0400 Mina Almasry wrote: > > > How do you know that the driver: > > > - supports net_iov at all (let's not make implicit assumptions based > > >on presence of queue API); > > > - supports net_iov in curren

Re: [PATCH 1/2] mm: Retry migration earlier upon refcount mismatch

2024-08-09 Thread David Hildenbrand
On 09.08.24 12:31, Dev Jain wrote: As already being done in __migrate_folio(), wherein we backoff if the folio refcount is wrong, make this check during the unmapping phase, upon the failure of which, the original state of the PTEs will be restored and the folio lock will be dropped via migrate_f

Re: [PATCH net-next v2] selftests: net: py: support verbose printing, display executed commands

2024-08-09 Thread Petr Machata
Mohsin Bashir writes: > Add verbosity support to show the commands executed while > running tests. Enable verbosity if either an environment > variable 'VERBOSE' is set to a non-zero number or it is defined > in a config file under driver tests as discussed here: > https://github.com/linux-netd

[PATCH] selftests/mm: compaction_test: Fix off by one in check_compaction()

2024-08-09 Thread Dan Carpenter
The "initial_nr_hugepages" variable is unsigned long so it takes up to 20 characters to print, plus 1 more character for the NUL terminator. Unfortunately, this buffer is not quite large enough for the terminator to fit. Also use snprintf() for a belt and suspenders approach. Fixes: fb9293b6b015

Re: [PATCH net-next v13 01/14] mm: page_frag: add a test module for page_frag

2024-08-09 Thread Yunsheng Lin
On 2024/8/9 19:08, Muhammad Usama Anjum wrote: > On 8/8/24 5:37 PM, Yunsheng Lin wrote: >> The testing is done by ensuring that the fragment allocated >> from a frag_frag_cache instance is pushed into a ptr_ring >> instance in a kthread binded to a specified cpu, and a kthread >> binded to a specif

Re: [PATCH net-next v2 0/3] selftests: rds selftest

2024-08-09 Thread patchwork-bot+netdevbpf
Hello: This series was applied to netdev/net-next.git (main) by David S. Miller : On Tue, 6 Aug 2024 08:38:06 -0700 you wrote: > From: Allison Henderson > > Hi All, > > This series is a new selftest that Vegard, Chuck and myself have been > working on to provide some test coverage for rds. I

[bug report] selftests/bpf: add trusted global subprog arg tests

2024-08-09 Thread Dan Carpenter
Hello Andrii Nakryiko, This is a semi-automatic email about new static checker warnings. Commit c381203eadb7 ("selftests/bpf: add trusted global subprog arg tests") from Jan 29, 2024, leads to the following Smatch complaint: ./tools/testing/selftests/bpf/progs/verifier_global_ptr_args.c:88

[bug report] selftests/bpf: BPF register range bounds tester

2024-08-09 Thread Dan Carpenter
Hello Andrii Nakryiko, This is a semi-automatic email about new static checker warnings. Commit 8863238993e2 ("selftests/bpf: BPF register range bounds tester") from Nov 11, 2023, leads to the following Smatch complaint: ./tools/testing/selftests/bpf/prog_tests/reg_bounds.c:1121 parse_reg_st

Re: [PATCH net-next v13 01/14] mm: page_frag: add a test module for page_frag

2024-08-09 Thread Muhammad Usama Anjum
On 8/8/24 5:37 PM, Yunsheng Lin wrote: > The testing is done by ensuring that the fragment allocated > from a frag_frag_cache instance is pushed into a ptr_ring > instance in a kthread binded to a specified cpu, and a kthread > binded to a specified cpu will pop the fragment from the > ptr_ring and

[PATCH 2/2] selftests/mm: Do not fail test for a single migration failure

2024-08-09 Thread Dev Jain
Do not fail the test for just a single instance of migration failure, since migration is a best-effort service. Signed-off-by: Dev Jain Suggested-by: David Hildenbrand Reviewed-by: Ryan Roberts Tested-by: Ryan Roberts --- tools/testing/selftests/mm/migration.c | 17 +++-- 1 file c

[PATCH 1/2] mm: Retry migration earlier upon refcount mismatch

2024-08-09 Thread Dev Jain
As already being done in __migrate_folio(), wherein we backoff if the folio refcount is wrong, make this check during the unmapping phase, upon the failure of which, the original state of the PTEs will be restored and the folio lock will be dropped via migrate_folio_undo_src(), any racing thread wi

[PATCH 0/2] Improve migration by backing off earlier

2024-08-09 Thread Dev Jain
It was recently observed at [1] that during the folio unmapping stage of migration, when the PTEs are cleared, a racing thread faulting on that folio may increase the refcount of the folio, sleep on the folio lock (the migration path has the lock), and migration ultimately fails when asserting the

Re: [PATCH] selftests: resctrl: ignore builds for unsupported architectures

2024-08-09 Thread Ilpo Järvinen
Adding Maciej. On Fri, 9 Aug 2024, Muhammad Usama Anjum wrote: > On 8/9/24 12:23 PM, Ilpo Järvinen wrote: > > On Fri, 9 Aug 2024, Muhammad Usama Anjum wrote: > > > >> This test doesn't have support for other architectures. Altough resctrl > >> is supported on x86 and ARM, but arch_supports_noncon

[PATCH] selftests: mm: Fix build errors on armhf

2024-08-09 Thread Muhammad Usama Anjum
The __NR_mmap isn't found on armhf. The mmap() is commonly available system call and its wrapper is presnet on all architectures. So it should be used directly. It solves problem for armhf and doesn't create problem for architectures as well. Remove sys_mmap() functions as they aren't doing anythin

Re: [PATCH] selftests: resctrl: ignore builds for unsupported architectures

2024-08-09 Thread Muhammad Usama Anjum
On 8/9/24 12:23 PM, Ilpo Järvinen wrote: > On Fri, 9 Aug 2024, Muhammad Usama Anjum wrote: > >> This test doesn't have support for other architectures. Altough resctrl >> is supported on x86 and ARM, but arch_supports_noncont_cat() shows that >> only x86 for AMD and Intel are supported by the test

RE: [PATCH v2 2/3] iommu/dma: Support MSIs through nested domains

2024-08-09 Thread Tian, Kevin
> From: Nicolin Chen > Sent: Friday, August 9, 2024 7:00 AM > > On Thu, Aug 08, 2024 at 01:38:44PM +0100, Robin Murphy wrote: > > On 06/08/2024 9:25 am, Tian, Kevin wrote: > > > > From: Nicolin Chen > > > > Sent: Saturday, August 3, 2024 8:32 AM > > > > > > > > From: Robin Murphy > > > > > > >

[PATCH] selftests: memfd_secret: don't build memfd_secret test on unsupported arches

2024-08-09 Thread Muhammad Usama Anjum
[1] mentions that memfd_secret is only supported on arm64, riscv, x86 and x86_64 for now. It doesn't support other architectures. I found the build error on arm and decided to send the fix as it was creating noise on KernelCI. Hence I'm adding condition that memfd_secret should only be compiled on

Re: [PATCH net-next v17 03/14] netdev: support binding dma-buf to netdevice

2024-08-09 Thread Simon Horman
On Tue, Aug 06, 2024 at 08:39:34AM -0400, Willem de Bruijn wrote: > Markus Elfring wrote: > > >> … > > >>> +++ b/include/net/devmem.h > > >>> @@ -0,0 +1,115 @@ > > >> … > > >>> +#ifndef _NET_DEVMEM_H > > >>> +#define _NET_DEVMEM_H > > >> … > > >> > > >> I suggest to omit leading underscores from su

RE: [PATCH v2 2/3] iommu/dma: Support MSIs through nested domains

2024-08-09 Thread Tian, Kevin
> From: Robin Murphy > Sent: Thursday, August 8, 2024 8:39 PM > > On 06/08/2024 9:25 am, Tian, Kevin wrote: > >> From: Nicolin Chen > >> Sent: Saturday, August 3, 2024 8:32 AM > >> > >> From: Robin Murphy > >> > >> Currently, iommu-dma is the only place outside of IOMMUFD and drivers > >> which

Re: [PATCH] selftests: resctrl: ignore builds for unsupported architectures

2024-08-09 Thread Ilpo Järvinen
On Fri, 9 Aug 2024, Muhammad Usama Anjum wrote: > This test doesn't have support for other architectures. Altough resctrl > is supported on x86 and ARM, but arch_supports_noncont_cat() shows that > only x86 for AMD and Intel are supported by the test. One does not follow from the other. arch_supp

[PATCH] selftests: resctrl: ignore builds for unsupported architectures

2024-08-09 Thread Muhammad Usama Anjum
This test doesn't have support for other architectures. Altough resctrl is supported on x86 and ARM, but arch_supports_noncont_cat() shows that only x86 for AMD and Intel are supported by the test. We get build errors when built for ARM and ARM64. Hence add support in the Makefile to build this su