Re: [PATCH v1 0/7] mm: workingset reporting

2024-05-15 Thread Huang, Ying
Hi, Yuanchu, Yuanchu Xie writes: > Changes from RFC v3 -> PATCH v1: > - Updated selftest to use ksft_print_msg instead of fprintf(stderr, ...) > (Muhammad Usama Anjum) > - Included more detail in patch skipping pmd_young with force_scan > (Huang, Ying) > - Deferred reaccess histogram as a

[PATCH] selftests/mm: va_high_addr_switch: Do not skip test and give warning message post FEAT_LPA2

2024-05-15 Thread Dev Jain
Post FEAT_LPA2, Aarch64 extends the 4KB and 16KB translation granule to large virtual addresses. Currently, the test is being skipped for said granule sizes, because the page sizes have been statically defined; to work around that would mean breaking the nice array of structs used for adding

[PATCH bpf-next] selftests/bpf: Enable INET_XFRM_TUNNEL in config

2024-05-15 Thread Geliang Tang
From: Geliang Tang The kconfigs CONFIG_INET_XFRM_TUNNEL and CONFIG_INET6_XFRM_TUNNEL are needed by test_tunnel tests. This patch enables them together with the dependent kconfigs CONFIG_INET_IPCOMP and CONFIG_INET6_IPCOMP. Signed-off-by: Geliang Tang --- tools/testing/selftests/bpf/config | 4

[PATCH bpf-next v2 8/8] selftests/bpf: Use netns helpers in lwt tests

2024-05-15 Thread Geliang Tang
From: Geliang Tang This patch uses netns helpers create_netns() and cleanup_netns() in lwt_helpers.h instead of using the local function netns_create() and netns_delete(). For using these helpers. network_helpers.h needs to be included in lwt_helpers.h. Then '#include "network_helpers.h"' in

[PATCH bpf-next v2 7/8] selftests/bpf: Use cleanup_netns helper

2024-05-15 Thread Geliang Tang
From: Geliang Tang This patch uses cleanup_netns() helper in BPF tests wide to replace close_netns() and "ip netns del", included assign_reuse.c, crypto_sanity.c, decap_sanity.c, fib_lookup.c, ns_current_pid_tgid.c, sock_destroy.c, sock_iter_batch.c, xdp_dev_bound_only.c and xdp_do_redirect.c.

[PATCH bpf-next v2 6/8] selftests/bpf: Export cleanup_netns helper

2024-05-15 Thread Geliang Tang
From: Geliang Tang This patch adds a new struct member name in struct nstoken, to save the name of the given network namespace. It dups the name string in open_netns() and freed in close_netns(). Then move cleanup_netns() from mptcp.c into network_helpers.c as a public helper. In it the newly

[PATCH bpf-next v2 5/8] selftests/bpf: Use create_netns helper

2024-05-15 Thread Geliang Tang
From: Geliang Tang The newly added helper create_netns() can be used in assign_reuse.c, fib_lookup.c, ns_current_pid_tgid.c, sock_destroy.c and sock_iter_batch.c to simplify the code. It changes the behavior of test fib_lookup.c a little bit, but doesn't affect the results. Signed-off-by:

[PATCH bpf-next v2 4/8] selftests/bpf: Export create_netns helper

2024-05-15 Thread Geliang Tang
From: Geliang Tang This patch moves create_netns() from mptcp.c into network_helpers.c, and export it in network_helpers.h as a public helper. The new helper accepts a string parameter, and uses SYS_NOFAIL() instead of SYS() to execute the command, since SYS() deponds on test__fail() which is

[PATCH bpf-next v2 3/8] selftests/bpf: Drop duplicate create_netns

2024-05-15 Thread Geliang Tang
From: Geliang Tang This patch drops the duplicate local functions create_netns() in bind_perm.c, bpf_iter_setsockopt.c, setget_sockopt.c, sock_fields.c and tcp_hdr_options.c and uses unshare_netns() instead. A new helper create_netns() will be added in network_helpers.c as a public one.

[PATCH bpf-next v2 2/8] selftests/bpf: Use unshare_netns helper

2024-05-15 Thread Geliang Tang
From: Geliang Tang The newly added helper unshare_netns() can be used to replace unshare() and "ip link set dev lo up" in sk_assign.c, btf_skc_cls_ingress.c and tcp_custom_syncookie.c to simplify the code. Signed-off-by: Geliang Tang ---

[PATCH bpf-next v2 1/8] selftests/bpf: Add unshare_netns helper

2024-05-15 Thread Geliang Tang
From: Geliang Tang Many BPF selftests create new test network namespaces by using CLONE_NEWNET flag to unshare the network namespace, so that the calling process is moved into a new network namespace which is not shared with any previously existing process. So this patch adds a new helper in

[PATCH bpf-next v2 0/8] add netns helpers

2024-05-15 Thread Geliang Tang
From: Geliang Tang This patchset addresses Alexei's comment for commit "Handle SIGINT when creating netns" [1]. Export local helpers create_netns() and cleanup_netns() defined in mptcp.c into network_helpers.c as generic ones. For this another helper unshare_netns() is added to replace the

Re: [PATCH v10 0/5] Introduce mseal

2024-05-15 Thread Jeff Xu
On Wed, May 15, 2024 at 3:19 PM Liam R. Howlett wrote: > > * Jeff Xu [240515 13:18]: > ... > > > The current mseal patch does up-front checking in two different situations: > > 1 when applying mseal() > >Checking for unallocated memory in the given memory range. > > > > 2 When checking mseal

Re: [PATCH v4 00/30] NT synchronization primitive driver

2024-05-15 Thread Elizabeth Figura
On Wednesday, April 17, 2024 3:02:13 PM CDT Elizabeth Figura wrote: > > > Except for the "unowned" semantics of zero, the actual value of the > > > owner identifier is not interpreted by the ntsync driver at all. The > > > intended use is to store a thread identifier; however, the ntsync > > >

Re: [PATCH net-next] selftests: net: local_termination: annotate the expected failures

2024-05-15 Thread Jakub Kicinski
On Wed, 15 May 2024 11:02:28 +0200 Petr Machata wrote: > >> And then either replace the existing xfail_on_veth's (there are just a > >> handful) or convert xfail_on_veth to a wrapper around xfail_on_kind. > > > > I think the bridge thing we can workaround by just checking > > if ${NETIFS[p1]} is

Re: [PATCH 0/8] selftests: x86: build suite with clang

2024-05-15 Thread Fangrui Song
On Mon, May 6, 2024 at 4:26 PM Fangrui Song wrote: > > On Wed, May 1, 2024 at 5:29 AM Muhammad Usama Anjum > wrote: > > > > This series fixes build errors found by clang to allow the x86 suite to > > get built with the clang. > > > > Unfortunately, there is one bug [1] in the clang becuase of

Re: [PATCH v10 0/5] Introduce mseal

2024-05-15 Thread Liam R. Howlett
* Jeff Xu [240515 13:18]: ... > The current mseal patch does up-front checking in two different situations: > 1 when applying mseal() >Checking for unallocated memory in the given memory range. > > 2 When checking mseal flag during mprotect/unmap/remap/mmap > Checking mseal flag is placed

Re: [PATCH v4 00/10] clk: Add kunit tests for fixed rate and parent data

2024-05-15 Thread Rob Herring
On Wed, May 15, 2024 at 4:15 PM Stephen Boyd wrote: > > Quoting Rob Herring (2024-05-15 06:06:09) > > On Tue, May 14, 2024 at 4:29 PM Stephen Boyd wrote: > > > > > > powerpc doesn't mark the root node with OF_POPULATED_BUS. If I set that > > > in of_platform_default_populate_init() then the

Re: [PATCH v4 00/10] clk: Add kunit tests for fixed rate and parent data

2024-05-15 Thread Stephen Boyd
Quoting Rob Herring (2024-05-15 06:06:09) > On Tue, May 14, 2024 at 4:29 PM Stephen Boyd wrote: > > > > powerpc doesn't mark the root node with OF_POPULATED_BUS. If I set that > > in of_platform_default_populate_init() then the overlays can be applied. > > > > ---8< > > diff --git

Re: [RFC PATCH 3/4] selftests/binderfs: Macro argument 'fd' may be better as '(fd)' to avoid precedence issues

2024-05-15 Thread Bill Wendling
On Tue, May 14, 2024 at 6:08 PM Abhinav Saxena wrote: > > Change the macro argument 'fd' to '(fd)' to avoid potential precedence > issues. Without parentheses, the macro expansion could lead to > unexpected behavior when used with an expression having different > precedence levels. > > Example

Re: [PATCH v10 0/5] Introduce mseal

2024-05-15 Thread Jeff Xu
On Tue, May 14, 2024 at 2:28 PM Liam R. Howlett wrote: > > * Andrew Morton [240514 13:47]: > > On Mon, 15 Apr 2024 16:35:19 + jef...@chromium.org wrote: > > > > > This patchset proposes a new mseal() syscall for the Linux kernel. > > > > I have not moved this into mm-stable for a 6.10 merge.

RE: [PATCH v2 1/2] selftests/resctrl: Adjust effective L3 cache size with SNC enabled

2024-05-15 Thread Luck, Tony
If/when my SNC patches go upstream the SNC check could become: snc_ways=$(ls -d /sys/fs/resctrl/mon_data/mon_L3_00/mon_sub_L3_* 2>/dev/null | wc -l) assuming you have /sys/fs/resctrl mounted. -Tony

Re: [PATCH v4 02/11] riscv: add ISA extensions validation

2024-05-15 Thread Conor Dooley
On Wed, May 15, 2024 at 03:26:23PM +0200, Clément Léger wrote: > > This function is badly in need of some new variable names for the first > > two parameters. It's hard to follow what each of them is meant to be > > once you're inside this function and removed from their definitions. > > The first

[PATCH v4] kunit: Cover 'assert.c' with tests

2024-05-15 Thread Ivan Orlov
There are multiple assertion formatting functions in the `assert.c` file, which are not covered with tests yet. Implement the KUnit test for these functions. The test consists of 11 test cases for the following functions: 1) 'is_literal' 2) 'is_str_literal' 3) 'kunit_assert_prologue', test case

Re: [PATCH v4 02/11] riscv: add ISA extensions validation

2024-05-15 Thread Clément Léger
On 14/05/2024 19:39, Conor Dooley wrote: > On Mon, Apr 29, 2024 at 05:04:55PM +0200, Clément Léger wrote: >> Since a few extensions (Zicbom/Zicboz) already needs validation and >> future ones will need it as well (Zc*) add a validate() callback to >> struct riscv_isa_ext_data. This require to

Re: [PATCH v4 00/10] clk: Add kunit tests for fixed rate and parent data

2024-05-15 Thread Rob Herring
On Tue, May 14, 2024 at 4:29 PM Stephen Boyd wrote: > > Quoting Stephen Boyd (2024-05-02 18:27:42) > > Quoting David Gow (2024-05-01 01:08:11) > > > > > > The other thing I've noted so far is that the > > > of_apply_kunit_platform_device and of_overlay_apply_kunit_cleanup > > > tests fail (and

[PATCH v2 2/2] selftests/resctrl: Adjust SNC support messages

2024-05-15 Thread Maciej Wieczor-Retman
Resctrl selftest prints a message on test failure that Sub-Numa Clustering (SNC) could be enabled and points the user to check theirs BIOS settings. No actual check is performed before printing that message so it is not very accurate in pinpointing a problem. Figuring out if SNC is enabled is

[PATCH v2 1/2] selftests/resctrl: Adjust effective L3 cache size with SNC enabled

2024-05-15 Thread Maciej Wieczor-Retman
Sub-NUMA Cluster divides CPUs sharing an L3 cache into separate NUMA nodes. Systems may support splitting into either two or four nodes. When SNC mode is enabled the effective amount of L3 cache available for allocation is divided by the number of nodes per L3. Detect which SNC mode is active by

[PATCH v2 0/2] selftests/resctrl: SNC kernel support discovery

2024-05-15 Thread Maciej Wieczor-Retman
Changes v2: - Removed patches 2 and 3 since now this part will be supported by the kernel. Sub-Numa Clustering (SNC) allows splitting CPU cores, caches and memory into multiple NUMA nodes. When enabled, NUMA-aware applications can achieve better performance on bigger server platforms. SNC

Re: [PATCH net v2] selftests: net: kill smcrouted in the cleanup logic in amt.sh

2024-05-15 Thread Taehee Yoo
On Wed, May 15, 2024 at 6:48 PM Simon Horman wrote: > Hi Simon, Thanks for the review! > On Mon, May 13, 2024 at 06:08:52AM +, Taehee Yoo wrote: > > The amt.sh requires smcrouted for multicasting routing. > > So, it starts smcrouted before forwarding tests. > > It must be stopped after all

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

2024-05-15 Thread Nikolay Aleksandrov
On 15/05/2024 13:01, Nikolay Aleksandrov wrote: > On 11/05/2024 02:21, Mina Almasry wrote: >> Add a netdev_dmabuf_binding struct which represents the >> dma-buf-to-netdevice binding. The netlink API will bind the dma-buf to >> rx queues on the netdevice. On the binding, the dma_buf_attach >> &

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

2024-05-15 Thread Nikolay Aleksandrov
On 11/05/2024 02:21, Mina Almasry wrote: > Add a netdev_dmabuf_binding struct which represents the > dma-buf-to-netdevice binding. The netlink API will bind the dma-buf to > rx queues on the netdevice. On the binding, the dma_buf_attach > & dma_buf_map_attachment will occur. The entries in the

Re: [PATCH net-next v9 12/14] net: add SO_DEVMEM_DONTNEED setsockopt to release RX frags

2024-05-15 Thread Nikolay Aleksandrov
On 11/05/2024 02:21, Mina Almasry wrote: > Add an interface for the user to notify the kernel that it is done > reading the devmem dmabuf frags returned as cmsg. The kernel will > drop the reference on the frags to make them available for reuse. > > Signed-off-by: Willem de Bruijn >

Re: [PATCH net v2] selftests: net: kill smcrouted in the cleanup logic in amt.sh

2024-05-15 Thread Simon Horman
On Mon, May 13, 2024 at 06:08:52AM +, Taehee Yoo wrote: > The amt.sh requires smcrouted for multicasting routing. > So, it starts smcrouted before forwarding tests. > It must be stopped after all tests, but it isn't. > > To fix this issue, it kills smcrouted in the cleanup logic. > > Fixes:

Re: [PATCH net-next] selftests: net: local_termination: annotate the expected failures

2024-05-15 Thread Petr Machata
Jakub Kicinski writes: > On Mon, 13 May 2024 15:25:38 +0200 Petr Machata wrote: >> For veth specifically there is xfail_on_veth: >> >> xfail_on_veth $rcv_if_name \ >> check_rcv $rcv_if_name "Unicast IPv4 to unknown MAC address" \ >>"$smac > $UNKNOWN_UC_ADDR1, ethertype

[PATCH 1/2] selftests/mm: compaction_test: Fix incorrect write of zero to nr_hugepages

2024-05-15 Thread Dev Jain
nr_hugepages is not set to zero because the file offset has not been reset after read(). Fix that using lseek(). Fixes: bd67d5c15cc1 ("Test compaction of mlocked memory") Cc: sta...@vger.kernel.org Signed-off-by: Dev Jain --- Merge dependency:

[PATCH 2/2] selftests/mm: compaction_test: Fix trivial test success and reduce probability of OOM-killer invocation

2024-05-15 Thread Dev Jain
Reset nr_hugepages to zero before the start of the test. If a non-zero number of hugepages is already set before the start of the test, the following problems arise: - The probability of the test getting OOM-killed increases. Proof: The test wants to run on 80% of available memory to prevent

[PATCH 0/2] Fixes for compaction_test

2024-05-15 Thread Dev Jain
The compaction_test memory selftest introduces fragmentation in memory and then tries to allocate as many hugepages as possible. This series addresses some problems. First off, correctly set the number of hugepages to zero before trying to set a large number of them. Now, consider a situation in

Re: [PATCH bpf-next 9/9] selftests/bpf: Use netns helpers in test_tunnel

2024-05-15 Thread Geliang Tang
Sorry, this patch breaks CI. Changes Requested. -Geliang On Wed, 2024-05-15 at 13:59 +0800, Geliang Tang wrote: > From: Geliang Tang > > This patch uses netns helpers create_netns() and cleanup_netns() in > test_tunnel.c instead of using open_netns() and close_netns() > directly. > >

Re: [PATCH 6.6.y] kselftest: Add a ksft_perror() helper

2024-05-15 Thread Greg KH
On Tue, Apr 30, 2024 at 10:29:43AM -0700, Edward Liaw wrote: > On Tue, Apr 30, 2024 at 12:51 AM Greg KH wrote: > > > > On Tue, Apr 30, 2024 at 01:06:27AM +, Edward Liaw wrote: > > > From: Mark Brown > > > > > > [ Upstream commit 907f33028871fa7c9a3db1efd467b78ef82cce20 ] > > > > > > The

Re: [PATCH v10 0/5] Introduce mseal

2024-05-15 Thread Willy Tarreau
On Tue, May 14, 2024 at 09:14:37PM -0700, Linus Torvalds wrote: > On Tue, 14 May 2024 at 20:36, Linus Torvalds > wrote: > > > > Guys, if you let untrusted code execute random system calls, the whole > > "look, now unmap() acts oddly" IS THE LEAST OF YOUR ISSUES. I totally agree with this, I'm

[PATCH bpf-next 9/9] selftests/bpf: Use netns helpers in test_tunnel

2024-05-15 Thread Geliang Tang
From: Geliang Tang This patch uses netns helpers create_netns() and cleanup_netns() in test_tunnel.c instead of using open_netns() and close_netns() directly. Signed-off-by: Geliang Tang --- .../selftests/bpf/prog_tests/test_tunnel.c| 19 +-- 1 file changed, 9

[PATCH bpf-next 8/9] selftests/bpf: Use netns helpers in lwt tests

2024-05-15 Thread Geliang Tang
From: Geliang Tang This patch uses netns helpers create_netns() and cleanup_netns() in lwt_helpers.h instead of using the local function netns_create() and netns_delete(). For using these helpers. network_helpers.h needs to be included in lwt_helpers.h. Then '#include "network_helpers.h"' in

[PATCH bpf-next 7/9] selftests/bpf: Use cleanup_netns helper

2024-05-15 Thread Geliang Tang
From: Geliang Tang This patch uses cleanup_netns() helper in BPF tests wide to replace close_netns() and "ip netns del", included assign_reuse.c, crypto_sanity.c, decap_sanity.c, fib_lookup.c, ns_current_pid_tgid.c, sock_destroy.c, sock_iter_batch.c, xdp_dev_bound_only.c and xdp_do_redirect.c.

[PATCH bpf-next 6/9] selftests/bpf: Export cleanup_netns helper

2024-05-15 Thread Geliang Tang
From: Geliang Tang This patch adds a new struct member name in struct nstoken, to save the name of the given network namespace. It dups the name string in open_netns() and freed in close_netns(). Then move cleanup_netns() from mptcp.c into network_helpers.c as a public helper. In it the newly

[PATCH bpf-next 5/9] selftests/bpf: Use create_netns helper

2024-05-15 Thread Geliang Tang
From: Geliang Tang The newly added helper create_netns() can be used in assign_reuse.c, fib_lookup.c, ns_current_pid_tgid.c, sock_destroy.c and sock_iter_batch.c to simplify the code. It changes the behavior of test fib_lookup.c a little bit, but doesn't affect the results. Signed-off-by:

[PATCH bpf-next 4/9] selftests/bpf: Export create_netns helper

2024-05-15 Thread Geliang Tang
From: Geliang Tang This patch moves create_netns() from mptcp.c into network_helpers.c, and export it in network_helpers.h as a public helper. The new helper accepts a string parameter, and uses SYS_NOFAIL() instead of SYS() to execute the command, since SYS() deponds on test__fail() which is

[PATCH bpf-next 3/9] selftests/bpf: Drop duplicate create_netns

2024-05-15 Thread Geliang Tang
From: Geliang Tang This patch drops the duplicate local functions create_netns() in bind_perm.c, bpf_iter_setsockopt.c, setget_sockopt.c, sock_fields.c and tcp_hdr_options.c and uses unshare_netns() instead. A new helper create_netns() will be added in network_helpers.c as a public one.

[PATCH bpf-next 2/9] selftests/bpf: Use unshare_netns helper

2024-05-15 Thread Geliang Tang
From: Geliang Tang The newly added helper unshare_netns() can be used to replace unshare() and "ip link set dev lo up" in sk_assign.c, btf_skc_cls_ingress.c and tcp_custom_syncookie.c to simplify the code. Signed-off-by: Geliang Tang ---

[PATCH bpf-next 1/9] selftests/bpf: Add unshare_netns helper

2024-05-15 Thread Geliang Tang
From: Geliang Tang Many BPF selftests create new test network namespaces by using CLONE_NEWNET flag to unshare the network namespace, so that the calling process is moved into a new network namespace which is not shared with any previously existing process. So this patch adds a new helper in

[PATCH bpf-next 0/9] add netns helpers

2024-05-15 Thread Geliang Tang
From: Geliang Tang This patchset addresses Alexei's comment for commit "Handle SIGINT when creating netns" [1]. Export local helpers create_netns() and cleanup_netns() defined in mptcp.c into network_helpers.c as generic ones. For this another helper unshare_netns() is added to replace the