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

2024-05-22 Thread Jeff Xu
On Wed, May 22, 2024 at 7:25 PM Barnabás Pőcze wrote: > > Hi > > > 2024. május 23., csütörtök 1:23 keltezéssel, Andrew Morton > írta: > > > On Wed, 15 May 2024 23:11:12 -0700 Jeff Xu wrote: > > > > > On Mon, May 13, 2024 at 12:15 PM Barnabás Pőcze > > > wrote: > > > > > > > >

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

2024-05-22 Thread Jeff Xu
On Wed, May 22, 2024 at 4:23 PM Andrew Morton wrote: > > On Wed, 15 May 2024 23:11:12 -0700 Jeff Xu wrote: > > > On Mon, May 13, 2024 at 12:15 PM Barnabás Pőcze > > wrote: > > > > > > `MFD_NOEXEC_SEAL` should remove the executable bits and set > > > `F_SEAL_EXEC` to prevent further

Re: [PATCH v5 02/68] kselftest: Desecalate reporting of missing _GNU_SOURCE

2024-05-22 Thread John Hubbard
On 5/22/24 10:46 AM, Edward Liaw wrote: On Wed, May 22, 2024 at 4:21 AM Mark Brown wrote: On Wed, May 22, 2024 at 12:56:48AM +, Edward Liaw wrote: ... You've not provided a Signed-off-by for this so people can't do anything with it, please see Documentation/process/submitting-patches.rst

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

2024-05-22 Thread Barnabás Pőcze
Hi 2024. május 23., csütörtök 1:23 keltezéssel, Andrew Morton írta: > On Wed, 15 May 2024 23:11:12 -0700 Jeff Xu wrote: > > > On Mon, May 13, 2024 at 12:15 PM Barnabás Pőcze > > wrote: > > > > > > `MFD_NOEXEC_SEAL` should remove the executable bits and set > > > `F_SEAL_EXEC` to prevent

Re: [PATCH] riscv: selftests: Add hwprobe binaries to .gitignore

2024-05-22 Thread patchwork-bot+linux-riscv
Hello: This patch was applied to riscv/linux.git (for-next) by Palmer Dabbelt : On Thu, 25 Apr 2024 12:58:03 -0700 you wrote: > The cbo and which-cpu hwprobe selftests leave their artifacts in the > kernel tree and end up being tracked by git. Add the binaries to the > hwprobe selftest

Re: [PATCH] riscv: selftests: Add signal handling vector tests

2024-05-22 Thread patchwork-bot+linux-riscv
Hello: This patch was applied to riscv/linux.git (for-next) by Palmer Dabbelt : On Wed, 03 Apr 2024 16:50:29 -0700 you wrote: > Add two tests to check vector save/restore when a signal is received > during a vector routine. One test ensures that a value is not clobbered > during signal handling.

Re: [PATCH v5 00/68] Define _GNU_SOURCE for sources using

2024-05-22 Thread Shuah Khan
On 5/22/24 17:32, patchwork-bot+linux-ri...@kernel.org wrote: Hello: This series was applied to riscv/linux.git (fixes) by Tejun Heo : On Wed, 22 May 2024 00:56:46 + you wrote: Centralizes the definition of _GNU_SOURCE into KHDR_INCLUDES and removes redefinitions of _GNU_SOURCE from

Re: [PATCH v5 00/68] Define _GNU_SOURCE for sources using

2024-05-22 Thread patchwork-bot+linux-riscv
Hello: This series was applied to riscv/linux.git (fixes) by Tejun Heo : On Wed, 22 May 2024 00:56:46 + you wrote: > Centralizes the definition of _GNU_SOURCE into KHDR_INCLUDES and removes > redefinitions of _GNU_SOURCE from source code. > > 809216233555 ("selftests/harness: remove use of

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

2024-05-22 Thread Andrew Morton
On Wed, 15 May 2024 23:11:12 -0700 Jeff Xu wrote: > On Mon, May 13, 2024 at 12:15 PM Barnabás Pőcze wrote: > > > > `MFD_NOEXEC_SEAL` should remove the executable bits and set > > `F_SEAL_EXEC` to prevent further modifications to the executable > > bits as per the comment in the uapi header

[PATCH] selftests: openat2: don't print total number of tests and then skip

2024-05-22 Thread Muhammad Usama Anjum
Don't print that 88 sub-tests are going to be executed. But then skip. The error is printed that executed test was only 1 while 88 should have run: Old output: TAP version 13 1..88 ok 2 # SKIP all tests require euid == 0 # Planned tests != run tests (88 != 1) # Totals: pass:0 fail:0

Re: [PATCH v5 00/68] Define _GNU_SOURCE for sources using

2024-05-22 Thread Shuah Khan
On 5/22/24 11:44, Edward Liaw wrote: On Wed, May 22, 2024 at 10:13 AM Jakub Kicinski wrote: On Wed, 22 May 2024 10:19:33 -0600 Shuah Khan wrote: On 5/21/24 18:56, Edward Liaw wrote: Centralizes the definition of _GNU_SOURCE into KHDR_INCLUDES and removes redefinitions of _GNU_SOURCE from

Re: [PATCH v5 02/68] kselftest: Desecalate reporting of missing _GNU_SOURCE

2024-05-22 Thread Edward Liaw
On Wed, May 22, 2024 at 4:21 AM Mark Brown wrote: > > On Wed, May 22, 2024 at 12:56:48AM +, Edward Liaw wrote: > > > to make stopping builds early replace the static_assert() with a > > missing without making the error more severe than it already was. This > > will be moot once the issue is

Re: [PATCH v5 00/68] Define _GNU_SOURCE for sources using

2024-05-22 Thread Edward Liaw
On Wed, May 22, 2024 at 10:13 AM Jakub Kicinski wrote: > > On Wed, 22 May 2024 10:19:33 -0600 Shuah Khan wrote: > > On 5/21/24 18:56, Edward Liaw wrote: > > > Centralizes the definition of _GNU_SOURCE into KHDR_INCLUDES and removes > > > redefinitions of _GNU_SOURCE from source code. > > > > > >

Re: [PATCH v5 00/68] Define _GNU_SOURCE for sources using

2024-05-22 Thread Jakub Kicinski
On Wed, 22 May 2024 10:19:33 -0600 Shuah Khan wrote: > On 5/21/24 18:56, Edward Liaw wrote: > > Centralizes the definition of _GNU_SOURCE into KHDR_INCLUDES and removes > > redefinitions of _GNU_SOURCE from source code. > > > > 809216233555 ("selftests/harness: remove use of LINE_MAX") introduced

[PATCH 2/2] selftests/thermel/intel: conform the test to TAP output

2024-05-22 Thread Muhammad Usama Anjum
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 --- .../intel/power_floor/power_floor_test.c | 68 --- 1 file changed, 28 insertions(+), 40

[PATCH 1/2] selftests/thermel/intel: conform the test to TAP output

2024-05-22 Thread Muhammad Usama Anjum
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 --- .../intel/workload_hint/workload_hint_test.c | 98 --- 1 file changed, 39 insertions(+), 59

Re: [PATCH] riscv: selftests: Add signal handling vector tests

2024-05-22 Thread Palmer Dabbelt
On Wed, 03 Apr 2024 16:50:29 PDT (-0700), Charlie Jenkins wrote: Add two tests to check vector save/restore when a signal is received during a vector routine. One test ensures that a value is not clobbered during signal handling. The other verifies that vector registers modified in the signal

Re: [PATCH v5 00/68] Define _GNU_SOURCE for sources using

2024-05-22 Thread Shuah Khan
On 5/22/24 01:42, Paolo Abeni wrote: On Wed, 2024-05-22 at 00:56 +, Edward Liaw wrote: Centralizes the definition of _GNU_SOURCE into KHDR_INCLUDES and removes redefinitions of _GNU_SOURCE from source code. 809216233555 ("selftests/harness: remove use of LINE_MAX") introduced asprintf into

Re: [PATCH v5 00/68] Define _GNU_SOURCE for sources using

2024-05-22 Thread Shuah Khan
On 5/21/24 18:56, Edward Liaw wrote: Centralizes the definition of _GNU_SOURCE into KHDR_INCLUDES and removes redefinitions of _GNU_SOURCE from source code. 809216233555 ("selftests/harness: remove use of LINE_MAX") introduced asprintf into kselftest_harness.h, which is a GNU extension and

Re: [PATCH v5 23/68] selftests/iommu: Drop duplicate -D_GNU_SOURCE

2024-05-22 Thread Jason Gunthorpe
On Wed, May 22, 2024 at 12:57:09AM +, Edward Liaw wrote: > -D_GNU_SOURCE can be de-duplicated here, as it is added by lib.mk. > > Reviewed-by: John Hubbard > Reviewed-by: Muhammad Usama Anjum > Signed-off-by: Edward Liaw > --- > tools/testing/selftests/iommu/Makefile | 2 -- > 1 file

Re: [PATCH v5 57/68] selftests/sgx: Compile with -D_GNU_SOURCE

2024-05-22 Thread Jarkko Sakkinen
On Wed May 22, 2024 at 3:57 AM EEST, Edward Liaw wrote: > Add -D_GNU_SOURCE to HOST_CFLAGS and remove #define _GNU_SOURCE. > > Fixes: 809216233555 ("selftests/harness: remove use of LINE_MAX") > Reported-by: kernel test robot > Closes: >

Re: [PATCH v5 44/68] selftests/powerpc: Drop define _GNU_SOURCE

2024-05-22 Thread Michael Ellerman
Edward Liaw writes: > _GNU_SOURCE is provided by lib.mk, so it should be dropped to prevent > redefinition warnings. Most of these tests build with -Werror, so the duplicate define is actually a hard error. Can you put this patch earlier in the series at least? cheers > Signed-off-by: Edward

Re: [PATCH v5 02/68] kselftest: Desecalate reporting of missing _GNU_SOURCE

2024-05-22 Thread Mark Brown
On Wed, May 22, 2024 at 12:56:48AM +, Edward Liaw wrote: > to make stopping builds early replace the static_assert() with a > missing without making the error more severe than it already was. This > will be moot once the issue is fixed properly but reduces the disruption > while that

[PATCH net v2] selftests: hsr: Fix "File exists" errors for hsr_ping

2024-05-22 Thread Geliang Tang
From: Geliang Tang The hsr_ping test reports the following errors: INFO: preparing interfaces for HSRv0. INFO: Initial validation ping. INFO: Longer ping test. INFO: Cutting one link. INFO: Delay the link and drop a few packages. INFO: All good. INFO: preparing interfaces for HSRv1.

Re: [PATCH net] selftests: hsr: Fix "File exists" errors for hsr_ping

2024-05-22 Thread Geliang Tang
On Wed, 2024-05-22 at 11:05 +0800, Hangbin Liu wrote: > On Tue, May 21, 2024 at 04:49:44PM +0800, Geliang Tang wrote: > > From: Geliang Tang > > > > The hsr_ping test reports the following errors: > > > >  INFO: preparing interfaces for HSRv0. > >  INFO: Initial validation ping. > >  INFO:

[PATCH bpf-next] selftests/bpf: Use prog_attach_type to attach in test_sockmap

2024-05-22 Thread Geliang Tang
From: Geliang Tang Since prog_attach_type[] array is defined, it makes sense to use it paired with prog_fd[] array for bpf_prog_attach() and bpf_prog_detach2() instead of open-coding. Signed-off-by: Geliang Tang --- tools/testing/selftests/bpf/test_sockmap.c | 44 +++--- 1

[PATCH bpf-next v3 8/8] selftests/bpf: Add post_connect_cb callback

2024-05-22 Thread Geliang Tang
From: Geliang Tang For getting rid of the second parameter of do_test(), this patch adds a new callback post_connect_cb in struct network_helper_opts, it will be invoked after connect_fd_to_addr() in connect_to_fd_opts(). Then define a dctcp dedicated post_connect_cb callback, invoking

[PATCH bpf-next v3 7/8] selftests/bpf: Use connect_to_fd_opts in do_test in bpf_tcp_ca

2024-05-22 Thread Geliang Tang
From: Geliang Tang This patch uses connect_to_fd_opts() instead of using connect_fd_to_fd() and settcpca() in do_test() in prog_tests/bpf_tcp_ca.c to accept a struct network_helper_opts argument. Then define a dctcp dedicated post_socket_cb callback stg_post_socket_cb(), invoking both cc_cb()

[PATCH bpf-next v3 4/8] selftests/bpf: Add start_server_str helper

2024-05-22 Thread Geliang Tang
From: Geliang Tang It's a tech debt that start_server() does not take the "opts" argument. It's pretty handy to have start_server() as a helper that takes string address. So this patch creates a new helper start_server_str(). Then start_server() can be a wrapper of it. Signed-off-by: Geliang

[PATCH bpf-next v3 6/8] selftests/bpf: Use start_server_str in bpf_tcp_ca

2024-05-22 Thread Geliang Tang
From: Geliang Tang This patch uses new helper start_server_str() in do_test() in bpf_tcp_ca.c to accept a struct network_helper_opts argument instead of using start_server() and settcpca(). Then change the type of the first paramenter of do_test() into a struct network_helper_opts one. Define

[PATCH bpf-next v3 5/8] selftests/bpf: Use post_socket_cb in connect_to_fd_opts

2024-05-22 Thread Geliang Tang
From: Geliang Tang Since the post_socket_cb() callback is added in struct network_helper_opts, it's make sense to use it not only in __start_server(), but also in connect_to_fd_opts(). Then it can be used to set TCP_CONGESTION sockopt. Add a "void *" type member cb_opts into struct

[PATCH bpf-next v3 3/8] selftests/bpf: Drop type parameter of connect_to_addr

2024-05-22 Thread Geliang Tang
From: Geliang Tang Since "type" is a struct member of network_helper_opts, it makes sense to drop the "type" parameter of connect_to_addr() helper, using opts->type instead in this helper. If no network_helper_opts is set, use SOCK_STREAM as default socket type. Signed-off-by: Geliang Tang

[PATCH bpf-next v3 2/8] selftests/bpf: Drop type parameter of start_server_addr

2024-05-22 Thread Geliang Tang
From: Geliang Tang Since "type" is a struct member of network_helper_opts, it makes sense to drop the "type" parameter of start_server_addr() and __start_server() helpers, using opts->type instead in the helpers. If no network_helper_opts is set, use SOCK_STREAM as default socket type.

[PATCH bpf-next v3 1/8] selftests/bpf: Drop struct post_socket_opts

2024-05-22 Thread Geliang Tang
From: Geliang Tang It's not possible to have one generic/common "struct post_socket_opts" for all tests. It's better to have the individual test define its own callback opts struct. So this patch drops struct post_socket_opts, and changes the second parameter of post_socket_cb as "void *" type.

[PATCH bpf-next v3 0/8] use network helpers, part 5

2024-05-22 Thread Geliang Tang
From: Geliang Tang This patchset uses post_socket_cb and post_connect_cb callbacks of struct network_helper_opts to refactor do_test() in bpf_tcp_ca.c to move dctcp test dedicated code out of do_test() into test_dctcp(). v3: - Add 4 new patches, 1-3 are cleanups. 4 adds a new helper. -

Re: First Contributions for KUnit

2024-05-22 Thread David Gow
On Mon, 20 May 2024 at 23:09, Artur A C de Barros wrote: > > Hi all, > > We are students from the State University of Campinas with an interest in > contributing to the kernel. We are part of LKCAMP, a student group that > focuses on researching and contributing to open source software. Our

Re: [PATCH bpf-next] selftests/bpf: Fix prog numbers in test_sockmap

2024-05-22 Thread Jakub Sitnicki
On Tue, May 21, 2024 at 06:20 PM GMT, patchwork-bot+netdev...@kernel.org wrote: > Hello: > > This patch was applied to bpf/bpf-next.git (master) > by Andrii Nakryiko : > > On Fri, 17 May 2024 14:21:46 +0800 you wrote: >> From: Geliang Tang >> >> bpf_prog5 and bpf_prog7 are removed from

Re: [PATCH v5 00/68] Define _GNU_SOURCE for sources using

2024-05-22 Thread Paolo Abeni
On Wed, 2024-05-22 at 00:56 +, Edward Liaw wrote: > Centralizes the definition of _GNU_SOURCE into KHDR_INCLUDES and removes > redefinitions of _GNU_SOURCE from source code. > > 809216233555 ("selftests/harness: remove use of LINE_MAX") introduced > asprintf into kselftest_harness.h, which is

Re: [PATCH v5 08/16] riscv: add ISA parsing for Zca, Zcf, Zcd and Zcb

2024-05-22 Thread Clément Léger
On 21/05/2024 21:49, Conor Dooley wrote: > On Fri, May 17, 2024 at 04:52:48PM +0200, Clément Léger wrote: > >> +static int riscv_ext_zca_depends(const struct riscv_isa_ext_data *data, >> + const unsigned long *isa_bitmap) >> +{ >> +return

[PATCH 1/2] selftests/mm: va_high_addr_switch: Reduce test noise

2024-05-22 Thread Dev Jain
When invoking the binary with "--run-hugetlb" flag, the testcases involving the base page are anyways going to be run. Therefore, remove duplication by invoking the binary only once. Signed-off-by: Dev Jain --- tools/testing/selftests/mm/va_high_addr_switch.sh | 4 1 file changed, 4

[PATCH 2/2] selftests/mm: va_high_addr_switch: Dynamically initialize testcases to enable LPA2 testing

2024-05-22 Thread Dev Jain
Post FEAT_LPA2, the Aarch64 Linux kernel extends higher address support to 4K and 16K translation granules. To support testing this out, we need to do away with static initialization of page size, while still maintaining the nice array of testcases; this can be achieved by initializing and

[PATCH 0/2] Restructure va_high_addr_switch

2024-05-22 Thread Dev Jain
The va_high_addr_switch memory selftest tests out some corner cases related to allocation and page/hugepage faulting around the switch boundary. Currently, the page size and hugepage size have been statically defined. Post FEAT_LPA2, the Aarch64 Linux kernel adds support for 4k and 16k translation