[PATCH bpf-next v4 2/3] selftests/bpf: convert test_dev_cgroup to test_progs

2024-07-30 Thread eBPF Foundation
test_dev_cgroup is defined as a standalone test program, and so is not executed in CI. Convert it to test_progs framework so it is tested automatically in CI, and remove the old test. In order to be able to run it in test_progs, /dev/null must remain usable, so change the new test to test operatio

[PATCH bpf-next v4 3/3] selftests/bpf: add wrong type test to cgroup dev

2024-07-30 Thread eBPF Foundation
Current cgroup_dev test mostly tests that device operation is accepted or refused base on passed major/minor (and so, any operation performed during test involves only char device) Add a small subtest ensuring that the device type passed to bpf program allows it to take decisions as well. Reviewe

[PATCH bpf-next v4 1/3] selftests/bpf: do not disable /dev/null device access in cgroup dev test

2024-07-30 Thread eBPF Foundation
test_dev_cgroup currently loads a small bpf program allowing any access on urandom and zero devices, disabling access to any other device. It makes migrating this test to test_progs impossible, since this one manipulates extensively /dev/null. Allow /dev/null manipulation in dev_cgroup program to

[PATCH bpf-next v4 0/3] selftests/bpf: convert test_dev_cgroup to test_progs

2024-07-30 Thread eBPF Foundation
islas - Link to v3: https://lore.kernel.org/r/20240730-convert_dev_cgroup-v3-0-93e573b74...@bootlin.com Changes in v3: - delete mknod file only if it has been created - use bpf_program__attach_cgroup() instead of bpf_prog_attach - reorganize subtests order - collect review/ack tags from Alan and Stan

Re: [PATCH bpf-next v3 2/3] selftests/bpf: convert test_dev_cgroup to test_progs

2024-07-30 Thread Alexis Lothoré
Hello Martin, On 7/31/24 02:34, Martin KaFai Lau wrote: > On 7/30/24 4:59 AM, Alexis Lothoré (eBPF Foundation) wrote: >> +static void test_read(const char *path, char *buf, int buf_size, >> +  int expected_ret) >> +{ >> +    int ret, fd; >> + >> +    fd = open(path, O_RDONLY); >> + >>

Re: [PATCH] selftests: user: remove user suite

2024-07-30 Thread Muhammad Usama Anjum
On 7/31/24 7:33 AM, Kees Cook wrote: > > > On July 30, 2024 3:36:11 PM PDT, Shuah Khan wrote: >> On 7/25/24 08:44, Shuah Khan wrote: >>> On 7/25/24 05:08, Muhammad Usama Anjum wrote: The user test suite has only one test, test_user_copy which loads test_user_copy module for testing. Bu

Re: [PATCH 0/3] bitmap: Convert test_bitmap to kunit test

2024-07-30 Thread David Gow
On Tue, 30 Jul 2024 at 23:49, Shuah Khan wrote: > > On 7/29/24 02:29, Muhammad Usama Anjum wrote: > > On 7/27/24 12:26 AM, Shuah Khan wrote: > >> On 7/26/24 05:06, Muhammad Usama Anjum wrote: > >>> In this series, test_bitmap is being converted to kunit test. Multiple > >>> patches will make the r

Re: [PATCH 0/3] bitmap: Convert test_bitmap to kunit test

2024-07-30 Thread David Gow
On Tue, 30 Jul 2024 at 23:39, Shuah Khan wrote: > > On 7/29/24 02:15, Muhammad Usama Anjum wrote: > > On 7/27/24 11:10 PM, Yury Norov wrote: > >> On Fri, Jul 26, 2024 at 01:26:48PM -0600, Shuah Khan wrote: > >>> On 7/26/24 05:06, Muhammad Usama Anjum wrote: > In this series, test_bitmap is be

Re: [PATCH] selftests: user: remove user suite

2024-07-30 Thread Kees Cook
On July 30, 2024 3:36:11 PM PDT, Shuah Khan wrote: >On 7/25/24 08:44, Shuah Khan wrote: >> On 7/25/24 05:08, Muhammad Usama Anjum wrote: >>> The user test suite has only one test, test_user_copy which loads >>> test_user_copy module for testing. But test_user_copy module has already >>> been co

Re: [PATCH bpf-next v3 2/3] selftests/bpf: convert test_dev_cgroup to test_progs

2024-07-30 Thread Martin KaFai Lau
On 7/30/24 4:59 AM, Alexis Lothoré (eBPF Foundation) wrote: +static void test_read(const char *path, char *buf, int buf_size, + int expected_ret) +{ + int ret, fd; + + fd = open(path, O_RDONLY); + + /* A bare open on unauthorized device should fail */ +

[PATCH v7 1/2] mm, memcg: cg2 memory{.swap,}.peak write handlers

2024-07-30 Thread David Finkel
Other mechanisms for querying the peak memory usage of either a process or v1 memory cgroup allow for resetting the high watermark. Restore parity with those mechanisms, but with a less racy API. For example: - Any write to memory.max_usage_in_bytes in a cgroup v1 mount resets the high waterma

[PATCH v7 2/2] mm, memcg: cg2 memory{.swap,}.peak write tests

2024-07-30 Thread David Finkel
Extend two existing tests to cover extracting memory usage through the newly mutable memory.peak and memory.swap.peak handlers. In particular, make sure to exercise adding and removing watchers with overlapping lifetimes so the less-trivial logic gets tested. The new/updated tests attempt to dete

[PATCH v7] mm, memcg: cg2 memory{.swap,}.peak write handlers

2024-07-30 Thread David Finkel
This revision only updates the tests from the previous revision[1], and integrates an Acked-by[2] and a Reviewed-By[3] into the first commit message. Documentation/admin-guide/cgroup-v2.rst | 22 ++- include/linux/cgroup-defs.h | 5 + include/linux/cgroup.h

Re: Converting kselftest test modules to kunit

2024-07-30 Thread Shuah Khan
On 7/29/24 01:55, Muhammad Usama Anjum wrote: On 7/27/24 12:35 AM, Shuah Khan wrote: On 7/15/24 04:09, Muhammad Usama Anjum wrote: Hi Kees and All, There are several tests in kselftest subsystem which load modules to tests the internals of the kernel. Most of these test modules are just loaded

Re: Converting kselftest test modules to kunit

2024-07-30 Thread Shuah Khan
On 7/29/24 23:23, David Gow wrote: On Sat, 27 Jul 2024 at 03:35, Shuah Khan wrote: On 7/15/24 04:09, Muhammad Usama Anjum wrote: Hi Kees and All, There are several tests in kselftest subsystem which load modules to tests the internals of the kernel. Most of these test modules are just loaded

[PATCH net-next v2 2/2] selftests: net: ksft: support marking tests as disruptive

2024-07-30 Thread Stanislav Fomichev
Add new @ksft_disruptive decorator to mark the tests that might be disruptive to the system. Depending on how well the previous test works in the CI we might want to disable disruptive tests by default and only let the developers run them manually. KSFT framework runs disruptive tests by default.

[PATCH net-next v2 1/2] selftests: net-drv: exercise queue stats when the device is down

2024-07-30 Thread Stanislav Fomichev
Verify that total device stats don't decrease after it has been turned down. Also make sure the device doesn't crash when we access per-queue stats when it's down (in case it tries to access some pointers that are NULL). KTAP version 1 1..5 ok 1 stats.check_pause ok 2 stats.check_fec ok

Re: [PATCH v2] selftests: lib: remove strscpy test

2024-07-30 Thread Shuah Khan
On 7/25/24 06:11, Muhammad Usama Anjum wrote: The strscpy test loads test_strscpy module for testing. But test_strscpy was converted to Kunit (see fixes). Hence remove strscpy. Fixes: 41eefc46a3a4 ("string: Convert strscpy() self-test to KUnit") Signed-off-by: Muhammad Usama Anjum --- Changes s

Re: [PATCH] selftests: user: remove user suite

2024-07-30 Thread Shuah Khan
On 7/25/24 08:44, Shuah Khan wrote: On 7/25/24 05:08, Muhammad Usama Anjum wrote: The user test suite has only one test, test_user_copy which loads test_user_copy module for testing. But test_user_copy module has already been converted to kunit (see fixes). Hence remove the entire suite. Fixes:

Re: [PATCH 0/1] selftest: drivers: Add support its msi hwirq checking

2024-07-30 Thread Shuah Khan
On 5/29/24 19:27, Joseph Jang wrote: In order to validate ITS-MSI hwirq entry in the /proc/interrupts, we have created a shell script to check is there any duplicated ITS-MSI hwirq entry. Joseph Jang (1): selftest: drivers: Add support its msi hwirq checking tools/testing/selftests/drivers

Re: [PATCH bpf-next v2 1/8] selftests/bpf: Use portable POSIX basename()

2024-07-30 Thread patchwork-bot+netdevbpf
Hello: This series was applied to bpf/bpf-next.git (master) by Andrii Nakryiko : On Mon, 29 Jul 2024 02:24:17 -0700 you wrote: > Use the POSIX version of basename() to allow compilation against non-gnu > libc (e.g. musl). Include ahead of to enable using > functions from the latter while prefer

Re: [PATCH net-next 0/7] net/selftests: TCP-AO selftests updates

2024-07-30 Thread Dmitry Safonov
On Tue, 30 Jul 2024 at 11:51, Paolo Abeni wrote: [..] > It looks like this is not well digested by the CI, e.g.: > > https://netdev.bots.linux.dev/flakes.html?tn-needle=tcp-ao > > https://netdev-3.bots.linux.dev/vmksft-tcp-ao-dbg/results/705502/8-restore-ipv4/stdout Thanks Paolo! I see the 2 issu

Re: [RFC PATCH v5 18/29] KVM: selftests: TDX: Add TDX MMIO writes test

2024-07-30 Thread Sagi Shahar
On Tue, Mar 5, 2024 at 3:28 AM Yan Zhao wrote: > > On Tue, Dec 12, 2023 at 12:46:33PM -0800, Sagi Shahar wrote: > > The test verifies MMIO writes of various sizes from the guest to the host. > > > > Signed-off-by: Sagi Shahar > > Signed-off-by: Ackerley Tng > > Signed-off-by: Ryan Afranji > > -

Re: [PATCH 2/3] bitmap: Rename module

2024-07-30 Thread John Hubbard
On 7/30/24 11:17 AM, Shuah Khan wrote: On 7/30/24 09:55, Shuah Khan wrote: On 7/30/24 04:10, David Gow wrote: On Mon, 29 Jul 2024 at 22:09, Randy Dunlap ... I can see the point that renaming the config option is just churn, but is there a reason people would run the bitmap selftest but be un

[PATCH net-next v8 3/3] selftests: add MSG_ZEROCOPY msg_control notification test

2024-07-30 Thread zijianzhang
From: Zijian Zhang We update selftests/net/msg_zerocopy.c to accommodate the new mechanism, cfg_notification_limit has the same semantics for both methods. Test results are as follows, we update skb_orphan_frags_rx to the same as skb_orphan_frags to support zerocopy in the localhost test. cfg_no

[PATCH net-next v8 2/3] sock: add MSG_ZEROCOPY notification mechanism based on msg_control

2024-07-30 Thread zijianzhang
From: Zijian Zhang The MSG_ZEROCOPY flag enables copy avoidance for socket send calls. However, zerocopy is not a free lunch. Apart from the management of user pages, the combination of poll + recvmsg to receive notifications incurs unignorable overhead in the applications. We try to mitigate thi

[PATCH net-next v8 1/3] sock: support copying cmsgs to the user space in sendmsg

2024-07-30 Thread zijianzhang
From: Zijian Zhang Users can pass msg_control as a placeholder to recvmsg, and get some info from the kernel upon returning of it, but it's not available for sendmsg. Recvmsg uses put_cmsg to copy info back to the user, while sys_sendmsg creates a kernel copy of msg_control and passes that to

[PATCH net-next v8 0/3] net: A lightweight zero-copy notification mechanism for MSG_ZEROCOPY

2024-07-30 Thread zijianzhang
From: Zijian Zhang Original notification mechanism needs poll + recvmmsg which is not easy for applcations to accommodate. And, it also incurs unignorable overhead including extra system calls. While making maximum reuse of the existing MSG_ZEROCOPY related code, this patch set introduces a new

Re: [PATCH 2/3] bitmap: Rename module

2024-07-30 Thread Shuah Khan
On 7/30/24 09:55, Shuah Khan wrote: On 7/30/24 04:10, David Gow wrote: On Mon, 29 Jul 2024 at 22:09, Randy Dunlap wrote: On 7/29/24 1:07 AM, Muhammad Usama Anjum wrote: On 7/27/24 10:35 PM, Yury Norov wrote: On Fri, Jul 26, 2024 at 04:06:57PM +0500, Muhammad Usama Anjum wrote: Rename mod

Re: [PATCH net-next 2/2] selftests: net: ksft: support marking tests as disruptive

2024-07-30 Thread Jakub Kicinski
On Tue, 30 Jul 2024 09:20:05 -0700 Stanislav Fomichev wrote: > SG! The patch you reference is doing it in NetDrvEnv* but I'll probably > try to keep most of the code in 'core' ksft. So far I'm thinking about > adding some ksft_setup(env) to initialize that disruptive=yes/no state. > LMK if you pref

Re: [PATCH 2/3] bitmap: Rename module

2024-07-30 Thread Yury Norov
On Tue, Jul 30, 2024 at 06:10:55PM +0800, David Gow wrote: > On Mon, 29 Jul 2024 at 22:09, Randy Dunlap wrote: > > > > > > > > On 7/29/24 1:07 AM, Muhammad Usama Anjum wrote: > > > On 7/27/24 10:35 PM, Yury Norov wrote: > > >> On Fri, Jul 26, 2024 at 04:06:57PM +0500, Muhammad Usama Anjum wrote: >

Re: [PATCH bpf-next v3 1/3] selftests/bpf: do not disable /dev/null device access in cgroup dev test

2024-07-30 Thread Alan Maguire
On 30/07/2024 12:59, Alexis Lothoré (eBPF Foundation) wrote: > test_dev_cgroup currently loads a small bpf program allowing any access on > urandom and zero devices, disabling access to any other device. It makes > migrating this test to test_progs impossible, since this one manipulates > extensive

Re: [PATCH bpf 1/6] selftest/bpf: Support more socket types in create_pair()

2024-07-30 Thread Jakub Sitnicki
On Fri, Jul 26, 2024 at 10:29 PM +02, Michal Luczaj wrote: > On 7/26/24 19:23, Jakub Sitnicki wrote: >> I was going to suggest that a single return path for success is better >> than two (diff below), but I see that this is what you ended up with >> after patch 6. >> >> So I think we can leave it

Re: [PATCH net-next 2/2] selftests: net: ksft: support marking tests as disruptive

2024-07-30 Thread Stanislav Fomichev
On 07/29, Jakub Kicinski wrote: > On Mon, 29 Jul 2024 15:10:42 -0700 Stanislav Fomichev wrote: > > +parser = argparse.ArgumentParser() > > +parser.add_argument('--skip-disruptive', default=False, > > action='store_true', help='skip tests that might be disruptive (e.g. > > restart the inte

Re: [PATCH 2/3] bitmap: Rename module

2024-07-30 Thread Shuah Khan
On 7/30/24 04:10, David Gow wrote: On Mon, 29 Jul 2024 at 22:09, Randy Dunlap wrote: On 7/29/24 1:07 AM, Muhammad Usama Anjum wrote: On 7/27/24 10:35 PM, Yury Norov wrote: On Fri, Jul 26, 2024 at 04:06:57PM +0500, Muhammad Usama Anjum wrote: Rename module to bitmap_kunit and rename the co

Re: [PATCH v6 2/2] mm, memcg: cg2 memory{.swap,}.peak write tests

2024-07-30 Thread David Finkel
Thanks for checking! On Tue, Jul 30, 2024 at 11:46 AM Michal Koutný wrote: > > Hello. > > On Mon, Jul 29, 2024 at 10:37:43AM GMT, David Finkel wrote: > > Extend two existing tests to cover extracting memory usage through the > > newly mutable memory.peak and memory.swap.peak handlers. > > BTW do

Re: [PATCH 0/3] bitmap: Convert test_bitmap to kunit test

2024-07-30 Thread Shuah Khan
On 7/29/24 02:29, Muhammad Usama Anjum wrote: On 7/27/24 12:26 AM, Shuah Khan wrote: On 7/26/24 05:06, Muhammad Usama Anjum wrote: In this series, test_bitmap is being converted to kunit test. Multiple patches will make the review process smooth. - Patch-1: Convert the tests in lib/test_bitmap

Re: [PATCH v6 1/2] mm, memcg: cg2 memory{.swap,}.peak write handlers

2024-07-30 Thread Michal Koutný
On Mon, Jul 29, 2024 at 10:37:42AM GMT, David Finkel wrote: > ... > Documentation/admin-guide/cgroup-v2.rst | 22 +++-- > include/linux/cgroup-defs.h | 5 + > include/linux/cgroup.h | 3 + > include/linux/memcontrol.h | 5 + > include/linux/page_co

Re: [PATCH v6 2/2] mm, memcg: cg2 memory{.swap,}.peak write tests

2024-07-30 Thread Michal Koutný
Hello. On Mon, Jul 29, 2024 at 10:37:43AM GMT, David Finkel wrote: > Extend two existing tests to cover extracting memory usage through the > newly mutable memory.peak and memory.swap.peak handlers. BTW do the tests pass for you? I gave it a try (v6.11-rc1+your patches) $ grep "not ok 2" -B30

Re: [PATCH 0/3] bitmap: Convert test_bitmap to kunit test

2024-07-30 Thread Shuah Khan
On 7/29/24 02:15, Muhammad Usama Anjum wrote: On 7/27/24 11:10 PM, Yury Norov wrote: On Fri, Jul 26, 2024 at 01:26:48PM -0600, Shuah Khan wrote: On 7/26/24 05:06, Muhammad Usama Anjum wrote: In this series, test_bitmap is being converted to kunit test. Multiple patches will make the review pro

Re: [PATCH 2/3] bitmap: Rename module

2024-07-30 Thread Randy Dunlap
On 7/30/24 12:51 AM, Muhammad Usama Anjum wrote: > On 7/29/24 7:09 PM, Randy Dunlap wrote: >> >> >> On 7/29/24 1:07 AM, Muhammad Usama Anjum wrote: >>> On 7/27/24 10:35 PM, Yury Norov wrote: On Fri, Jul 26, 2024 at 04:06:57PM +0500, Muhammad Usama Anjum wrote: > Rename module to bitmap_

Re: [PATCH v3 03/10] selftests: kvm: s390: Add s390x ucontrol test suite with hpage test

2024-07-30 Thread Janosch Frank
On 7/30/24 9:24 AM, Christoph Schlameuss wrote: Add test suite to validate the s390x architecture specific ucontrol KVM interface. Make use of the selftest test harness. * uc_cap_hpage testcase verifies that a ucontrol VM cannot be run with hugepages. To allow testing of the ucontrol interf

[PATCH bpf-next v3 0/3] selftests/bpf: convert test_dev_cgroup to test_progs

2024-07-30 Thread eBPF Foundation
Hello, this small series aims to integrate test_dev_cgroup in test_progs so it could be run automatically in CI. The new version brings a few differences with the current one: - test now uses directly syscalls instead of wrapping commandline tools into system() calls - test_progs manipulates /dev

Re: [PATCH v3 02/10] selftests: kvm: s390: Add kvm_s390_sie_block definition for userspace tests

2024-07-30 Thread Janosch Frank
On 7/30/24 9:24 AM, Christoph Schlameuss wrote: Subsequent tests do require direct manipulation of the SIE control block. This commit introduces the SIE control block definition for use within the selftests. There are already definitions of this within the kernel. This differs in two ways. * Thi

[PATCH bpf-next v3 3/3] selftests/bpf: add wrong type test to cgroup dev

2024-07-30 Thread eBPF Foundation
Current cgroup_dev test mostly tests that device operation is accepted or refused base on passed major/minor (and so, any operation performed during test involves only char device) Add a small subtest ensuring that the device type passed to bpf program allows it to take decisions as well. Reviewe

[PATCH bpf-next v3 2/3] selftests/bpf: convert test_dev_cgroup to test_progs

2024-07-30 Thread eBPF Foundation
test_dev_cgroup is defined as a standalone test program, and so is not executed in CI. Convert it to test_progs framework so it is tested automatically in CI, and remove the old test. In order to be able to run it in test_progs, /dev/null must remain usable, so change the new test to test operatio

[PATCH bpf-next v3 1/3] selftests/bpf: do not disable /dev/null device access in cgroup dev test

2024-07-30 Thread eBPF Foundation
test_dev_cgroup currently loads a small bpf program allowing any access on urandom and zero devices, disabling access to any other device. It makes migrating this test to test_progs impossible, since this one manipulates extensively /dev/null. Allow /dev/null manipulation in dev_cgroup program to

Re: [PATCH net-next 0/7] net/selftests: TCP-AO selftests updates

2024-07-30 Thread Paolo Abeni
On 7/30/24 04:12, Dmitry Safonov wrote: First 4 patches are more-or-less cleanups/preparations. Patch 5 was sent to me/contributed off-list by Mohammad, who wants 32-bit kernels to run TCP-AO. Patch 6 is a workaround/fix for slow VMs. Albeit, I can't reproduce the issue, but I hope it will fix

Re: [PATCH] selftests: ksft: Track skipped tests when finishing the test suite

2024-07-30 Thread Laura Nao
On 7/29/24 22:06, Shuah Khan wrote: > On 7/29/24 08:52, Laura Nao wrote: >> Hi Shuah, >> >> On 7/23/24 18:17, Shuah Khan wrote: >>> On 7/22/24 09:43, Laura Nao wrote: Consider skipped tests in addition to passed tests when evaluating the overall result of the test suite in the finished()

[PATCH v2] selftests: ksft: Fix finished() helper exit code on skipped tests

2024-07-30 Thread Laura Nao
The Python finished() helper currently exits with KSFT_FAIL when there are only passed and skipped tests. Fix the logic to exit with KSFT_PASS instead, making it consistent with its C and bash counterparts (ksft_finished() and ktap_finished() respectively). Reviewed-by: Nícolas F. R. A. Prado Fix

Re: [PATCH 2/3] bitmap: Rename module

2024-07-30 Thread David Gow
On Mon, 29 Jul 2024 at 22:09, Randy Dunlap wrote: > > > > On 7/29/24 1:07 AM, Muhammad Usama Anjum wrote: > > On 7/27/24 10:35 PM, Yury Norov wrote: > >> On Fri, Jul 26, 2024 at 04:06:57PM +0500, Muhammad Usama Anjum wrote: > >>> Rename module to bitmap_kunit and rename the configuration option >

Re: [PATCH net 0/7] mptcp: fix inconsistent backup usage

2024-07-30 Thread patchwork-bot+netdevbpf
Hello: This series was applied to netdev/net.git (main) by Paolo Abeni : On Sat, 27 Jul 2024 12:01:22 +0200 you wrote: > In all the MPTCP backup related tests, the backup flag was set on one > side, and the expected behaviour is to have both sides respecting this > decision. That's also the "natu

Re: [PATCH bpf-next v2 1/3] selftests/bpf: do not disable /dev/null device access in cgroup dev test

2024-07-30 Thread Alexis Lothoré
On 7/30/24 10:16, Alan Maguire wrote: > On 29/07/2024 18:30, Alexis Lothoré wrote: >> Hello Alan, [...] >>> Not a big deal, but I found it a bit confusing that this file was >>> modified then deleted in patch 2. Would it work having patch 1 stop >>> building the standalone test/remove it and .git

Re: [PATCH] MAINTAINERS: Add selftests to DMA-BUF HEAPS FRAMEWORK entry

2024-07-30 Thread Daniel Vetter
On Mon, Jul 29, 2024 at 04:12:02PM +0800, Zenghui Yu wrote: > Include dmabuf-heaps selftests in the correct entry so that updates to it > can be sent to the right place. > > Signed-off-by: Zenghui Yu Applied to drm-misc-next, thanks for your patch. -Sima > --- > MAINTAINERS | 1 + > 1 file cha

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

2024-07-30 Thread Markus Elfring
… > +++ b/include/net/devmem.h > @@ -0,0 +1,115 @@ … > +#ifndef _NET_DEVMEM_H > +#define _NET_DEVMEM_H … I suggest to omit leading underscores from such identifiers. https://wiki.sei.cmu.edu/confluence/display/c/DCL37-C.+Do+not+declare+or+define+a+reserved+identifier Regards, Markus

Re: [PATCH net-next v17 01/14] netdev: add netdev_rx_queue_restart()

2024-07-30 Thread Xuan Zhuo
On Tue, 30 Jul 2024 02:26:05 +, Mina Almasry wrote: > Add netdev_rx_queue_restart() function to netdev_rx_queue.h Can you say more? As far as I understand, we just release the buffer submitted to the rx ring and get a new page pool. But I personally feel that the interface here is a bit too

Re: [PATCH bpf-next v2 1/3] selftests/bpf: do not disable /dev/null device access in cgroup dev test

2024-07-30 Thread Alan Maguire
On 29/07/2024 18:30, Alexis Lothoré wrote: > Hello Alan, > > On 7/29/24 18:59, Alan Maguire wrote: >> On 29/07/2024 09:20, Alexis Lothoré (eBPF Foundation) wrote: >>> test_dev_cgroup currently loads a small bpf program allowing any access on >>> urandom and zero devices, disabling access to any ot

Re: [PATCH 2/3] bitmap: Rename module

2024-07-30 Thread Muhammad Usama Anjum
On 7/29/24 7:09 PM, Randy Dunlap wrote: > > > On 7/29/24 1:07 AM, Muhammad Usama Anjum wrote: >> On 7/27/24 10:35 PM, Yury Norov wrote: >>> On Fri, Jul 26, 2024 at 04:06:57PM +0500, Muhammad Usama Anjum wrote: Rename module to bitmap_kunit and rename the configuration option compliant w

[PATCH v3 03/10] selftests: kvm: s390: Add s390x ucontrol test suite with hpage test

2024-07-30 Thread Christoph Schlameuss
Add test suite to validate the s390x architecture specific ucontrol KVM interface. Make use of the selftest test harness. * uc_cap_hpage testcase verifies that a ucontrol VM cannot be run with hugepages. To allow testing of the ucontrol interface the kernel needs a non-default config containin

[PATCH v3 08/10] selftests: kvm: s390: Add uc_skey VM test case

2024-07-30 Thread Christoph Schlameuss
Add a test case manipulating s390 storage keys from within the ucontrol VM. Signed-off-by: Christoph Schlameuss --- .../selftests/kvm/s390x/ucontrol_test.c | 77 +++ 1 file changed, 77 insertions(+) diff --git a/tools/testing/selftests/kvm/s390x/ucontrol_test.c b/tools/te

[PATCH v3 02/10] selftests: kvm: s390: Add kvm_s390_sie_block definition for userspace tests

2024-07-30 Thread Christoph Schlameuss
Subsequent tests do require direct manipulation of the SIE control block. This commit introduces the SIE control block definition for use within the selftests. There are already definitions of this within the kernel. This differs in two ways. * This is the first definition of this in userspace. *

[PATCH v3 00/10] selftests: kvm: s390: Add s390x ucontrol selftests

2024-07-30 Thread Christoph Schlameuss
This patch series adds a selftest suite to validate the s390x architecture specific ucontrol KVM interface. When creating a VM on s390x it is possible to create it as userspace controlled VM or in short ucontrol VM. These VMs delegates the management of the VM to userspace instead of handling most

[PATCH v3 10/10] s390: Enable KVM_S390_UCONTROL config in debug_defconfig

2024-07-30 Thread Christoph Schlameuss
To simplify testing enable UCONTROL KVM by default in debug kernels. Signed-off-by: Christoph Schlameuss --- arch/s390/configs/debug_defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/s390/configs/debug_defconfig b/arch/s390/configs/debug_defconfig index ea63a7342f5f..0c989caed1

[PATCH v3 07/10] selftests: kvm: s390: Add uc_map_unmap VM test case

2024-07-30 Thread Christoph Schlameuss
Add a test case verifying basic running and interaction of ucontrol VMs. Fill the segment and page tables for allocated memory and map memory on first access. * uc_map_unmap Store and load data to mapped and unmapped memory and use pic segment translation handling to map memory on access. Sig

[PATCH v3 01/10] selftests: kvm: s390: Define page sizes in shared header

2024-07-30 Thread Christoph Schlameuss
Multiple test cases need page size and shift definitions. By moving the definitions to a single architecture specific header we limit the repetition. Make use of PAGE_SIZE, PAGE_SHIFT and PAGE_MASK defines in existing code. Signed-off-by: Christoph Schlameuss Reviewed-by: Claudio Imbrenda Revie

[PATCH v3 06/10] selftests: kvm: s390: Add VM run test case

2024-07-30 Thread Christoph Schlameuss
Add test case running code interacting with registers within a ucontrol VM. * Add uc_gprs test case The test uses the same VM setup using the fixture and debug macros introduced in earlier patches in this series. Signed-off-by: Christoph Schlameuss --- .../selftests/kvm/s390x/ucontrol_test.c

[PATCH v3 09/10] selftests: kvm: s390: Verify reject memory region operations for ucontrol VMs

2024-07-30 Thread Christoph Schlameuss
Add a test case verifying KVM_SET_USER_MEMORY_REGION and KVM_SET_USER_MEMORY_REGION2 cannot be executed on ucontrol VMs. Executing this test case on not patched kernels will cause a null pointer dereference in the host kernel. This is fixed with commit: commit 7816e58967d0 ("kvm: s390: Reject memo

[PATCH v3 04/10] selftests: kvm: s390: Add test fixture and simple VM setup tests

2024-07-30 Thread Christoph Schlameuss
Add a uc_kvm fixture to create and destroy a ucontrol VM. * uc_sie_assertions asserts basic settings in the SIE as setup by the kernel. * uc_attr_mem_limit asserts the memory limit is max value and cannot be set (not supported). * uc_no_dirty_log asserts dirty log is not supported. Signed-off

[PATCH v3 05/10] selftests: kvm: s390: Add debug print functions

2024-07-30 Thread Christoph Schlameuss
Add functions to simply print some basic state information in selftests. The output can be enabled by setting: #define TH_LOG_ENABLED 1 #define DEBUG 1 * print_psw: current SIE state description and VM run state * print_hex_bytes: print memory with some counting markers * print_hex: PRIN