Re: [External] Re: [PATCH bpf-next v2 5/9] bpf: verifier: add btf to the function args of bpf_check_attach_target

2024-03-11 Thread 梦龙董
On Tue, Mar 12, 2024 at 9:51 AM Alexei Starovoitov wrote: > > On Mon, Mar 11, 2024 at 2:35 AM Menglong Dong > wrote: > > > > Add target btf to the function args of bpf_check_attach_target(), then > > the caller can specify the btf to check. > > > > Signed-off-by: Menglong Dong > > --- > >

Re: [PATCH 1/8] iommu: Introduce a replace API for device pasid

2024-03-11 Thread Yi Liu
On 2024/3/11 17:26, Tian, Kevin wrote: From: Liu, Yi L Sent: Sunday, March 10, 2024 9:06 PM On 2024/1/16 01:19, Jason Gunthorpe wrote: On Sun, Nov 26, 2023 at 10:34:21PM -0800, Yi Liu wrote: +int iommu_replace_device_pasid(struct iommu_domain *domain, + struct

Re: [External] Re: [PATCH bpf-next v2 7/9] libbpf: don't free btf if program of multi-link tracing existing

2024-03-11 Thread 梦龙董
On Tue, Mar 12, 2024 at 10:13 AM Alexei Starovoitov wrote: > > On Mon, Mar 11, 2024 at 7:05 PM 梦龙董 wrote: > > > > > > > > > > +LIBBPF_API void bpf_object__free_btfs(struct bpf_object *obj); > > > > + > > > > > > It shouldn't be exported. > > > libbpf should clean it up when bpf_object is freed.

Re: [External] Re: [PATCH bpf-next v2 1/9] bpf: tracing: add support to record and check the accessed args

2024-03-11 Thread 梦龙董
On Tue, Mar 12, 2024 at 10:42 AM 梦龙董 wrote: > > On Tue, Mar 12, 2024 at 10:09 AM Alexei Starovoitov > wrote: > > > > On Mon, Mar 11, 2024 at 7:01 PM 梦龙董 wrote: > > > > > > On Tue, Mar 12, 2024 at 9:46 AM Alexei Starovoitov > > > wrote: > > > > > > > > On Mon, Mar 11, 2024 at 2:34 AM Menglong

Re: [External] Re: [PATCH bpf-next v2 8/9] libbpf: add support for the multi-link of tracing

2024-03-11 Thread 梦龙董
On Tue, Mar 12, 2024 at 9:56 AM Alexei Starovoitov wrote: > > On Mon, Mar 11, 2024 at 2:35 AM Menglong Dong > wrote: > > > > > > - err = libbpf_find_attach_btf_id(prog, attach_name, > > _obj_fd, _type_id); > > + name_end = strchr(attach_name, ','); > > +

Re: [External] Re: [PATCH bpf-next v2 1/9] bpf: tracing: add support to record and check the accessed args

2024-03-11 Thread 梦龙董
On Tue, Mar 12, 2024 at 10:09 AM Alexei Starovoitov wrote: > > On Mon, Mar 11, 2024 at 7:01 PM 梦龙董 wrote: > > > > On Tue, Mar 12, 2024 at 9:46 AM Alexei Starovoitov > > wrote: > > > > > > On Mon, Mar 11, 2024 at 2:34 AM Menglong Dong > > > wrote: > > > > > > > > In this commit, we add the

Re: [External] Re: [PATCH bpf-next v2 7/9] libbpf: don't free btf if program of multi-link tracing existing

2024-03-11 Thread Alexei Starovoitov
On Mon, Mar 11, 2024 at 7:05 PM 梦龙董 wrote: > > > > > > > +LIBBPF_API void bpf_object__free_btfs(struct bpf_object *obj); > > > + > > > > It shouldn't be exported. > > libbpf should clean it up when bpf_object is freed. > > Yes, libbpf will clean up the btfs when bpf_object is freed in > this

Re: [External] Re: [PATCH bpf-next v2 1/9] bpf: tracing: add support to record and check the accessed args

2024-03-11 Thread Alexei Starovoitov
On Mon, Mar 11, 2024 at 7:01 PM 梦龙董 wrote: > > On Tue, Mar 12, 2024 at 9:46 AM Alexei Starovoitov > wrote: > > > > On Mon, Mar 11, 2024 at 2:34 AM Menglong Dong > > wrote: > > > > > > In this commit, we add the 'accessed_args' field to struct bpf_prog_aux, > > > which is used to record the

Re: [External] Re: [PATCH bpf-next v2 7/9] libbpf: don't free btf if program of multi-link tracing existing

2024-03-11 Thread 梦龙董
On Tue, Mar 12, 2024 at 9:55 AM Alexei Starovoitov wrote: > > On Mon, Mar 11, 2024 at 2:35 AM Menglong Dong > wrote: > > > > By default, the kernel btf that we load during loading program will be > > freed after the programs are loaded in bpf_object_load(). However, we > > still need to use

Re: [External] Re: [PATCH bpf-next v2 1/9] bpf: tracing: add support to record and check the accessed args

2024-03-11 Thread 梦龙董
On Tue, Mar 12, 2024 at 9:46 AM Alexei Starovoitov wrote: > > On Mon, Mar 11, 2024 at 2:34 AM Menglong Dong > wrote: > > > > In this commit, we add the 'accessed_args' field to struct bpf_prog_aux, > > which is used to record the accessed index of the function args in > > btf_ctx_access(). > > >

Re: [PATCH bpf-next v2 8/9] libbpf: add support for the multi-link of tracing

2024-03-11 Thread Alexei Starovoitov
On Mon, Mar 11, 2024 at 2:35 AM Menglong Dong wrote: > > > - err = libbpf_find_attach_btf_id(prog, attach_name, > _obj_fd, _type_id); > + name_end = strchr(attach_name, ','); > + /* for multi-link tracing, use the first target symbol during > +

Re: [PATCH bpf-next v2 7/9] libbpf: don't free btf if program of multi-link tracing existing

2024-03-11 Thread Alexei Starovoitov
On Mon, Mar 11, 2024 at 2:35 AM Menglong Dong wrote: > > By default, the kernel btf that we load during loading program will be > freed after the programs are loaded in bpf_object_load(). However, we > still need to use these btf for tracing of multi-link during attaching. > Therefore, we don't

Re: [External] Re: [PATCH bpf-next v2 2/9] bpf: refactor the modules_array to ptr_array

2024-03-11 Thread 梦龙董
On Tue, Mar 12, 2024 at 9:49 AM Alexei Starovoitov wrote: > > On Mon, Mar 11, 2024 at 2:34 AM Menglong Dong > wrote: > > > > Refactor the struct modules_array to more general struct ptr_array, which > > is used to store the pointers. > > > > Meanwhiles, introduce the bpf_try_add_ptr(), which

Re: [PATCH bpf-next v2 5/9] bpf: verifier: add btf to the function args of bpf_check_attach_target

2024-03-11 Thread Alexei Starovoitov
On Mon, Mar 11, 2024 at 2:35 AM Menglong Dong wrote: > > Add target btf to the function args of bpf_check_attach_target(), then > the caller can specify the btf to check. > > Signed-off-by: Menglong Dong > --- > include/linux/bpf_verifier.h | 1 + > kernel/bpf/syscall.c | 6 -- >

Re: [PATCH bpf-next v2 2/9] bpf: refactor the modules_array to ptr_array

2024-03-11 Thread Alexei Starovoitov
On Mon, Mar 11, 2024 at 2:34 AM Menglong Dong wrote: > > Refactor the struct modules_array to more general struct ptr_array, which > is used to store the pointers. > > Meanwhiles, introduce the bpf_try_add_ptr(), which checks the existing of > the ptr before adding it to the array. > > Seems it

Re: [PATCH bpf-next v2 1/9] bpf: tracing: add support to record and check the accessed args

2024-03-11 Thread Alexei Starovoitov
On Mon, Mar 11, 2024 at 2:34 AM Menglong Dong wrote: > > In this commit, we add the 'accessed_args' field to struct bpf_prog_aux, > which is used to record the accessed index of the function args in > btf_ctx_access(). > > Meanwhile, we add the function btf_check_func_part_match() to compare the

Re: [External] Re: [PATCH bpf-next v2 8/9] libbpf: add support for the multi-link of tracing

2024-03-11 Thread 梦龙董
On Mon, Mar 11, 2024 at 11:29 PM Quentin Monnet wrote: > > 2024-03-11 09:35 UTC+ ~ Menglong Dong > > Add support for the attach types of: > > > > BPF_TRACE_FENTRY_MULTI > > BPF_TRACE_FEXIT_MULTI > > BPF_MODIFY_RETURN_MULTI > > > > Signed-off-by: Menglong Dong > > --- > >

Re: [PATCH] selftests: x86: skip the tests if prerequisites aren't fulfilled

2024-03-11 Thread Binbin Wu
On 3/8/2024 2:37 AM, Muhammad Usama Anjum wrote: diff --git a/tools/testing/selftests/x86/lam.c b/tools/testing/selftests/x86/lam.c index 215b8150b7cca..c0f016f45ee17 100644 --- a/tools/testing/selftests/x86/lam.c +++ b/tools/testing/selftests/x86/lam.c @@ -1183,7 +1183,7 @@ int main(int

[GIT PULL] execve updates for v6.9-rc1

2024-03-11 Thread Kees Cook
Hi Linus, Please pull these small execve updates for v6.9-rc1. Details below. Thanks! -Kees The following changes since commit 41bccc98fb7931d63d03f326a746ac4d429c1dd3: Linux 6.8-rc2 (2024-01-28 17:01:12 -0800) are available in the Git repository at:

Re: BUG selftests/mm]

2024-03-11 Thread Jiaqi Yan
On Mon, Mar 11, 2024 at 2:27 PM James Houghton wrote: > > On Mon, Mar 11, 2024 at 12:28 PM Peter Xu wrote: > > > > On Mon, Mar 11, 2024 at 11:59:59AM -0700, Axel Rasmussen wrote: > > > I'd prefer not to require root or CAP_SYS_ADMIN or similar for > > > UFFDIO_POISON, because those control

Re: [PATCH net-next 00/15] selftests: mptcp: various improvements

2024-03-11 Thread patchwork-bot+netdevbpf
Hello: This series was applied to netdev/net-next.git (main) by Jakub Kicinski : On Fri, 08 Mar 2024 23:10:07 +0100 you wrote: > In this series from Geliang, there are various improvements in MPTCP > selftests: sharing code, doing actions the same way, colours, etc. > > Patch 1 prints all error

Re: [PATCH bpf-next v2 6/9] bpf: tracing: add multi-link support

2024-03-11 Thread kernel test robot
Hi Menglong, kernel test robot noticed the following build errors: [auto build test ERROR on bpf-next/master] url: https://github.com/intel-lab-lkp/linux/commits/Menglong-Dong/bpf-tracing-add-support-to-record-and-check-the-accessed-args/20240311-173954 base: https://git.kernel.org/pub

Re: BUG selftests/mm]

2024-03-11 Thread James Houghton
On Mon, Mar 11, 2024 at 12:28 PM Peter Xu wrote: > > On Mon, Mar 11, 2024 at 11:59:59AM -0700, Axel Rasmussen wrote: > > I'd prefer not to require root or CAP_SYS_ADMIN or similar for > > UFFDIO_POISON, because those control access to lots more things > > besides, which we don't necessarily want

Re: [PATCH v1 02/13] libbpf: Make __printf define conditional

2024-03-11 Thread Andrii Nakryiko
On Mon, Mar 11, 2024 at 11:54 AM Ian Rogers wrote: > > On Mon, Mar 11, 2024 at 10:49 AM Andrii Nakryiko > wrote: > > > > On Sat, Mar 9, 2024 at 6:05 PM Ian Rogers wrote: > > > > > > libbpf depends upon linux/err.h which has a linux/compiler.h > > > dependency. In the kernel includes, as opposed

Re: [PATCH v1 12/13] tools headers: Sync compiler.h headers

2024-03-11 Thread Arnaldo Carvalho de Melo
On Mon, Mar 11, 2024 at 12:24:24PM -0700, Ian Rogers wrote: > 5) headers we have just so we can use shell scripts to scrape > constants for beautifying things in perf trace > (5) feels like the headers should be alongside the shell scripts to > avoid polluting tools/include. > Not that I propose

Re: BUG selftests/mm]

2024-03-11 Thread Peter Xu
On Mon, Mar 11, 2024 at 11:59:59AM -0700, Axel Rasmussen wrote: > I'd prefer not to require root or CAP_SYS_ADMIN or similar for > UFFDIO_POISON, because those control access to lots more things > besides, which we don't necessarily want the process using UFFD to be > able to do. :/ > >

Re: [PATCH v1 12/13] tools headers: Sync compiler.h headers

2024-03-11 Thread Ian Rogers
On Mon, Mar 11, 2024 at 9:34 AM James Clark wrote: > > > > On 10/03/2024 02:05, Ian Rogers wrote: > > compiler.h - synced from include/linux/compiler.h, guards were > > added to definitions to avoid redefinition of macros > > in libc. ftrace, CONFIG_OBJTOOL and kentry logic was removed as > >

Re: [PATCH v2 04/31] ntsync: Introduce NTSYNC_IOC_WAIT_ANY.

2024-03-11 Thread Elizabeth Figura
On Monday, 19 February 2024 16:38:06 CDT Elizabeth Figura wrote: > +static struct ntsync_obj *get_obj(struct ntsync_device *dev, int fd) > +{ > + struct file *file = fget(fd); > + struct ntsync_obj *obj; > + > + if (file->f_op != _obj_fops) { > + fput(file); > +

Re: BUG selftests/mm]

2024-03-11 Thread Axel Rasmussen
On Mon, Mar 11, 2024 at 8:12 AM Peter Xu wrote: > > On Mon, Mar 11, 2024 at 03:48:14PM +0100, David Hildenbrand wrote: > > On 11.03.24 15:35, Peter Xu wrote: > > > On Mon, Mar 11, 2024 at 10:31:41AM +0100, David Hildenbrand wrote: > > > > On 09.03.24 20:12, Mirsad Todorovac wrote: > > > > > Hi, >

Re: [PATCH bpf-next v2 6/9] bpf: tracing: add multi-link support

2024-03-11 Thread kernel test robot
Hi Menglong, kernel test robot noticed the following build errors: [auto build test ERROR on bpf-next/master] url: https://github.com/intel-lab-lkp/linux/commits/Menglong-Dong/bpf-tracing-add-support-to-record-and-check-the-accessed-args/20240311-173954 base: https://git.kernel.org/pub

Re: [PATCH v1 02/13] libbpf: Make __printf define conditional

2024-03-11 Thread Ian Rogers
On Mon, Mar 11, 2024 at 10:49 AM Andrii Nakryiko wrote: > > On Sat, Mar 9, 2024 at 6:05 PM Ian Rogers wrote: > > > > libbpf depends upon linux/err.h which has a linux/compiler.h > > dependency. In the kernel includes, as opposed to the tools version, > > linux/compiler.h includes

Re: [GIT PULL] KUnit next update for Linux 6.9-rc1

2024-03-11 Thread pr-tracker-bot
The pull request you sent on Wed, 6 Mar 2024 19:11:42 -0700: > git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest > tags/linux_kselftest-kunit-6.9-rc1 has been merged into torvalds/linux.git: https://git.kernel.org/torvalds/c/97ec9715a84e6f0979242e1ea98b9af1a39acf3b Thank you!

Re: [GIT PULL] Kselftest next update for Linux 6.9-rc1

2024-03-11 Thread pr-tracker-bot
The pull request you sent on Wed, 6 Mar 2024 16:54:43 -0700: > git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest > tags/linux_kselftest-next-6.9-rc1 has been merged into torvalds/linux.git: https://git.kernel.org/torvalds/c/d451b075f776180c6974fd7bc06296829edc2631 Thank you!

Re: [PATCH v1 02/13] libbpf: Make __printf define conditional

2024-03-11 Thread Andrii Nakryiko
On Sat, Mar 9, 2024 at 6:05 PM Ian Rogers wrote: > > libbpf depends upon linux/err.h which has a linux/compiler.h > dependency. In the kernel includes, as opposed to the tools version, > linux/compiler.h includes linux/compiler_attributes.h which defines > __printf. As the libbpf.c __printf

Re: [PATCH] selftests: x86: skip the tests if prerequisites aren't fulfilled

2024-03-11 Thread Chang S. Bae
On 3/11/2024 10:02 AM, Muhammad Usama Anjum wrote: On 3/9/24 6:06 AM, Chang S. Bae wrote: On 3/7/2024 10:37 AM, Muhammad Usama Anjum wrote: -static void check_cpuid_xtiledata(void) +static int check_cpuid_xtiledata(void)   {   uint32_t eax, ebx, ecx, edx;   @@ -153,12 +160,16 @@ static

Re: [PATCH 1/3] selftests/exec: Add the overall result line accourding to TAP

2024-03-11 Thread Muhammad Usama Anjum
Soft reminder! On 3/4/24 8:59 PM, Muhammad Usama Anjum wrote: > The following line is missing from the test's execution. Add it to make > it fully TAP conformant: > # Totals: pass:27 fail:0 xfail:0 xpass:0 skip:0 error:0 > > Signed-off-by: Muhammad Usama Anjum > --- >

Re: [Test Failure Report] exec: Test failures in execveat

2024-03-11 Thread Muhammad Usama Anjum
On 3/8/24 1:39 AM, Kees Cook wrote: > On Thu, Mar 07, 2024 at 02:22:27PM +0500, Muhammad Usama Anjum wrote: >> I've tested this patch. Still getting same failures. > > Okay, thanks for testing! > > What environment are you testing under? It would seem like some unexpected > userspace conditions

Re: [PATCH] selftests: x86: skip the tests if prerequisites aren't fulfilled

2024-03-11 Thread Muhammad Usama Anjum
On 3/9/24 6:06 AM, Chang S. Bae wrote: > On 3/7/2024 10:37 AM, Muhammad Usama Anjum wrote: >> >> diff --git a/tools/testing/selftests/x86/amx.c >> b/tools/testing/selftests/x86/amx.c >> index d884fd69dd510..5d1ca0bbaaae7 100644 >> --- a/tools/testing/selftests/x86/amx.c >> +++

Re: [PATCH v1 12/13] tools headers: Sync compiler.h headers

2024-03-11 Thread James Clark
On 10/03/2024 02:05, Ian Rogers wrote: > compiler.h - synced from include/linux/compiler.h, guards were > added to definitions to avoid redefinition of macros > in libc. ftrace, CONFIG_OBJTOOL and kentry logic was removed as > redundant. > Hi Ian, This commit breaks the Arm build (and

Re: [BUG net-next] fcnal-test.sh: 4 (four) tests FAIL

2024-03-11 Thread David Ahern
On 3/11/24 10:17 AM, Jakub Kicinski wrote: > On Sat, 9 Mar 2024 19:45:15 +0100 Mirsad Todorovac wrote: >> In the vanilla net-next tree build of v6.8-rc7-2348-g75c2946db360, with >> up-to-date >> iproute2 built tools, fcnal-test.sh reports certain failures: >> >>

Re: [PATCH v1 13/13] tools headers: Rename noinline to __noinline

2024-03-11 Thread Nick Desaulniers
On Mon, Mar 11, 2024 at 8:44 AM Michael S. Tsirkin wrote: > > On Sat, Mar 09, 2024 at 06:05:08PM -0800, Ian Rogers wrote: > > An issue was reported with clang and llvm libc where the noinline > > attribute [1] was being expanded due to the #define in > > linux/compiler.h (now in

Re: [BUG net-next] fcnal-test.sh: 4 (four) tests FAIL

2024-03-11 Thread Jakub Kicinski
On Sat, 9 Mar 2024 19:45:15 +0100 Mirsad Todorovac wrote: > In the vanilla net-next tree build of v6.8-rc7-2348-g75c2946db360, with > up-to-date > iproute2 built tools, fcnal-test.sh reports certain failures: > >

Re: [PATCH v1 13/13] tools headers: Rename noinline to __noinline

2024-03-11 Thread Michael S. Tsirkin
On Sat, Mar 09, 2024 at 06:05:08PM -0800, Ian Rogers wrote: > An issue was reported with clang and llvm libc where the noinline > attribute [1] was being expanded due to the #define in > linux/compiler.h (now in compiler_attributes.h). The expansion caused > the __attribute__ to appear twice and

Re: [PATCH v1 13/13] tools headers: Rename noinline to __noinline

2024-03-11 Thread Nick Desaulniers
On Sun, Mar 10, 2024 at 4:25 AM Miguel Ojeda wrote: > > On Sun, Mar 10, 2024 at 3:06 AM Ian Rogers wrote: > > > > [1] https://clang.llvm.org/docs/AttributeReference.html#noinline > > Reported-by: Christopher Di Bella > > Out of curiosity, was this due to the `[[gnu::noinline]]` or similar > in

Re: [PATCH bpf-next v2 8/9] libbpf: add support for the multi-link of tracing

2024-03-11 Thread Quentin Monnet
2024-03-11 09:35 UTC+ ~ Menglong Dong > Add support for the attach types of: > > BPF_TRACE_FENTRY_MULTI > BPF_TRACE_FEXIT_MULTI > BPF_MODIFY_RETURN_MULTI > > Signed-off-by: Menglong Dong > --- > tools/bpf/bpftool/common.c | 3 + > tools/lib/bpf/bpf.c| 10 +++ >

Re: [PATCH AUTOSEL 6.7 14/23] selftests: mptcp: explicitly trigger the listener diag code-path

2024-03-11 Thread Matthieu Baerts
Hi Sasha, On 11/03/2024 16:11, Sasha Levin wrote: > From: Paolo Abeni > > [ Upstream commit b4b51d36bbaa3ddb93b3e1ca3a1ef0aa629d6521 ] Thank you for having backported this patch to v6.7 and v6.6 versions. But it looks like it depends on commit 9369777c2939 ("selftests: mptcp: add

[PATCH AUTOSEL 6.6 09/17] selftests: mptcp: explicitly trigger the listener diag code-path

2024-03-11 Thread Sasha Levin
From: Paolo Abeni [ Upstream commit b4b51d36bbaa3ddb93b3e1ca3a1ef0aa629d6521 ] The mptcp diag interface already experienced a few locking bugs that lockdep and appropriate coverage have detected in advance. Let's add a test-case triggering the relevant code path, to prevent similar issues in

[PATCH AUTOSEL 6.7 14/23] selftests: mptcp: explicitly trigger the listener diag code-path

2024-03-11 Thread Sasha Levin
From: Paolo Abeni [ Upstream commit b4b51d36bbaa3ddb93b3e1ca3a1ef0aa629d6521 ] The mptcp diag interface already experienced a few locking bugs that lockdep and appropriate coverage have detected in advance. Let's add a test-case triggering the relevant code path, to prevent similar issues in

Re: BUG selftests/mm]

2024-03-11 Thread Peter Xu
On Mon, Mar 11, 2024 at 03:48:14PM +0100, David Hildenbrand wrote: > On 11.03.24 15:35, Peter Xu wrote: > > On Mon, Mar 11, 2024 at 10:31:41AM +0100, David Hildenbrand wrote: > > > On 09.03.24 20:12, Mirsad Todorovac wrote: > > > > Hi, > > > > > > > > Routine run of the test in net-next gave also

Re: BUG selftests/mm]

2024-03-11 Thread David Hildenbrand
On 11.03.24 15:35, Peter Xu wrote: On Mon, Mar 11, 2024 at 10:31:41AM +0100, David Hildenbrand wrote: On 09.03.24 20:12, Mirsad Todorovac wrote: Hi, Routine run of the test in net-next gave also this mm unit error. root@defiant:tools/testing/selftests/mm# ./uffd-unit-tests Testing UFFDIO_API

Re: BUG selftests/mm]

2024-03-11 Thread Peter Xu
On Mon, Mar 11, 2024 at 10:31:41AM +0100, David Hildenbrand wrote: > On 09.03.24 20:12, Mirsad Todorovac wrote: > > Hi, > > > > Routine run of the test in net-next gave also this mm unit error. > > > > root@defiant:tools/testing/selftests/mm# ./uffd-unit-tests > > Testing UFFDIO_API (with

[PATCH v2 13/13] selftests/resctrl: Remove test name comparing from write_bm_pid_to_resctrl()

2024-03-11 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. Only MBM and CMT tests define mongrp so the test name check in write_bm_pid_to_resctrl() can be changed to depend simply on mongrp being non-NULL. With last

[PATCH v2 12/13] selftests/resctrl: Remove mongrp from MBA test

2024-03-11 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 --- tools/testing/selftests/resctrl/mba_test.c | 1 - 1 file

[PATCH v2 11/13] selftests/resctrl: Convert ctrlgrp & mongrp to pointers

2024-03-11 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.

[PATCH v2 10/13] selftests/resctrl: Make some strings passed to resctrlfs functions const

2024-03-11 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 --- tools/testing/selftests/resctrl/resctrl.h | 7 ---

[PATCH v2 09/13] selftests/resctrl: Simplify bandwidth report type handling

2024-03-11 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 v2 08/13] selftests/resctrl: Add ->init() callback into resctrl_val_param

2024-03-11 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

[PATCH v2 07/13] selftests/resctrl: Add ->measure() callback to resctrl_val_param

2024-03-11 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 v2 06/13] selftests/resctrl: Rename measure_vals() to measure_mem_bw_vals() & document

2024-03-11 Thread Ilpo Järvinen
measure_val() 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 --- tools/testing/selftests/resctrl/resctrl_val.c | 12 +--- 1 file changed, 9 insertions(+), 3 deletions(-) diff

[PATCH v2 05/13] selftests/resctrl: Cleanup bm_pid and ppid usage & limit scope

2024-03-11 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 v2 04/13] selftests/resctrl: Use correct type for pids

2024-03-11 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. Signed-off-by: Ilpo Järvinen --- tools/testing/selftests/resctrl/cache.c | 6 +++--- tools/testing/selftests/resctrl/resctrl.h | 4 ++--

[PATCH v2 03/13] selftests/resctrl: Consolidate get_domain_id() into resctrl_val()

2024-03-11 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

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

2024-03-11 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

[PATCH v2 01/13] selftests/resctrl: Convert get_mem_bw_imc() fd close to for loop

2024-03-11 Thread Ilpo Järvinen
The open() side handles fds in a for loop but close() is based on two fixed indexes READ and WRITE. Match the close() side with the open() side by using for loop for consistency. Signed-off-by: Ilpo Järvinen --- tools/testing/selftests/resctrl/resctrl_val.c | 7 +++ 1 file changed, 3

[PATCH v2 00/13] selftests/resctrl: resctrl_val() related cleanups & improvements

2024-03-11 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. One of the changes improves MBA/MBM measurement by narrowing down the period the resctrl FS derived memory bandwidth numbers are measured over. My feel

Re: [PATCH net-next v3 4/4] net: gro: move L3 flush checks to tcp_gro_receive

2024-03-11 Thread Willem de Bruijn
Richard Gobert wrote: > Willem de Bruijn wrote: > > Richard Gobert wrote: > >> Eric Dumazet wrote: > >>> On Sat, Mar 9, 2024 at 4:35 PM Richard Gobert > >>> wrote: > > {inet,ipv6}_gro_receive functions perform flush checks (ttl, flags, > iph->id, ...) against all packets in a

Re: [PATCH net-next v3 4/4] net: gro: move L3 flush checks to tcp_gro_receive

2024-03-11 Thread Richard Gobert
Willem de Bruijn wrote: > Richard Gobert wrote: >> Eric Dumazet wrote: >>> On Sat, Mar 9, 2024 at 4:35 PM Richard Gobert >>> wrote: {inet,ipv6}_gro_receive functions perform flush checks (ttl, flags, iph->id, ...) against all packets in a loop. These flush checks are relevant

Re: [PATCH] selftests: x86: skip the tests if prerequisites aren't fulfilled

2024-03-11 Thread Kirill A. Shutemov
On Thu, Mar 07, 2024 at 11:37:22PM +0500, Muhammad Usama Anjum wrote: > diff --git a/tools/testing/selftests/x86/lam.c > b/tools/testing/selftests/x86/lam.c > index 215b8150b7cca..c0f016f45ee17 100644 > --- a/tools/testing/selftests/x86/lam.c > +++ b/tools/testing/selftests/x86/lam.c > @@ -1183,7

Re: [PATCH net-next v3 4/4] net: gro: move L3 flush checks to tcp_gro_receive

2024-03-11 Thread Willem de Bruijn
Richard Gobert wrote: > Eric Dumazet wrote: > > On Sat, Mar 9, 2024 at 4:35 PM Richard Gobert > > wrote: > >> > >> {inet,ipv6}_gro_receive functions perform flush checks (ttl, flags, > >> iph->id, ...) against all packets in a loop. These flush checks are > >> relevant only to tcp flows, and as

[PATCH bpf-next v2 9/9] selftests/bpf: add testcases for multi-link of tracing

2024-03-11 Thread Menglong Dong
In this commit, we add some testcases for the following attach types: BPF_TRACE_FENTRY_MULTI BPF_TRACE_FEXIT_MULTI BPF_MODIFY_RETURN_MULTI Signed-off-by: Menglong Dong --- net/bpf/test_run.c| 3 + .../selftests/bpf/bpf_testmod/bpf_testmod.c | 49

[PATCH bpf-next v2 8/9] libbpf: add support for the multi-link of tracing

2024-03-11 Thread Menglong Dong
Add support for the attach types of: BPF_TRACE_FENTRY_MULTI BPF_TRACE_FEXIT_MULTI BPF_MODIFY_RETURN_MULTI Signed-off-by: Menglong Dong --- tools/bpf/bpftool/common.c | 3 + tools/lib/bpf/bpf.c| 10 +++ tools/lib/bpf/bpf.h| 6 ++ tools/lib/bpf/libbpf.c | 168

[PATCH bpf-next v2 7/9] libbpf: don't free btf if program of multi-link tracing existing

2024-03-11 Thread Menglong Dong
By default, the kernel btf that we load during loading program will be freed after the programs are loaded in bpf_object_load(). However, we still need to use these btf for tracing of multi-link during attaching. Therefore, we don't free the btfs until the bpf object is closed if any bpf programs

[PATCH bpf-next v2 6/9] bpf: tracing: add multi-link support

2024-03-11 Thread Menglong Dong
In this commit, we add the support to allow attaching a tracing BPF program to multi hooks, which is similar to BPF_TRACE_KPROBE_MULTI. The use case is obvious. For now, we have to create a BPF program for each kernel function, for which we want to trace, even through all the program have the

[PATCH bpf-next v2 5/9] bpf: verifier: add btf to the function args of bpf_check_attach_target

2024-03-11 Thread Menglong Dong
Add target btf to the function args of bpf_check_attach_target(), then the caller can specify the btf to check. Signed-off-by: Menglong Dong --- include/linux/bpf_verifier.h | 1 + kernel/bpf/syscall.c | 6 -- kernel/bpf/trampoline.c | 1 + kernel/bpf/verifier.c| 8

[PATCH bpf-next v2 4/9] bpf: trampoline: introduce bpf_tramp_multi_link

2024-03-11 Thread Menglong Dong
Introduce the struct bpf_tramp_multi_link, which is used to attach a bpf_link to multi trampoline. Meanwhile, introduce corresponding function bpf_trampoline_multi_{link,unlink}_prog. Signed-off-by: Menglong Dong --- include/linux/bpf.h | 14 kernel/bpf/trampoline.c | 47

[PATCH bpf-next v2 3/9] bpf: trampoline: introduce struct bpf_tramp_link_conn

2024-03-11 Thread Menglong Dong
For now, bpf_tramp_link is added to the hash list of tr->progs_hlist when attaching. This means that bpf_link and trampoline is one-to-one, and is not friendly to the multi-link trampoline that we commit in the following patches. Therefore, now we introduce the struct bpf_tramp_link_conn to be

[PATCH bpf-next v2 2/9] bpf: refactor the modules_array to ptr_array

2024-03-11 Thread Menglong Dong
Refactor the struct modules_array to more general struct ptr_array, which is used to store the pointers. Meanwhiles, introduce the bpf_try_add_ptr(), which checks the existing of the ptr before adding it to the array. Seems it should be moved to another files in "lib", and I'm not sure where to

[PATCH bpf-next v2 1/9] bpf: tracing: add support to record and check the accessed args

2024-03-11 Thread Menglong Dong
In this commit, we add the 'accessed_args' field to struct bpf_prog_aux, which is used to record the accessed index of the function args in btf_ctx_access(). Meanwhile, we add the function btf_check_func_part_match() to compare the accessed function args of two function prototype. This function

[PATCH bpf-next v2 0/9] bpf: make tracing program support multi-link

2024-03-11 Thread Menglong Dong
For now, the BPF program of type BPF_PROG_TYPE_TRACING is not allowed to be attached to multiple hooks, and we have to create a BPF program for each kernel function, for which we want to trace, even through all the program have the same (or similar) logic. This can consume extra memory, and make

Re: BUG selftests/mm]

2024-03-11 Thread David Hildenbrand
On 09.03.24 20:12, Mirsad Todorovac wrote: Hi, Routine run of the test in net-next gave also this mm unit error. root@defiant:tools/testing/selftests/mm# ./uffd-unit-tests Testing UFFDIO_API (with syscall)... done Testing UFFDIO_API (with /dev/userfaultfd)... done Testing register-ioctls on

RE: [PATCH 1/8] iommu: Introduce a replace API for device pasid

2024-03-11 Thread Tian, Kevin
> From: Liu, Yi L > Sent: Sunday, March 10, 2024 9:06 PM > > On 2024/1/16 01:19, Jason Gunthorpe wrote: > > On Sun, Nov 26, 2023 at 10:34:21PM -0800, Yi Liu wrote: > >> +int iommu_replace_device_pasid(struct iommu_domain *domain, > >> + struct device *dev, ioasid_t pasid)

Re: [PATCH net-next v3 4/4] net: gro: move L3 flush checks to tcp_gro_receive

2024-03-11 Thread Richard Gobert
Willem de Bruijn wrote: > Richard Gobert wrote: >> {inet,ipv6}_gro_receive functions perform flush checks (ttl, flags, >> iph->id, ...) against all packets in a loop. These flush checks are >> relevant only to tcp flows, and as such they're used to determine whether >> the packets can be merged

Re: [PATCH net-next v3 4/4] net: gro: move L3 flush checks to tcp_gro_receive

2024-03-11 Thread Richard Gobert
Eric Dumazet wrote: > On Sat, Mar 9, 2024 at 4:35 PM Richard Gobert > wrote: >> >> {inet,ipv6}_gro_receive functions perform flush checks (ttl, flags, >> iph->id, ...) against all packets in a loop. These flush checks are >> relevant only to tcp flows, and as such they're used to determine

Re: [PATCH 1/3] kci-gitlab: Introducing GitLab-CI Pipeline for Kernel Testing

2024-03-11 Thread Maxime Ripard
Hi Nicolas, On Thu, Mar 07, 2024 at 01:05:12PM -0500, Nicolas Dufresne wrote: > Le jeudi 29 février 2024 à 10:02 +0100, Maxime Ripard a écrit : > > On Wed, Feb 28, 2024 at 07:55:25PM -0300, Helen Koike wrote: > > > This patch introduces a `.gitlab-ci` file along with a `ci/` folder, > > >