Re: [PATCH] list: test: add the missing MODULE_DESCRIPTION() macro

2024-06-07 Thread David Gow
On Sat, 1 Jun 2024 at 07:58, Jeff Johnson wrote: > > make allmodconfig && make W=1 C=1 reports: > WARNING: modpost: missing MODULE_DESCRIPTION() in lib/list-test.o > > Add the missing invocation of the MODULE_DESCRIPTION() macro. > > Signed-off-by: Jeff Johnson > --- Nice catch, thanks. Reviewe

Re: [PATCH] kunit: add missing MODULE_DESCRIPTION() macros to core modules

2024-06-07 Thread David Gow
On Sun, 2 Jun 2024 at 01:19, Jeff Johnson wrote: > > make allmodconfig && make W=1 C=1 reports in lib/kunit: > WARNING: modpost: missing MODULE_DESCRIPTION() in lib/kunit/kunit.o > WARNING: modpost: missing MODULE_DESCRIPTION() in lib/kunit/kunit-test.o > WARNING: modpost: missing MODULE_DESCRIPTI

Re: [PATCH net-next v10 05/14] netdev: netdevice devmem allocator

2024-06-07 Thread Niklas Schnelle
On Tue, 2024-06-04 at 20:27 -0400, Steven Rostedt wrote: > On Wed, 5 Jun 2024 01:44:37 +0200 > Andrew Lunn wrote: > > > > Interesting, as I sped up the ftrace ring buffer by a substantial amount > > > by > > > adding strategic __always_inline, noinline, likely() and unlikely() > > > throughout t

Re: [PATCH v3] selftests: livepatch: Test atomic replace against multiple modules

2024-06-07 Thread Miroslav Benes
On Mon, 3 Jun 2024, Marcos Paulo de Souza wrote: > Adapt the current test-livepatch.sh script to account the number of > applied livepatches and ensure that an atomic replace livepatch disables > all previously applied livepatches. > > Signed-off-by: Marcos Paulo de Souza > --- > Changes since v

Re: [PATCH v1] memfd: `MFD_NOEXEC_SEAL` should not imply `MFD_ALLOW_SEALING`

2024-06-07 Thread David Rheinsberg
Hi On Tue, May 28, 2024, at 7:13 PM, Jeff Xu wrote: >> > Another solution is to change memfd to be by-default sealable, >> > although that will be an api change, but what side effect will it be >> > ? >> > If we are worried about the memfd being sealed by an attacker, the >> > malicious code coul

Re: [PATCH] selftests/livepatch: define max test-syscall processes

2024-06-07 Thread Miroslav Benes
On Thu, 6 Jun 2024, Ryan Sullivan wrote: > Define a maximum allowable number of pids that can be livepatched in > test-syscall.sh as with extremely large machines the output from a > large number of processes overflows the dev/kmsg "expect" buffer in > the "check_result" function and causes a fals

Re: [PATCH] selftests: mm: Make map_fixed_noreplace test names stable

2024-06-07 Thread Ryan Roberts
On 05/06/2024 23:36, Mark Brown wrote: > KTAP parsers interpret the output of ksft_test_result_*() as being the > name of the test. The map_fixed_noreplace test uses a dynamically > allocated base address for the mmap()s that it tests and currently > includes this in the test names that it logs so

Re: [PATCH v1 1/2] selftests/mm: Include linux/mman.h

2024-06-07 Thread Muhammad Usama Anjum
On 6/6/24 3:36 AM, Edward Liaw wrote: > thuge-gen defines MAP_HUGE_* macros that are provided by linux/mman.h > since 4.15. Removes the macros and includes linux/mman.h instead. > > Signed-off-by: Edward Liaw > --- > tools/testing/selftests/mm/thuge-gen.c | 5 + > 1 file changed, 1 insertion

Re: [PATCH 0/2] Modify the watchdog selftest for execution with

2024-06-07 Thread Laura Nao
Hi Shuah, On 6/7/24 01:03, Shuah Khan wrote: > On 6/6/24 03:57, Laura Nao wrote: >> Hi Shuah, >> >> On 5/6/24 13:13, Laura Nao wrote: >>> The watchdog selftest script supports various parameters for testing >>> different IOCTLs. The watchdog ping functionality is validated by >>> starting >>> a lo

Re: [PATCH v1 2/2] selftests/mm: Guard defines from shm

2024-06-07 Thread Muhammad Usama Anjum
On 6/6/24 3:36 AM, Edward Liaw wrote: > thuge-gen.c defines SHM_HUGE_* macros that are provided by the uapi > since 4.14. These macros get redefined when compiling with Android's > bionic because its sys/shm.h will import the uapi definitions. > > However if linux/shm.h is included, with glibc, sy

Re: [PATCH v1 1/2] selftests/mm: Include linux/mman.h

2024-06-07 Thread Muhammad Usama Anjum
On 6/7/24 2:44 PM, Muhammad Usama Anjum wrote: > On 6/6/24 3:36 AM, Edward Liaw wrote: >> thuge-gen defines MAP_HUGE_* macros that are provided by linux/mman.h >> since 4.15. Removes the macros and includes linux/mman.h instead. >> >> Signed-off-by: Edward Liaw >> --- >> tools/testing/selftests/m

Re: [PATCH] selftests/resctrl: Fix noncont_cat_run_test for AMD

2024-06-07 Thread Ilpo Järvinen
On Wed, 5 Jun 2024, Babu Moger wrote: > The selftest noncont_cat_run_test fails on AMD with the warnings. Reason > is, AMD supports non contiguous CBM masks but does not report it via CPUID. > > Update noncont_cat_run_test to check for the vendor when verifying CPUID. > > Fixes: ae638551ab64 ("s

Re: Kernel Testing & Dependability Micro-Conference at LPC 2024

2024-06-07 Thread Guillaume Tucker
On 10/05/2024 20:43, Guillaume Tucker wrote: > Hello, > > We're pleased to announce the return of the Kernel Testing & > Dependability Micro-Conference at Linux Plumbers 2024: > > https://lpc.events/event/18/contributions/1665/ > > You can already submit proposals by selecting the micro-conf i

Re: [PATCH v2 1/2] selftests/lib.mk: handle both LLVM=1 and CC=clang builds

2024-06-07 Thread Ryan Roberts
On 04/06/2024 05:55, John Hubbard wrote: > On 6/3/24 3:47 PM, Nathan Chancellor wrote: >> On Mon, Jun 03, 2024 at 04:32:30PM +0100, Mark Brown wrote: >>> On Fri, May 31, 2024 at 11:37:50AM -0700, John Hubbard wrote: The kselftests may be built in a couple different ways: make LLVM=1

[PATCH 0/2] Add test to distinguish between thread's signal mask and ucontext_t

2024-06-07 Thread Dev Jain
This patch series is motivated by the following observation: Raise a signal, jump to signal handler. The ucontext_t structure dumped by kernel to userspace has a uc_sigmask field having the mask of blocked signals. If you run a fresh minimalistic program doing this, this field is empty, even if yo

[PATCH 1/2] selftests: Rename sigaltstack to generic signal

2024-06-07 Thread Dev Jain
Rename sigaltstack to signal, and rename the existing test to sigaltstack.c. Signed-off-by: Dev Jain --- tools/testing/selftests/Makefile| 2 +- tools/testing/selftests/{sigaltstack => signal}/.gitignore | 2 +- tools/testing/selftests/{sigaltstack => signal}

[PATCH 2/2] selftests: Add a test mangling with uc_sigmask

2024-06-07 Thread Dev Jain
This test asserts the relation between blocked signal, delivered signal, and ucontext. The ucontext is mangled with, by adding a signal mask to it; on return from the handler, the thread must block the corresponding signal. Signed-off-by: Dev Jain --- tools/testing/selftests/signal/.gitignore

Re: [PATCH net-next v10 06/14] page_pool: convert to use netmem

2024-06-07 Thread Pavel Begunkov
On 6/6/24 02:48, Steven Rostedt wrote: On Thu, 30 May 2024 20:16:05 + Mina Almasry wrote: @@ -42,51 +42,52 @@ TRACE_EVENT(page_pool_release, TRACE_EVENT(page_pool_state_release, TP_PROTO(const struct page_pool *pool, -const struct page *page, u32 release), +

[PATCH v2] selftests: seccomp: fix format-zero-length warnings

2024-06-07 Thread Amer Al Shanawany
fix the following errors by removing empty print statements: seccomp_benchmark.c:197:24: warning: zero-length gnu_printf format string [-Wformat-zero-length] 197 | ksft_print_msg(""); |^~ seccomp_benchmark.c:202:24: warning: zero-length gnu_printf format st

Re: [PATCH 1/2] selftests: Rename sigaltstack to generic signal

2024-06-07 Thread Mark Brown
On Fri, Jun 07, 2024 at 05:53:18PM +0530, Dev Jain wrote: > Rename sigaltstack to signal, and rename the existing test to > sigaltstack.c. I think this is reasonable if we're going to add more generic signal tests - sigaltstack is a fairly small bit of functionality and having it covered as part

[PATCH v6 00/16] selftests/resctrl: resctrl_val() related cleanups & improvements

2024-06-07 Thread Ilpo Järvinen
Hi all, This series does a number of cleanups into resctrl_val() and generalizes it by removing test name specific handling from the function. v6: - Adjust closing/rollback of the IMC perf - Move the comment in measure_vals() to function level - Capitalize MBM - binded to -> bound to - Language t

[PATCH v6 01/16] selftests/resctrl: Fix closing IMC fds on error and open-code R+W instead of loops

2024-06-07 Thread Ilpo Järvinen
The imc perf fd close() calls are missing from all error paths. In addition, get_mem_bw_imc() handles fds in a for loop but close() is based on two fixed indexes READ and WRITE. Open code inner for loops to READ+WRITE entries for clarity and add a function to close() IMC fds properly in all cases.

[PATCH v6 02/16] selftests/resctrl: Calculate resctrl FS derived mem bw over sleep(1) only

2024-06-07 Thread Ilpo Järvinen
For MBM/MBA tests, measure_vals() calls get_mem_bw_imc() that performs the measurement over a duration of sleep(1) call. The memory bandwidth numbers from IMC are derived over this duration. The resctrl FS derived memory bandwidth, however, is calculated inside measure_vals() and only takes delta b

[PATCH v6 03/16] selftests/resctrl: Make "bandwidth" consistent in comments & prints

2024-06-07 Thread Ilpo Järvinen
Resctrl selftests refer to "bandwidth" currently in two other forms in the code ("B/W" and "band width"). Use "bandwidth" consistently everywhere. While at it, fix also one "over flow" -> "overflow" on a line that is touched by the change. Suggested-by: Reinette Chatre Signed-off-by: Ilpo Järvin

[PATCH v6 04/16] selftests/resctrl: Consolidate get_domain_id() into resctrl_val()

2024-06-07 Thread Ilpo Järvinen
Both initialize_mem_bw_resctrl() and initialize_llc_occu_resctrl() that are called from resctrl_val() need to determine domain ID to construct resctrl fs related paths. Both functions do it by taking CPU ID which neither needs for any other purpose than determining the domain ID. Consolidate deter

[PATCH v6 05/16] selftests/resctrl: Use correct type for pids

2024-06-07 Thread Ilpo Järvinen
A few functions receive PIDs through int arguments. PIDs variables should be of type pid_t, not int. Convert pid arguments from int to pid_t. Before printing PID, match the type to %d by casting to int which is enough for Linux (standard would allow using a longer integer type but generalizing fo

[PATCH v6 06/16] selftests/resctrl: Cleanup bm_pid and ppid usage & limit scope

2024-06-07 Thread Ilpo Järvinen
'bm_pid' and 'ppid' are global variables. As they are used by different processes and in signal handler, they cannot be entirely converted into local variables. The scope of those variables can still be reduced into resctrl_val.c only. As PARENT_EXIT() macro is using 'ppid', make it a function in

[PATCH v6 07/16] selftests/resctrl: Rename measure_vals() to measure_mem_bw_vals() & document

2024-06-07 Thread Ilpo Järvinen
measure_vals() is awfully generic name so rename it to measure_mem_bw() to describe better what it does and document the function parameters. Signed-off-by: Ilpo Järvinen Tested-by: Babu Moger Reviewed-by: Reinette Chatre --- v5: - Typo fix to commit message - Consistent caps in kerneldoc ---

[PATCH v6 08/16] selftests/resctrl: Simplify mem bandwidth file code for MBA & MBM tests

2024-06-07 Thread Ilpo Järvinen
initialize_mem_bw_resctrl() and set_mbm_path() contain complicated set of conditions, each yielding different file to be opened to measure memory bandwidth through resctrl FS. In practice, only two of them are used. For MBA test, ctrlgrp is always provided, and for MBM test both ctrlgrp and mongrp

[PATCH v6 09/16] selftests/resctrl: Add ->measure() callback to resctrl_val_param

2024-06-07 Thread Ilpo Järvinen
The measurement done in resctrl_val() varies depending on test type. The decision for how to measure is decided based on the string compare to test name which is quite inflexible. Add ->measure() callback into the struct resctrl_val_param to allow each test to provide necessary code as a function

[PATCH v6 10/16] selftests/resctrl: Add ->init() callback into resctrl_val_param

2024-06-07 Thread Ilpo Järvinen
The struct resctrl_val_param is there to customize behavior inside resctrl_val() which is currently not used to full extent and there are number of strcmp()s for test name in resctrl_val done by resctrl_val(). Create ->init() hook into the struct resctrl_val_param to cleanly do per test initializa

[PATCH v6 11/16] selftests/resctrl: Simplify bandwidth report type handling

2024-06-07 Thread Ilpo Järvinen
bw_report is only needed for selecting the correct value from the values IMC measured. It is a member in the resctrl_val_param struct and is always set to "reads". The value is then checked in resctrl_val() using validate_bw_report_request() that besides validating the input, assumes it can mutate

[PATCH v6 12/16] selftests/resctrl: Make some strings passed to resctrlfs functions const

2024-06-07 Thread Ilpo Järvinen
Control group, monitor group and resctrl_val are not mutated and should not be mutated within resctrlfs.c functions. Mark this by using const char * for the arguments. Signed-off-by: Ilpo Järvinen Tested-by: Babu Moger Reviewed-by: Reinette Chatre --- tools/testing/selftests/resctrl/resctrl.h

[PATCH v6 13/16] selftests/resctrl: Convert ctrlgrp & mongrp to pointers

2024-06-07 Thread Ilpo Järvinen
The struct resctrl_val_param has control and monitor groups as char arrays but they are not supposed to be mutated within resctrl_val(). Convert the ctrlgrp and mongrp char array within resctrl_val_param to plain const char pointers and adjust the strlen() based checks to check NULL instead. Sign

[PATCH v6 14/16] selftests/resctrl: Remove mongrp from MBA test

2024-06-07 Thread Ilpo Järvinen
Nothing during MBA test uses mongrp even if it has been defined ever since the introduction of the MBA test in the commit 01fee6b4d1f9 ("selftests/resctrl: Add MBA test"). Remove the mongrp from MBA test. Signed-off-by: Ilpo Järvinen Tested-by: Babu Moger Reviewed-by: Reinette Chatre --- tool

[PATCH v6 15/16] selftests/resctrl: Remove mongrp from CMT test

2024-06-07 Thread Ilpo Järvinen
The CMT selftest instantiates a monitor group to read LLC occupancy. Since the test also creates a control group, it is unnecessary to create another one for monitoring because control groups already provide monitoring too. Remove the unnecessary monitor group from the CMT selftest. Suggested-by:

[PATCH v6 16/16] selftests/resctrl: Remove test name comparing from write_bm_pid_to_resctrl()

2024-06-07 Thread Ilpo Järvinen
write_bm_pid_to_resctrl() uses resctrl_val to check test name which is not a good interface generic resctrl FS functions should provide. Tests define mongrp when needed. Remove the test name check in write_bm_pid_to_resctrl() to only rely on the mongrp parameter being non-NULL. Remove write_bm_pi

Re: [PATCH 2/2] selftests: Add a test mangling with uc_sigmask

2024-06-07 Thread Mark Brown
On Fri, Jun 07, 2024 at 05:53:19PM +0530, Dev Jain wrote: > This test asserts the relation between blocked signal, delivered signal, > and ucontext. The ucontext is mangled with, by adding a signal mask to > it; on return from the handler, the thread must block the corresponding > signal. > @@ -1,

Re: [PATCH 2/2] selftests: Add a test mangling with uc_sigmask

2024-06-07 Thread Dev Jain
On 6/7/24 18:42, Mark Brown wrote: On Fri, Jun 07, 2024 at 05:53:19PM +0530, Dev Jain wrote: This test asserts the relation between blocked signal, delivered signal, and ucontext. The ucontext is mangled with, by adding a signal mask to it; on return from the handler, the thread must block the

Re: [PATCH 2/2] selftests: Add a test mangling with uc_sigmask

2024-06-07 Thread Mark Brown
On Fri, Jun 07, 2024 at 06:53:27PM +0530, Dev Jain wrote: > On 6/7/24 18:42, Mark Brown wrote: > > On Fri, Jun 07, 2024 at 05:53:19PM +0530, Dev Jain wrote: > > > + * Test describing a clear distinction between signal states - delivered > > > and > > > + * blocked, and their relation with ucontex

Re: [PATCH net-next v10 02/14] net: page_pool: create hooks for custom page providers

2024-06-07 Thread Pavel Begunkov
On 6/3/24 16:43, Mina Almasry wrote: On Mon, Jun 3, 2024 at 7:52 AM Pavel Begunkov wrote: On 6/3/24 15:17, Mina Almasry wrote: On Fri, May 31, 2024 at 10:35 PM Christoph Hellwig wrote: On Thu, May 30, 2024 at 08:16:01PM +, Mina Almasry wrote: I'm unsure if the discussion has been reso

Re: [PATCH net-next v10 02/14] net: page_pool: create hooks for custom page providers

2024-06-07 Thread Pavel Begunkov
On 6/5/24 09:24, Christoph Hellwig wrote: On Mon, Jun 03, 2024 at 03:52:32PM +0100, Pavel Begunkov wrote: The question for Christoph is what exactly is the objection here? Why we would not be using well defined ops when we know there will be more users? The point is that there should be no mor

Re: [PATCH 2/2] selftests: Add a test mangling with uc_sigmask

2024-06-07 Thread Dev Jain
On 6/7/24 19:12, Mark Brown wrote: On Fri, Jun 07, 2024 at 06:53:27PM +0530, Dev Jain wrote: On 6/7/24 18:42, Mark Brown wrote: On Fri, Jun 07, 2024 at 05:53:19PM +0530, Dev Jain wrote: + * Test describing a clear distinction between signal states - delivered and + * blocked, and their relat

Re: [PATCH net-next v10 02/14] net: page_pool: create hooks for custom page providers

2024-06-07 Thread David Ahern
On 6/7/24 7:42 AM, Pavel Begunkov wrote: > I haven't seen any arguments against from the (net) maintainers so > far. Nor I see any objection against callbacks from them (considering > that either option adds an if). I have said before I do not understand why the dmabuf paradigm is not sufficient f

Re: [PATCH net-next v10 02/14] net: page_pool: create hooks for custom page providers

2024-06-07 Thread Jason Gunthorpe
On Fri, Jun 07, 2024 at 08:27:29AM -0600, David Ahern wrote: > On 6/7/24 7:42 AM, Pavel Begunkov wrote: > > I haven't seen any arguments against from the (net) maintainers so > > far. Nor I see any objection against callbacks from them (considering > > that either option adds an if). > > I have sa

[PATCH net 0/4] mptcp: various fixes

2024-06-07 Thread Matthieu Baerts (NGI0)
nged, 19 insertions(+), 9 deletions(-) --- base-commit: c44711b78608c98a3e6b49ce91678cd0917d5349 change-id: 20240607-upstream-net-20240607-misc-fixes-024007171d60 Best regards, -- Matthieu Baerts (NGI0)

[PATCH net 1/4] mptcp: ensure snd_una is properly initialized on connect

2024-06-07 Thread Matthieu Baerts (NGI0)
From: Paolo Abeni This is strictly related to commit fb7a0d334894 ("mptcp: ensure snd_nxt is properly initialized on connect"). It turns out that syzkaller can trigger the retransmit after fallback and before processing any other incoming packet - so that snd_una is still left uninitialized. Add

[PATCH net 2/4] mptcp: pm: inc RmAddr MIB counter once per RM_ADDR ID

2024-06-07 Thread Matthieu Baerts (NGI0)
From: YonglongLi The RmAddr MIB counter is supposed to be incremented once when a valid RM_ADDR has been received. Before this patch, it could have been incremented as many times as the number of subflows connected to the linked address ID, so it could have been 0, 1 or more than 1. The "RmSubfl

[PATCH net 3/4] mptcp: pm: update add_addr counters after connect

2024-06-07 Thread Matthieu Baerts (NGI0)
From: YonglongLi The creation of new subflows can fail for different reasons. If no subflow have been created using the received ADD_ADDR, the related counters should not be updated, otherwise they will never be decremented for events related to this ID later on. For the moment, the number of ac

[PATCH net 4/4] mailmap: map Geliang's new email address

2024-06-07 Thread Matthieu Baerts (NGI0)
From: Geliang Tang Just like my other email addresses, map my new one to kernel.org account too. My new email address uses "last name, first name" format, which is different from my other email addresses. This mailmap is also used to indicate that it is actually the same person. Suggested-by: M

[PATCH net-next v2 5/5] selftests: forwarding: router_mpath_hash: Add a new selftest

2024-06-07 Thread Petr Machata
Add a selftest that exercises the sysctl added in the previous patches. Test that set/get works as expected; that across seeds we eventually hit all NHs (test_mpath_seed_*); and that a given seed keeps hitting the same NHs even across seed changes (test_mpath_seed_stability_*). Signed-off-by: Pet

[PATCH net-next v2 4/5] selftests: forwarding: lib: Split sysctl_save() out of sysctl_set()

2024-06-07 Thread Petr Machata
In order to be able to save the current value of a sysctl without changing it, split the relevant bit out of sysctl_set() into a new helper. Signed-off-by: Petr Machata Reviewed-by: Ido Schimmel --- Cc: Shuah Khan Cc: linux-kselftest@vger.kernel.org Notes: v2: - New patch. tools/test

Re: [PATCH] selftests: proc: remove unreached code and fix build warning

2024-06-07 Thread Alexey Dobriyan
On Tue, Jun 04, 2024 at 08:25:31PM -0700, Andrew Morton wrote: > On Mon, 3 Jun 2024 17:24:47 +0300 Alexey Dobriyan wrote: > > > On Mon, Jun 03, 2024 at 02:42:20PM +0200, Amer Al Shanawany wrote: > > > fix the following warning: > > > proc-empty-vm.c:385:17: warning: ignoring return value of ‘writ

[PATCH HID v2 00/16] HID: convert HID-BPF into using bpf_struct_ops

2024-06-07 Thread Benjamin Tissoires
The purpose of this series is to rethink how HID-BPF is invoked. Currently it implies a jmp table, a prog fd bpf_map, a preloaded tracing bpf program and a lot of manual work for handling the bpf program lifetime and addition/removal. OTOH, bpf_struct_ops take care of most of the bpf handling leav

[PATCH HID v2 01/16] HID: rename struct hid_bpf_ops into hid_ops

2024-06-07 Thread Benjamin Tissoires
Those operations are the ones from HID, not HID-BPF, and I'd like to reuse hid_bpf_ops as the user facing struct_ops API. Signed-off-by: Benjamin Tissoires --- no changes in v2 --- drivers/hid/bpf/hid_bpf_dispatch.c | 22 +++--- drivers/hid/hid-core.c | 6 +++--- i

[PATCH HID v2 02/16] HID: bpf: add hid_get/put_device() helpers

2024-06-07 Thread Benjamin Tissoires
no code change, but this way we reduce code duplication and we can export it later. Signed-off-by: Benjamin Tissoires --- no changes in v2 --- drivers/hid/bpf/hid_bpf_dispatch.c | 47 ++ 1 file changed, 27 insertions(+), 20 deletions(-) diff --git a/drivers

[PATCH HID v2 03/16] HID: bpf: implement HID-BPF through bpf_struct_ops

2024-06-07 Thread Benjamin Tissoires
We do this implementation in several steps to not have the CI failing: - first (this patch), we add struct_ops while keeping the existing infra available - then we change the selftests, the examples and the existing in-tree HID-BPF programs - then we remove the existing trace points making old

[PATCH HID v2 04/16] selftests/hid: convert the hid_bpf selftests with struct_ops

2024-06-07 Thread Benjamin Tissoires
We drop the need for the attach() bpf syscall, but we need to set up the hid_id field before calling __load(). The .bpf.c part is mechanical: we create one struct_ops per HID-BPF program, as all the tests are for one program at a time. Signed-off-by: Benjamin Tissoires --- changes in v2: - use

[PATCH HID v2 05/16] HID: samples: convert the 2 HID-BPF samples into struct_ops

2024-06-07 Thread Benjamin Tissoires
This is mostly mechanical: attach_prog is dropped, and the SEC are converted into struct_ops. Signed-off-by: Benjamin Tissoires --- no changes in v2 but the commit message. --- samples/hid/Makefile | 5 ++-- samples/hid/hid_bpf_attach.bpf.c | 18 - samples/hid/hid_

[PATCH HID v2 06/16] HID: bpf: add defines for HID-BPF SEC in in-tree bpf fixes

2024-06-07 Thread Benjamin Tissoires
We are going to switch over struct_ops, so instead of having to manually replace all fields one by one, let's have a common place to change it. Signed-off-by: Benjamin Tissoires --- no changes in v2 --- drivers/hid/bpf/progs/FR-TEC__Raptor-Mach-2.bpf.c | 4 ++-- drivers/hid/bpf/progs/HP__E

[PATCH HID v2 07/16] HID: bpf: convert in-tree fixes into struct_ops

2024-06-07 Thread Benjamin Tissoires
Very mechanical: - Change HID_BPF_DEVICE_EVENT and HID_BPF_RDESC_FIXUP #defines - add a matching SEC(".struct_ops.link") - in ArtistPro16Gen2 make the 2 functions static and have a new one calling them Signed-off-by: Benjamin Tissoires --- no changes in v2 --- drivers/hid/bpf/progs/FR-TEC__R

[PATCH HID v2 08/16] HID: bpf: remove tracing HID-BPF capability

2024-06-07 Thread Benjamin Tissoires
We can now rely on struct_ops as we cleared the users in-tree. Signed-off-by: Benjamin Tissoires --- changes in v2: - remove now unused enum hid_bpf_attach_flags --- drivers/hid/bpf/Makefile| 2 +- drivers/hid/bpf/entrypoints/Makefile| 93 drivers/hi

[PATCH HID v2 09/16] selftests/hid: add subprog call test

2024-06-07 Thread Benjamin Tissoires
I got a weird verifier error with a subprog once, so let's have a test for it. Signed-off-by: Benjamin Tissoires --- no changes in v2 --- tools/testing/selftests/hid/hid_bpf.c | 41 + tools/testing/selftests/hid/progs/hid.c | 24 +++ 2 files ch

[PATCH HID v2 10/16] Documentation: HID: amend HID-BPF for struct_ops

2024-06-07 Thread Benjamin Tissoires
Now that we are using struct_ops, the docs need to be changed. Signed-off-by: Benjamin Tissoires --- changes in v2 - use BPF_F_BEFORE --- Documentation/hid/hid-bpf.rst | 156 +++--- include/linux/hid_bpf.h | 8 +-- 2 files changed, 76 insertions(+),

[PATCH HID v2 11/16] Documentation: HID: add a small blurb on udev-hid-bpf

2024-06-07 Thread Benjamin Tissoires
This is the current decision we took: we don't provide automatic loading of HID-BPF by the kernel directly, but rely on an external tool for it. This tool is currently udev-hid-bpf, so let's make people aware of it. Signed-off-by: Benjamin Tissoires --- no changes in v2 --- Documentation/hid/

[PATCH HID v2 12/16] HID: bpf: Artist24: remove unused variable

2024-06-07 Thread Benjamin Tissoires
warning: unused variable ‘tilt’ [-Wunused-variable] Signed-off-by: Peter Hutterer Signed-off-by: Benjamin Tissoires --- no changes in v2 --- drivers/hid/bpf/progs/XPPen__Artist24.bpf.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/hid/bpf/progs/XPPen__Artist24.bpf.c b/drivers/hi

[PATCH HID v2 13/16] HID: bpf: error on warnings when compiling bpf objects

2024-06-07 Thread Benjamin Tissoires
There is no real reasons to paper over warnings for such small programs. Signed-off-by: Benjamin Tissoires --- no changes in v2 --- drivers/hid/bpf/progs/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/hid/bpf/progs/Makefile b/drivers/hid/bpf/progs/Makefile

[PATCH HID v2 14/16] bpf: allow bpf helpers to be used into HID-BPF struct_ops

2024-06-07 Thread Benjamin Tissoires
Without this helpers like bpf_printk() or bpf_map_update() are not available, making anything but change of bytes impossible to do. Signed-off-by: Benjamin Tissoires --- new in v2 --- drivers/hid/bpf/hid_bpf_struct_ops.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/hid/bpf/hid_b

[PATCH HID v2 15/16] HID: bpf: rework hid_bpf_ops_btf_struct_access

2024-06-07 Thread Benjamin Tissoires
The idea is to provide a list of stucts and their editable fields. Currently no functional changes are introduced here, we will add some more writeable fields in the next patch. Signed-off-by: Benjamin Tissoires --- new in v2 --- drivers/hid/bpf/hid_bpf_struct_ops.c | 91 +

[PATCH HID v2 16/16] HID: bpf: make part of struct hid_device writable

2024-06-07 Thread Benjamin Tissoires
It is useful to change the name, the phys and/or the uniq of a struct hid_device during .rdesc_fixup(). For example, hid-uclogic.ko changes the uniq to store the firmware version to differentiate between 2 devices sharing the same PID. In the same way, changing the device name is useful when the d

Re: [PATCH net-next v10 02/14] net: page_pool: create hooks for custom page providers

2024-06-07 Thread Pavel Begunkov
On 6/7/24 15:27, David Ahern wrote: On 6/7/24 7:42 AM, Pavel Begunkov wrote: I haven't seen any arguments against from the (net) maintainers so far. Nor I see any objection against callbacks from them (considering that either option adds an if). I have said before I do not understand why the d

Re: [PATCH net-next v10 02/14] net: page_pool: create hooks for custom page providers

2024-06-07 Thread Pavel Begunkov
On 6/7/24 16:42, Pavel Begunkov wrote: On 6/7/24 15:27, David Ahern wrote: On 6/7/24 7:42 AM, Pavel Begunkov wrote: I haven't seen any arguments against from the (net) maintainers so far. Nor I see any objection against callbacks from them (considering that either option adds an if). I have s

Re: [PATCH v1] memfd: `MFD_NOEXEC_SEAL` should not imply `MFD_ALLOW_SEALING`

2024-06-07 Thread Jeff Xu
Hi David, On Fri, Jun 7, 2024 at 1:38 AM David Rheinsberg wrote: > > Hi > > On Tue, May 28, 2024, at 7:13 PM, Jeff Xu wrote: > >> > Another solution is to change memfd to be by-default sealable, > >> > although that will be an api change, but what side effect will it be > >> > ? > >> > If we are

Re: [PATCH v2 1/2] memfd: fix MFD_NOEXEC_SEAL to be non-sealable by default

2024-06-07 Thread Jeff Xu
Hi Barnabás On Fri, May 31, 2024 at 11:56 AM Barnabás Pőcze wrote: > > 2024. május 30., csütörtök 0:24 keltezéssel, Jeff Xu írta: > > > On Wed, May 29, 2024 at 2:46 PM Barnabás Pőcze wrote: > > > > > > Hi > > > > > > > > > 2024. május 29., szerda 23:30 keltezéssel, Jeff Xu > > > írta: > > > >

Re: [PATCH v3] selftest: mm: Test if hugepage does not get leaked during __bio_release_pages()

2024-06-07 Thread Donet Tom
On 6/7/24 11:53, Muhammad Usama Anjum wrote: On 6/7/24 10:50 AM, Donet Tom wrote: Commit 1b151e2435fc ("block: Remove special-casing of compound pages") caused a change in behaviour when releasing the pages if the buffer does not start at the beginning of the page. This was because the calcula

[PATCH net-next 0/6] selftests: mptcp: use net/lib.sh to manage netns

2024-06-07 Thread Matthieu Baerts (NGI0)
do not set ns var as readonly tools/testing/selftests/net/lib.sh | 55 +++--- tools/testing/selftests/net/mptcp/mptcp_lib.sh | 33 +--- 2 files changed, 42 insertions(+), 46 deletions(-) --- base-commit: a73236543f0b8f6daeaa7ecba7488c3a593b change-i

[PATCH net-next 1/6] selftests: net: lib: ignore possible errors

2024-06-07 Thread Matthieu Baerts (NGI0)
No need to disable errexit temporary, simply ignore the only possible and not handled error. Reviewed-by: Geliang Tang Signed-off-by: Matthieu Baerts (NGI0) --- tools/testing/selftests/net/lib.sh | 10 +- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/tools/testing/selftes

[PATCH net-next 2/6] selftests: net: lib: remove ns from list after clean-up

2024-06-07 Thread Matthieu Baerts (NGI0)
Instead of only appending items to the list, removing them when the netns has been deleted. By doing that, we can make sure 'cleanup_all_ns()' is not trying to remove already deleted netns. Reviewed-by: Geliang Tang Signed-off-by: Matthieu Baerts (NGI0) --- tools/testing/selftests/net/lib.sh |

[PATCH net-next 3/6] selftests: net: lib: do not set ns var as readonly

2024-06-07 Thread Matthieu Baerts (NGI0)
It sounds good to mark the global netns variable as 'readonly', but Bash doesn't allow the creation of local variables with the same name. Because it looks like 'readonly' is mainly used here to check if a netns with that name has already been set, it sounds fine to check if a variable with this n

[PATCH net-next 4/6] selftests: net: lib: remove 'ns' var in setup_ns

2024-06-07 Thread Matthieu Baerts (NGI0)
From: Geliang Tang The helper setup_ns() doesn't work when a net namespace named "ns" is passed to it. For example, in net/mptcp/diag.sh, the name of the namespace is "ns". If "setup_ns ns" is used in it, diag.sh fails with errors: Invalid netns name "./mptcp_connect" Cannot open network na

[PATCH net-next 5/6] selftests: mptcp: lib: use setup/cleanup_ns helpers

2024-06-07 Thread Matthieu Baerts (NGI0)
From: Geliang Tang This patch includes lib.sh into mptcp_lib.sh, uses setup_ns helper defined in lib.sh to set up namespaces in mptcp_lib_ns_init(), and uses cleanup_ns to delete namespaces in mptcp_lib_ns_exit(). Signed-off-by: Geliang Tang Reviewed-by: Matthieu Baerts (NGI0) Signed-off-by: M

[PATCH net-next 6/6] selftests: mptcp: lib: use wait_local_port_listen helper

2024-06-07 Thread Matthieu Baerts (NGI0)
From: Geliang Tang This patch includes net_helper.sh into mptcp_lib.sh, uses the helper wait_local_port_listen() defined in it to implement the similar mptcp helper. This can drop some duplicate code. It looks like this helper from net_helper.sh was originally coming from MPTCP, but MPTCP selfte

Re: [PATCH v3] selftest: mm: Test if hugepage does not get leaked during __bio_release_pages()

2024-06-07 Thread Muhammad Usama Anjum
On 6/7/24 9:30 PM, Donet Tom wrote: ... >>>   tools/testing/selftests/mm/Makefile  |   1 + >>>   tools/testing/selftests/mm/hugetlb_dio.c | 118 +++ >> Missed my feedback on adding the test to vm_test.sh > I was not able to find vm_test.sh file to add this test in selftests/m

Re: [PATCH v3] selftest: mm: Test if hugepage does not get leaked during __bio_release_pages()

2024-06-07 Thread Donet Tom
On 6/7/24 22:02, Muhammad Usama Anjum wrote: On 6/7/24 9:30 PM, Donet Tom wrote: ...   tools/testing/selftests/mm/Makefile  |   1 +   tools/testing/selftests/mm/hugetlb_dio.c | 118 +++ Missed my feedback on adding the test to vm_test.sh I was not able to find vm_tes

Re: [PATCH HID v2 03/16] HID: bpf: implement HID-BPF through bpf_struct_ops

2024-06-07 Thread Alexei Starovoitov
On Fri, Jun 7, 2024 at 8:28 AM Benjamin Tissoires wrote: > +struct hid_bpf_ops { > + /* hid_id needs to stay first so we can easily change it > +* from userspace. > +*/ > + int hid_id; > + u32 flags; > + > + /* private

Re: [PATCH HID v2 15/16] HID: bpf: rework hid_bpf_ops_btf_struct_access

2024-06-07 Thread Alexei Starovoitov
On Fri, Jun 7, 2024 at 8:29 AM Benjamin Tissoires wrote: > > The idea is to provide a list of stucts and their editable fields. > > Currently no functional changes are introduced here, we will add some > more writeable fields in the next patch. > > Signed-off-by: Benjamin Tissoires > > --- > > ne

Re: [PATCH net-next v10 02/14] net: page_pool: create hooks for custom page providers

2024-06-07 Thread Mina Almasry
On Fri, Jun 7, 2024 at 8:47 AM Pavel Begunkov wrote: > > On 6/7/24 16:42, Pavel Begunkov wrote: > > On 6/7/24 15:27, David Ahern wrote: > >> On 6/7/24 7:42 AM, Pavel Begunkov wrote: > >>> I haven't seen any arguments against from the (net) maintainers so > >>> far. Nor I see any objection against

Re: [PATCH v2 1/2] selftests/lib.mk: handle both LLVM=1 and CC=clang builds

2024-06-07 Thread Nathan Chancellor
On Fri, Jun 07, 2024 at 12:12:19PM +0100, Ryan Roberts wrote: > On 04/06/2024 05:55, John Hubbard wrote: > > On 6/3/24 3:47 PM, Nathan Chancellor wrote: > >> Does CC=clang even work for the selftests? lib.mk here uses 'CC :=' so > >> won't CC=clang get overridden to CC=$(CROSS_COMPILE)gcc? > >> > >

Re: [PATCH v2 2/2] selftests/lib.mk: silence some clang warnings that gcc already ignores

2024-06-07 Thread Shuah Khan
On 6/3/24 16:36, Nathan Chancellor wrote: On Fri, May 31, 2024 at 11:37:51AM -0700, John Hubbard wrote: gcc defaults to silence (off) for the following warnings, but clang defaults to the opposite. The warnings are not useful for the kernel itself, which is why they have remained disabled in gcc

Re: [PATCH v6 02/16] selftests/resctrl: Calculate resctrl FS derived mem bw over sleep(1) only

2024-06-07 Thread Reinette Chatre
Hi Ilpo, On 6/7/24 5:53 AM, Ilpo Järvinen wrote: For MBM/MBA tests, measure_vals() calls get_mem_bw_imc() that performs the measurement over a duration of sleep(1) call. The memory bandwidth numbers from IMC are derived over this duration. The resctrl FS derived memory bandwidth, however, is cal

Re: [PATCH] selftests: net: Add on/off checks for network interface non fixed features

2024-06-07 Thread Simon Horman
On Thu, Jun 06, 2024 at 09:27:14PM +, Abhinav Jain wrote: > This patch addresses the present TODO in the file. > I have tested it manually on my system and added relevant filtering to > ensure that the correct feature list is being checked. > > Signed-off-by: Abhinav Jain > --- > tools/testi

Re: [PATCH] selftests/resctrl: Fix noncont_cat_run_test for AMD

2024-06-07 Thread Moger, Babu
Hi Reinette, On 6/6/2024 6:58 PM, Reinette Chatre wrote: Hi Babu, On 6/6/24 4:09 PM, Moger, Babu wrote: Hi Reinette, On 6/6/2024 3:33 PM, Reinette Chatre wrote: Hi Babu, On 6/5/24 2:36 PM, Babu Moger wrote: The selftest noncont_cat_run_test fails on AMD with the warnings. Reason is, AMD s

Re: [PATCH v6 15/16] selftests/resctrl: Remove mongrp from CMT test

2024-06-07 Thread Reinette Chatre
Hi Ilpo, On 6/7/24 5:53 AM, Ilpo Järvinen wrote: The CMT selftest instantiates a monitor group to read LLC occupancy. Since the test also creates a control group, it is unnecessary to create another one for monitoring because control groups already provide monitoring too. Remove the unnecessary

[PATCH v4] selftest: mm: Test if hugepage does not get leaked during __bio_release_pages()

2024-06-07 Thread Donet Tom
Commit 1b151e2435fc ("block: Remove special-casing of compound pages") caused a change in behaviour when releasing the pages if the buffer does not start at the beginning of the page. This was because the calculation of the number of pages to release was incorrect. This was fixed by commit 38b43539

kselftest/next build: 5 builds: 0 failed, 5 passed, 1 warning (v6.10-rc1-1-ga567885b1ecc9)

2024-06-07 Thread kernelci.org bot
kselftest/next build: 5 builds: 0 failed, 5 passed, 1 warning (v6.10-rc1-1-ga567885b1ecc9) Full Build Summary: https://kernelci.org/build/kselftest/branch/next/kernel/v6.10-rc1-1-ga567885b1ecc9/ Tree: kselftest Branch: next Git Describe: v6.10-rc1-1-ga567885b1ecc9 Git Commit: a567885b1ecc9ce739

Re: [PATCH v4] selftest: mm: Test if hugepage does not get leaked during __bio_release_pages()

2024-06-07 Thread Andrew Morton
On Fri, 7 Jun 2024 13:20:00 -0500 Donet Tom wrote: > V4: > - Added this test to run_vmtests.sh. v4 also contains this change: --- a/tools/testing/selftests/mm/hugetlb_dio.c~selftest-mm-test-if-hugepage-does-not-get-leaked-during-__bio_release_pages-v4 +++ a/tools/testing/selftests/mm/hugetlb_

Re: [PATCH v2 1/2] selftests/lib.mk: handle both LLVM=1 and CC=clang builds

2024-06-07 Thread John Hubbard
On 6/7/24 10:15 AM, Nathan Chancellor wrote: On Fri, Jun 07, 2024 at 12:12:19PM +0100, Ryan Roberts wrote: On 04/06/2024 05:55, John Hubbard wrote: On 6/3/24 3:47 PM, Nathan Chancellor wrote: ... If we are concluding that CC=clang is an invalid way to do this, then I guess we should report th

kselftest/next kselftest-livepatch: 1 runs, 1 regressions (v6.10-rc1-1-ga567885b1ecc9)

2024-06-07 Thread kernelci.org bot
kselftest/next kselftest-livepatch: 1 runs, 1 regressions (v6.10-rc1-1-ga567885b1ecc9) Regressions Summary --- platform| arch | lab | compiler | defconfig | regressions +--+---+--+--

kselftest/next kselftest-lkdtm: 3 runs, 1 regressions (v6.10-rc1-1-ga567885b1ecc9)

2024-06-07 Thread kernelci.org bot
kselftest/next kselftest-lkdtm: 3 runs, 1 regressions (v6.10-rc1-1-ga567885b1ecc9) Regressions Summary --- platform| arch | lab | compiler | defconfig | regressions +--+---+--+--

Re: [PATCH 1/4] kselftests: vdso: vdso_test_clock_getres: conform test to TAP output

2024-06-07 Thread Shuah Khan
On 5/29/24 01:24, Muhammad Usama Anjum wrote: Conform the layout, informational and status messages to TAP. No functional change is intended other than the layout of output messages. Signed-off-by: Muhammad Usama Anjum The message doesn't match the change. This patch converts the test to use

  1   2   >