Re: [PATCH v3] selftests/mm: use asm volatile to not optimize mmap read variable

2024-06-07 Thread Andrew Morton
On Thu, 6 Jun 2024 20:36:19 + "Pankaj Raghav (Samsung)" wrote: > From: Pankaj Raghav > > create_pagecache_thp_and_fd() in split_huge_page_test.c used the > variable dummy to perform mmap read. > > However, this test was skipped even on XFS which has large folio > support. The issue was c

Re: [PATCH v1 0/1] mm/memfd: add documentation for MFD_NOEXEC_SEAL

2024-06-07 Thread Jeff Xu
Resent, (previous email is not plain text) Hi On Fri, Jun 7, 2024 at 2:41 PM Barnabás Pőcze wrote: > > Hi > > > 2024. június 7., péntek 22:35 keltezéssel, jef...@chromium.org > írta: > > > From: Jeff Xu > > > > When MFD_NOEXEC_SEAL was introduced, there was one big mistake: it > > didn't have

Re: [PATCH 3/5] mm/selftests: kvm, mdwe fixes to avoid requiring "make headers"

2024-06-07 Thread John Hubbard
On 6/7/24 7:10 PM, John Hubbard wrote: On Ubuntu 23.04, the kvm and mdwe selftests/mm build fails due to missing a few items that are found in prctl.h. Here is an excerpt of the build failures: The subject line is confused: it really should start with "selftests/mm", not "mm/selftests". :) th

[PATCH 5/5] selftests/mm: mseal, self_elf: rename TEST_END_CHECK to REPORT_TEST_PASS

2024-06-07 Thread John Hubbard
Now that the test macros are factored out into their final location, and simplified, it's time to rename TEST_END_CHECK to something that represents its new functionality: REPORT_TEST_PASS. Cc: Jeff Xu Signed-off-by: John Hubbard --- tools/testing/selftests/mm/mseal_helpers.h | 2 +- tools/tes

[PATCH 4/5] selftests/mm: mseal, self_elf: factor out test macros and other duplicated items

2024-06-07 Thread John Hubbard
Clean up and move some copy-pasted items into mseal_helpers.h. 1. The test macros can be made safer and simpler, by observing that they are invariably called when about to return. This means that the macros do not need an intrusive label to goto; they can simply return. 2. PKEY* items. We cannot,

[PATCH 3/5] mm/selftests: kvm, mdwe fixes to avoid requiring "make headers"

2024-06-07 Thread John Hubbard
On Ubuntu 23.04, the kvm and mdwe selftests/mm build fails due to missing a few items that are found in prctl.h. Here is an excerpt of the build failures: ksm_tests.c:252:13: error: use of undeclared identifier 'PR_SET_MEMORY_MERGE' ... mdwe_test.c:26:18: error: use of undeclared identifier 'PR_SE

[PATCH 1/5] selftests/mm: mseal, self_elf: fix missing __NR_mseal

2024-06-07 Thread John Hubbard
The selftests/mm build isn't exactly "broken", according to the current documentation, which still claims that one must run "make headers", before building the kselftests. However, according to the new plan to get rid of that requirement [1], they are future-broken: attempting to build selftests/mm

[PATCH 2/5] selftests/mm: fix vm_util.c build failures: add snapshot of fs.h

2024-06-07 Thread John Hubbard
On Ubuntu 23.04, on a clean git tree, the selftests/mm build fails due 10 or 20 missing items, all of which are found in fs.h, which is created via "make headers". However, as per [1], the idea is to stop requiring "make headers", and instead, take a snapshot of the files and check them in. Here a

[PATCH 0/5] cleanups, fixes, and progress towards avoiding "make headers"

2024-06-07 Thread John Hubbard
Eventually, once the build succeeds on a sufficiently old distro, the idea is to delete $(KHDR_INCLUDES) from the selftests/mm build, and then after that, from selftests/lib.mk and all of the other selftest builds. For now, this series merely achieves a clean build of selftests/mm on a not-so-old

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

2024-06-07 Thread Moger, Babu
Hi Reinette, On 6/7/2024 4:47 PM, Reinette Chatre wrote: Hi Babu, On 6/7/24 11:16 AM, Moger, Babu wrote: On 6/6/2024 6:58 PM, Reinette Chatre wrote: On 6/6/24 4:09 PM, Moger, Babu wrote: @@ -301,15 +320,8 @@ static int noncont_cat_run_test(const struct resctrl_test *test, if (ret

Re: [PATCH v1 1/3] mm/memory-failure: userspace controls soft-offlining hugetlb pages

2024-06-07 Thread Jiaqi Yan
+CC Jane. On Fri, May 31, 2024 at 2:34 PM Jiaqi Yan wrote: > > Correctable memory errors are very common on servers with large > amount of memory, and are corrected by ECC. Soft offline is kernel's > additional recovery handling for memory pages having (excessive) > corrected memory errors. Impac

Re: [PATCH v3 5/7] selftests/x86: avoid -no-pie warnings from clang during compilation

2024-06-07 Thread John Hubbard
On 5/31/24 12:38 PM, John Hubbard wrote: ... diff --git a/tools/testing/selftests/x86/Makefile b/tools/testing/selftests/x86/Makefile index d0bb32bd5538..5c8757a25998 100644 --- a/tools/testing/selftests/x86/Makefile +++ b/tools/testing/selftests/x86/Makefile @@ -40,6 +40,13 @@ CFLAGS := -O2 -g

Re: [PATCH v1 0/3] Userspace controls soft-offline HugeTLB pages

2024-06-07 Thread Jiaqi Yan
On Tue, Jun 4, 2024 at 12:19 AM Miaohe Lin wrote: > > On 2024/6/1 5:34, Jiaqi Yan wrote: > > Correctable memory errors are very common on servers with large > > amount of memory, and are corrected by ECC, but with two > > pain points to users: > > 1. Correction usually happens on the fly and adds

Re: [PATCH 07/10] selftests/pidfd: Fix wrong expectation

2024-06-07 Thread Shuah Khan
On 6/6/24 12:02, Okan Tümüklü wrote: From: Mickaël Salaün Replace a wrong EXPECT_GT(self->child_pid_exited, 0) with EXPECT_GE(), which will be actually tested on the parent and child sides with a following commit. Cc: Shuah Khan Reviewed-by: Kees Cook Reviewed-by: Christian Brauner Link: ht

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

2024-06-07 Thread Reinette Chatre
Hi Babu, On 6/7/24 11:16 AM, Moger, Babu wrote: On 6/6/2024 6:58 PM, Reinette Chatre wrote: On 6/6/24 4:09 PM, Moger, Babu wrote: @@ -301,15 +320,8 @@ static int noncont_cat_run_test(const struct resctrl_test *test, if (ret) return ret; -   if (!strcmp(test->r

Re: [PATCH v1 0/1] mm/memfd: add documentation for MFD_NOEXEC_SEAL

2024-06-07 Thread Barnabás Pőcze
Hi 2024. június 7., péntek 22:35 keltezéssel, jef...@chromium.org írta: > From: Jeff Xu > > When MFD_NOEXEC_SEAL was introduced, there was one big mistake: it > didn't have proper documentation. This led to a lot of confusion, > especially about whether or not memfd created with the MFD_NOEX

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

2024-06-07 Thread John Hubbard
On 6/7/24 2:17 PM, Dave Hansen wrote: On 6/7/24 13:50, Shuah Khan wrote: These patches usually go through x86 repo. I need ack from x86 maintainers to take these. I don't see x86 list cc'ed. Please make sure to include everybody on these threads to get quicker response. John Hubbard (cc'd) h

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

2024-06-07 Thread Dave Hansen
On 6/7/24 13:50, Shuah Khan wrote: > These patches usually go through x86 repo. > > I need ack from x86 maintainers to take these. I don't see x86 list > cc'ed. > > Please make sure to include everybody on these threads to get quicker > response. John Hubbard (cc'd) had a partially overlapping s

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

2024-06-07 Thread Shuah Khan
On 6/7/24 03:53, Laura Nao wrote: 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

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

2024-06-07 Thread Shuah Khan
On 6/7/24 06:41, Amer Al Shanawany wrote: 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

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

2024-06-07 Thread Pankaj Raghav (Samsung)
On Fri, Jun 07, 2024 at 01:06:23PM -0700, Andrew Morton wrote: > 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: I think v3 already had these changes [1] V3: - Fixed the build error when it is compiled wit

Re: [PATCH 0/4] selftest: x86: conform tests to TAP format output

2024-06-07 Thread Shuah Khan
On 5/27/24 23:04, Muhammad Usama Anjum wrote: Kind reminder On 4/14/24 6:18 PM, Muhammad Usama Anjum wrote: In this series, 4 tests are being conformed to TAP. Muhammad Usama Anjum (4): selftests: x86: check_initial_reg_state: conform test to TAP format output selftests: x86: corrup

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

2024-06-07 Thread Shuah Khan
On 5/27/24 23:04, Muhammad Usama Anjum wrote: Soft reminder On 5/1/24 5:29 PM, Muhammad Usama Anjum wrote: This series fixes build errors found by clang to allow the x86 suite to get built with the clang. Unfortunately, there is one bug [1] in the clang becuase of which extended asm isn't hand

[PATCH v1 1/1] mm/memfd: add documentation for MFD_NOEXEC_SEAL MFD_EXEC

2024-06-07 Thread jeffxu
From: Jeff Xu Add documentation for memfd_create flags: FMD_NOEXEC_SEAL and MFD_EXEC Signed-off-by: Jeff Xu --- Documentation/userspace-api/index.rst | 1 + Documentation/userspace-api/mfd_noexec.rst | 86 ++ 2 files changed, 87 insertions(+) create mode 100644 Docum

[PATCH v1 0/1] mm/memfd: add documentation for MFD_NOEXEC_SEAL

2024-06-07 Thread jeffxu
From: Jeff Xu When MFD_NOEXEC_SEAL was introduced, there was one big mistake: it didn't have proper documentation. This led to a lot of confusion, especially about whether or not memfd created with the MFD_NOEXEC_SEAL flag is sealable. Before MFD_NOEXEC_SEAL, memfd had to explicitly set MFD_ALLOW

Re: [PATCH] tools/testing/selftests/x86: add dlclose function in the vdso_restorer.c

2024-06-07 Thread Shuah Khan
On 12/4/23 02:01, liujing wrote: in the main function of vdso_restorer.c,there is a dlopen function, but there is no dlclose function to close the file Explain the change this patch is making in addition to describing the problem. Also tell me how you found this problem. Signed-off-by: liuji

Re: [PATCH 0/4] kselftests: vdso: conform tests to TAP output

2024-06-07 Thread Shuah Khan
On 5/29/24 01:24, Muhammad Usama Anjum wrote: Conform individual tests to TAP output. One patch conform one test. With this series, all vDSO tests become TAP conformant. Muhammad Usama Anjum (4): kselftests: vdso: vdso_test_clock_getres: conform test to TAP output kselftests: vdso: vdso_te

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

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 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

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_

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

[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

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

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] 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 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 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 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 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 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 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 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 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

[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

[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 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 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 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 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 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

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

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 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 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 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

[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

[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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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

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 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

[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 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 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 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 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 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)

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

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 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 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 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 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 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 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,

[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

[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 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 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 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 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 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 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 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 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 ---

  1   2   >