Re: [PATCH v1 00/10] Define _GNU_SOURCE for sources using

2024-04-30 Thread Muhammad Usama Anjum
Thanks for the fixes. On 5/1/24 6:59 AM, Mark Brown wrote: > On Tue, Apr 30, 2024 at 11:50:09PM +, Edward Liaw wrote: >> 809216233555 ("selftests/harness: remove use of LINE_MAX") introduced >> asprintf into kselftest_harness.h, which is a GNU extension and needs >> _GNU_SOURCE to either be

[PATCH] selftests/harness: fix many "format string is empty" warnings

2024-04-30 Thread John Hubbard
In order to build with clang at all, in order to see these symptoms, one must first apply Valentin Obst's build fix for LLVM [1]. Once that is done, then when building with clang, via: make LLVM=1 -C tools/testing/selftests ...clang emits a "format string is empty" warning. (gcc also emits a

Re: [PATCH v1 00/10] Define _GNU_SOURCE for sources using

2024-04-30 Thread Mark Brown
On Tue, Apr 30, 2024 at 11:50:09PM +, Edward Liaw wrote: > 809216233555 ("selftests/harness: remove use of LINE_MAX") introduced > asprintf into kselftest_harness.h, which is a GNU extension and needs > _GNU_SOURCE to either be defined prior to including headers or with the > -D_GNU_SOURCE

Re: [PATCH bpf-next 4/6] selftests/bpf: Add setsockopt for network_helper_opts

2024-04-30 Thread Martin KaFai Lau
On 4/24/24 8:23 PM, Geliang Tang wrote: +static int setsockopt_reuseport(int fd, const void *optval, socklen_t optlen) +{ + return setsockopt(fd, SOL_SOCKET, SO_REUSEPORT, optval, optlen); } [ ... ] void free_fds(int *fds, unsigned int nr_close_fds) diff --git

[PATCH v2] selftests/vDSO: Fix assignment in condition without parentheses

2024-04-30 Thread Edward Liaw
Fixes clang compiler warnings by adding parentheses: parse_vdso.c:65:9: warning: using the result of an assignment as a condition without parentheses [-Wparentheses] if (g = h & 0xf000) ~~^~~~ parse_vdso.c:65:9: note: place parentheses around

Re: [PATCH bpf-next 0/6] use network helpers, part 3

2024-04-30 Thread patchwork-bot+netdevbpf
Hello: This series was applied to bpf/bpf-next.git (master) by Martin KaFai Lau : On Thu, 25 Apr 2024 11:23:40 +0800 you wrote: > From: Geliang Tang > > This patchset adds opts argument for __start_server, and adds setsockopt > pointer together with optval and optlen into struct

[PATCH v1 10/10] selftests/user_events: Compiled with -D_GNU_SOURCE

2024-04-30 Thread Edward Liaw
809216233555 ("selftests/harness: remove use of LINE_MAX") introduced asprintf into kselftest_harness.h, which is a GNU extension and needs _GNU_SOURCE to either be defined prior to including headers or with the -D_GNU_SOURCE flag passed to the compiler. Fixes: 809216233555 ("selftests/harness:

[PATCH v1 09/10] selftests/tdx: Compile with -D_GNU_SOURCE

2024-04-30 Thread Edward Liaw
809216233555 ("selftests/harness: remove use of LINE_MAX") introduced asprintf into kselftest_harness.h, which is a GNU extension and needs _GNU_SOURCE to either be defined prior to including headers or with the -D_GNU_SOURCE flag passed to the compiler. Fixes: 809216233555 ("selftests/harness:

[PATCH v1 08/10] selftests/rtc: Compile with -D_GNU_SOURCE

2024-04-30 Thread Edward Liaw
809216233555 ("selftests/harness: remove use of LINE_MAX") introduced asprintf into kselftest_harness.h, which is a GNU extension and needs _GNU_SOURCE to either be defined prior to including headers or with the -D_GNU_SOURCE flag passed to the compiler. Fixes: 809216233555 ("selftests/harness:

[PATCH v1 07/10] selftests/prctl: Compile with -D_GNU_SOURCE

2024-04-30 Thread Edward Liaw
809216233555 ("selftests/harness: remove use of LINE_MAX") introduced asprintf into kselftest_harness.h, which is a GNU extension and needs _GNU_SOURCE to either be defined prior to including headers or with the -D_GNU_SOURCE flag passed to the compiler. Fixes: 809216233555 ("selftests/harness:

[PATCH v1 06/10] selftests/net: Define _GNU_SOURCE

2024-04-30 Thread Edward Liaw
809216233555 ("selftests/harness: remove use of LINE_MAX") introduced asprintf into kselftest_harness.h, which is a GNU extension and needs _GNU_SOURCE to either be defined prior to including headers or with the -D_GNU_SOURCE flag passed to the compiler. Fixes: 809216233555 ("selftests/harness:

[PATCH v1 05/10] selftests/nci: Compile with -D_GNU_SOURCE

2024-04-30 Thread Edward Liaw
809216233555 ("selftests/harness: remove use of LINE_MAX") introduced asprintf into kselftest_harness.h, which is a GNU extension and needs _GNU_SOURCE to either be defined prior to including headers or with the -D_GNU_SOURCE flag passed to the compiler. Fixes: 809216233555 ("selftests/harness:

[PATCH v1 04/10] selftests/kvm: Define _GNU_SOURCE

2024-04-30 Thread Edward Liaw
809216233555 ("selftests/harness: remove use of LINE_MAX") introduced asprintf into kselftest_harness.h, which is a GNU extension and needs _GNU_SOURCE to either be defined prior to including headers or with the -D_GNU_SOURCE flag passed to the compiler. Fixes: 809216233555 ("selftests/harness:

[PATCH v1 03/10] selftests/hid: Compile with -D_GNU_SOURCE

2024-04-30 Thread Edward Liaw
809216233555 ("selftests/harness: remove use of LINE_MAX") introduced asprintf into kselftest_harness.h, which is a GNU extension and needs _GNU_SOURCE to either be defined prior to including headers or with the -D_GNU_SOURCE flag passed to the compiler. Fixes: 809216233555 ("selftests/harness:

[PATCH v1 02/10] selftests/alsa: Compile with -D_GNU_SOURCE

2024-04-30 Thread Edward Liaw
809216233555 ("selftests/harness: remove use of LINE_MAX") introduced asprintf into kselftest_harness.h, which is a GNU extension and needs _GNU_SOURCE to either be defined prior to including headers or with the -D_GNU_SOURCE flag passed to the compiler. Fixes: 809216233555 ("selftests/harness:

[PATCH v1 01/10] selftests/sgx: Compile with -D_GNU_SOURCE

2024-04-30 Thread Edward Liaw
809216233555 ("selftests/harness: remove use of LINE_MAX") introduced asprintf into kselftest_harness.h, which is a GNU extension and needs _GNU_SOURCE to either be defined prior to including headers or with the -D_GNU_SOURCE flag passed to the compiler. Fixes: 809216233555 ("selftests/harness:

[PATCH v1 00/10] Define _GNU_SOURCE for sources using

2024-04-30 Thread Edward Liaw
809216233555 ("selftests/harness: remove use of LINE_MAX") introduced asprintf into kselftest_harness.h, which is a GNU extension and needs _GNU_SOURCE to either be defined prior to including headers or with the -D_GNU_SOURCE flag passed to the compiler. Edward Liaw (10): selftests/sgx: Compile

Re: [PATCH v4 05/10] platform: Add test managed platform_device/driver APIs

2024-04-30 Thread Stephen Boyd
Quoting Stephen Boyd (2024-04-24 11:11:21) > Quoting Stephen Boyd (2024-04-22 16:23:58) > > diff --git a/drivers/base/test/platform_kunit.c > > b/drivers/base/test/platform_kunit.c [...] > > + > > + /* > > +* Wait for the driver to probe (or at least flush out of the > > deferred >

[PATCH] selftest/safesetid: Fix uncaught return value

2024-04-30 Thread Shengyu Li
This patch captures the return value of the ./safesetid-test execution by assigning it to the variable errcode. This change ensures that the script properly handles the exit status of the safesetid-test. Signed-off-by: Shengyu Li --- tools/testing/selftests/safesetid/safesetid-test.sh | 1 +

Re: [RFC PATCH net-next v8 07/14] page_pool: devmem support

2024-04-30 Thread Mina Almasry
On Tue, Apr 30, 2024 at 11:55 AM Jens Axboe wrote: > > On 4/30/24 12:29 PM, Mina Almasry wrote: > > On Tue, Apr 30, 2024 at 6:46?AM Jens Axboe wrote: > >> > >> On 4/26/24 8:11 PM, Mina Almasry wrote: > >>> On Fri, Apr 26, 2024 at 5:18?PM David Wei wrote: > > On 2024-04-02 5:20 pm,

Re: [RFC PATCH net-next v8 07/14] page_pool: devmem support

2024-04-30 Thread Jens Axboe
On 4/30/24 12:29 PM, Mina Almasry wrote: > On Tue, Apr 30, 2024 at 6:46?AM Jens Axboe wrote: >> >> On 4/26/24 8:11 PM, Mina Almasry wrote: >>> On Fri, Apr 26, 2024 at 5:18?PM David Wei wrote: On 2024-04-02 5:20 pm, Mina Almasry wrote: > @@ -69,20 +106,26 @@ net_iov_binding(const

Re: [RFC PATCH net-next v8 07/14] page_pool: devmem support

2024-04-30 Thread Mina Almasry
On Tue, Apr 30, 2024 at 6:46 AM Jens Axboe wrote: > > On 4/26/24 8:11 PM, Mina Almasry wrote: > > On Fri, Apr 26, 2024 at 5:18?PM David Wei wrote: > >> > >> On 2024-04-02 5:20 pm, Mina Almasry wrote: > >>> @@ -69,20 +106,26 @@ net_iov_binding(const struct net_iov *niov) > >>> */ > >>> typedef

Re: [PATCH] selftests/kcmp: Remove unused open mode

2024-04-30 Thread Cyrill Gorcunov
On Mon, Apr 29, 2024 at 11:46:09PM +, Edward Liaw wrote: > Android bionic warns that open modes are ignored if O_CREAT or O_TMPFILE > aren't specified. The permissions for the file are set above: > > fd1 = open(kpath, O_RDWR | O_CREAT | O_TRUNC, 0644); > > Fixes: d97b46a64674

Re: [PATCH 6.6.y] kselftest: Add a ksft_perror() helper

2024-04-30 Thread Lee Jones
On Tue, 30 Apr 2024, Greg KH wrote: > On Tue, Apr 30, 2024 at 01:06:27AM +, Edward Liaw wrote: > > From: Mark Brown > > > > [ Upstream commit 907f33028871fa7c9a3db1efd467b78ef82cce20 ] > > > > The standard library perror() function provides a convenient way to print > > an error message

Re: [PATCH 6.6.y] kselftest: Add a ksft_perror() helper

2024-04-30 Thread Edward Liaw
On Tue, Apr 30, 2024 at 12:51 AM Greg KH wrote: > > On Tue, Apr 30, 2024 at 01:06:27AM +, Edward Liaw wrote: > > From: Mark Brown > > > > [ Upstream commit 907f33028871fa7c9a3db1efd467b78ef82cce20 ] > > > > The standard library perror() function provides a convenient way to print > > an

Re: [PATCH] selftests: default to host arch for LLVM builds

2024-04-30 Thread John Hubbard
On 4/30/24 7:50 AM, Mark Brown wrote: On Tue, Apr 30, 2024 at 01:44:52PM +0200, Valentin Obst wrote: On 4/29/24 12:04 AM, John Hubbard wrote: Correct me if I'm wrong, but intuitively 30+ patches that touch selftests from many different subsystems do not sound like something that is going to be

Re: [PATCH v3 0/9] Fix Kselftest's vfork() side effects

2024-04-30 Thread Kees Cook
On Tue, Apr 30, 2024 at 06:38:40PM +0200, Mickaël Salaün wrote: > On Tue, Apr 30, 2024 at 08:13:04AM -0700, Jakub Kicinski wrote: > > On Tue, 30 Apr 2024 15:54:38 +0200 Mickaël Salaün wrote: > > > Jakub, can you please review it? > > > > I looked thru it. I don't have the cycles to investigate

Re: [PATCH v3 0/9] Fix Kselftest's vfork() side effects

2024-04-30 Thread Mickaël Salaün
On Tue, Apr 30, 2024 at 08:13:04AM -0700, Jakub Kicinski wrote: > On Tue, 30 Apr 2024 15:54:38 +0200 Mickaël Salaün wrote: > > Jakub, can you please review it? > > I looked thru it. I don't have the cycles to investigate and suggest > a better approach but the sprinkling of mmaps(), if nothing

[PATCH v2] selftest/tty: Use harness framework in tty

2024-04-30 Thread Shengyu Li
Similarly, this one is based on automated tools and a very small percentage of manual modifications to automatically refactor the version that uses kselftest_harness.h, which is logically clearer. Signed-off-by: Shengyu Li --- v2: Fixed the last Assert ---

Re: [PATCH net-next 1/6] net: page_pool: support error injection

2024-04-30 Thread Jesper Dangaard Brouer
On 27/04/2024 01.23, Jakub Kicinski wrote: Because of caching / recycling using the general page allocation failures to induce errors in page pool allocation is very hard. Add direct error injection support to page_pool_alloc_pages(). Signed-off-by: Jakub Kicinski Sounds good to me :-)

Re: [PATCH net-next v2 0/6] selftests: net: page_poll allocation error injection

2024-04-30 Thread patchwork-bot+netdevbpf
Hello: This series was applied to netdev/net-next.git (main) by Jakub Kicinski : On Mon, 29 Apr 2024 07:44:20 -0700 you wrote: > Add a test for exercising driver memory allocation failure paths. > page pool is a bit tricky to inject errors into at the page allocator > level because of the bulk

Re: [PATCH v3 0/9] Fix Kselftest's vfork() side effects

2024-04-30 Thread Jakub Kicinski
On Tue, 30 Apr 2024 15:54:38 +0200 Mickaël Salaün wrote: > Jakub, can you please review it? I looked thru it. I don't have the cycles to investigate and suggest a better approach but the sprinkling of mmaps(), if nothing else, feels a bit band-aid-y 路️

[PATCH] selftest/tty: Use harness framework in tty

2024-04-30 Thread Shengyu Li
Similarly, this one is based on automated tools and a very small percentage of manual modifications to automatically refactor the version that uses kselftest_harness.h, which is logically clearer. Signed-off-by: Shengyu Li --- .../testing/selftests/tty/tty_tstamp_update.c | 48

Re: [PATCH] selftests: default to host arch for LLVM builds

2024-04-30 Thread Mark Brown
On Tue, Apr 30, 2024 at 01:44:52PM +0200, Valentin Obst wrote: > On 4/29/24 12:04 AM, John Hubbard wrote: > > I'm expecting to post the series soon, hopefully this week. And I'm > > thinking maybe I should carry your patch as the first one in the series, > > in order to ensure it gets picked up.

Re: [PATCH bpf-next v3 0/3] bpf_wq followup series

2024-04-30 Thread patchwork-bot+netdevbpf
3: > - fixed bpf_test module not being able to be removed, because the bpf_wq > was never freed > - Link to v2: > https://lore.kernel.org/r/20240430-bpf-next-v2-0-140aa50f0...@kernel.org > > [...] Here is the summary with links: - [bpf-next,v3,1/3] bpf: do not walk twice the

Re: [PATCH] kunit: bail out early in __kunit_test_suites_init() if there are no suites to test

2024-04-30 Thread Scott Mayhew
On Sat, 23 Mar 2024, David Gow wrote: > On Thu, 21 Mar 2024 at 22:32, Scott Mayhew wrote: > > > > Commit c72a870926c2 added a mutex to prevent kunit tests from running > > concurrently. Unfortunately that mutex gets locked during module load > > regardless of whether the module actually has any

Re: [PATCH v3 0/9] Fix Kselftest's vfork() side effects

2024-04-30 Thread Mickaël Salaün
Shuah, could you please take this series in your tree and push it to next? This mainly fixes an issue in the pidfd tests and we should get this merged before the final 6.9 release. Thanks. Jakub, can you please review it? Mark, it would be good to have your Tested-by tags. :) On Mon, Apr 29,

Re: [RFC PATCH net-next v8 07/14] page_pool: devmem support

2024-04-30 Thread Jens Axboe
On 4/26/24 8:11 PM, Mina Almasry wrote: > On Fri, Apr 26, 2024 at 5:18?PM David Wei wrote: >> >> On 2024-04-02 5:20 pm, Mina Almasry wrote: >>> @@ -69,20 +106,26 @@ net_iov_binding(const struct net_iov *niov) >>> */ >>> typedef unsigned long __bitwise netmem_ref; >>> >>> +static inline bool

Re: [PATCH v1] selftests: mm: gup_longterm: test unsharing logic when R/O pinning

2024-04-30 Thread Peter Xu
On Tue, Apr 30, 2024 at 03:15:08PM +0200, David Hildenbrand wrote: > In our FOLL_LONGTERM tests, we prefault the page tables for the GUP-fast > test cases to be able to find a PTE and exercise the "longterm pinning > allowed" logic on the GUP-fast path where possible. > > For now, we always

Re: [RFC PATCH net-next v8 07/14] page_pool: devmem support

2024-04-30 Thread Pavel Begunkov
On 4/27/24 03:11, Mina Almasry wrote: On Fri, Apr 26, 2024 at 5:18 PM David Wei wrote: On 2024-04-02 5:20 pm, Mina Almasry wrote: @@ -69,20 +106,26 @@ net_iov_binding(const struct net_iov *niov) */ typedef unsigned long __bitwise netmem_ref; +static inline bool netmem_is_net_iov(const

[PATCH v1] selftests: mm: gup_longterm: test unsharing logic when R/O pinning

2024-04-30 Thread David Hildenbrand
In our FOLL_LONGTERM tests, we prefault the page tables for the GUP-fast test cases to be able to find a PTE and exercise the "longterm pinning allowed" logic on the GUP-fast path where possible. For now, we always prefault the page tables writable, resulting in PTEs that are writable. Let's

Re: [PATCH bpf-next v3 2/3] bpf: do not walk twice the hash map on free

2024-04-30 Thread Kumar Kartikeya Dwivedi
On Tue, 30 Apr 2024 at 12:44, Benjamin Tissoires wrote: > > If someone stores both a timer and a workqueue in a hash map, on free, we > would walk it twice. > Add a check in htab_free_malloced_timers_or_wq and free the timers > and workqueues if they are present. > > Fixes: 246331e3f1ea ("bpf:

Re: [PATCH bpf-next v3 3/3] selftests/bpf: drop an unused local variable

2024-04-30 Thread Kumar Kartikeya Dwivedi
On Tue, 30 Apr 2024 at 12:44, Benjamin Tissoires wrote: > > Some copy/paste leftover, this is never used > > Fixes: e3d9eac99afd ("selftests/bpf: wq: add bpf_wq_init() checks") > Signed-off-by: Benjamin Tissoires > > --- > > no changes in v3 > > no changes in v2 > --- Acked-by: Kumar Kartikeya

Re: [PATCH bpf-next v3 1/3] bpf: do not walk twice the map on free

2024-04-30 Thread Kumar Kartikeya Dwivedi
On Tue, 30 Apr 2024 at 12:43, Benjamin Tissoires wrote: > > If someone stores both a timer and a workqueue in a map, on free we > would walk it twice. > Add a check in array_map_free_timers_wq and free the timers > and workqueues if they are present. > > Fixes: 246331e3f1ea ("bpf: allow struct

Re: [PATCH v4 02/11] riscv: add ISA extensions validation

2024-04-30 Thread Clément Léger
On 30/04/2024 14:12, Conor Dooley wrote: > On Tue, Apr 30, 2024 at 01:58:11PM +0200, Clément Léger wrote: >> Yeah, see what you mean. I think we also need to define if we want to >> expose all the ISA extensions in /proc/cpuinfo (ie no matter the config >> of the kernel) or not. If so,

Re: [PATCH] selftests:arm64: Test PR_SVE_VL_INHERIT after a double fork

2024-04-30 Thread Will Deacon
On Mon, Apr 29, 2024 at 04:40:12AM +, Dorine Tipo wrote: > Add a new test, double_fork_test() to check the inheritance of the SVE > vector length after a double fork. > The `EXPECTED_TESTS` macro has been updated to account for this additional > test. > This patch addresses task 7 on the TODO

Re: [PATCH v4 02/11] riscv: add ISA extensions validation

2024-04-30 Thread Conor Dooley
On Tue, Apr 30, 2024 at 01:58:11PM +0200, Clément Léger wrote: > Yeah, see what you mean. I think we also need to define if we want to > expose all the ISA extensions in /proc/cpuinfo (ie no matter the config > of the kernel) or not. If so, additional validate() callback would make > sense. If we

Re: [PATCH v4 02/11] riscv: add ISA extensions validation

2024-04-30 Thread Clément Léger
On 30/04/2024 13:44, Conor Dooley wrote: > On Tue, Apr 30, 2024 at 09:18:47AM +0200, Clément Léger wrote: >> >> >> On 30/04/2024 00:15, Conor Dooley wrote: >>> On Mon, Apr 29, 2024 at 05:04:55PM +0200, Clément Léger wrote: Since a few extensions (Zicbom/Zicboz) already needs validation and

Re: [PATCH] selftests: default to host arch for LLVM builds

2024-04-30 Thread Valentin Obst
On 4/29/24 12:04 AM, John Hubbard wrote: > ... >>> And yes, the selftests "normal" (non-cross-compile) build is *broken* >>> right now, for clang. I didn't realize from the patch title that this is >>> actually a significant fix. Maybe we should change the subject line >>> (patch >>> title) to

Re: [PATCH v4 02/11] riscv: add ISA extensions validation

2024-04-30 Thread Conor Dooley
On Tue, Apr 30, 2024 at 09:18:47AM +0200, Clément Léger wrote: > > > On 30/04/2024 00:15, Conor Dooley wrote: > > On Mon, Apr 29, 2024 at 05:04:55PM +0200, Clément Léger wrote: > >> Since a few extensions (Zicbom/Zicboz) already needs validation and > >> future ones will need it as well (Zc*)

[PATCH v22 5/5] ring-buffer/selftest: Add ring-buffer mapping test

2024-04-30 Thread Vincent Donnefort
This test maps a ring-buffer and validate the meta-page after reset and after emitting few events. Cc: Shuah Khan Cc: Shuah Khan Cc: linux-kselftest@vger.kernel.org Acked-by: Muhammad Usama Anjum Signed-off-by: Vincent Donnefort diff --git a/tools/testing/selftests/ring-buffer/.gitignore

[PATCH bpf-next v3 3/3] selftests/bpf: drop an unused local variable

2024-04-30 Thread Benjamin Tissoires
Some copy/paste leftover, this is never used Fixes: e3d9eac99afd ("selftests/bpf: wq: add bpf_wq_init() checks") Signed-off-by: Benjamin Tissoires --- no changes in v3 no changes in v2 --- tools/testing/selftests/bpf/prog_tests/wq.c | 2 -- 1 file changed, 2 deletions(-) diff --git

[PATCH bpf-next v3 2/3] bpf: do not walk twice the hash map on free

2024-04-30 Thread Benjamin Tissoires
If someone stores both a timer and a workqueue in a hash map, on free, we would walk it twice. Add a check in htab_free_malloced_timers_or_wq and free the timers and workqueues if they are present. Fixes: 246331e3f1ea ("bpf: allow struct bpf_wq to be embedded in arraymaps and hashmaps")

[PATCH bpf-next v3 1/3] bpf: do not walk twice the map on free

2024-04-30 Thread Benjamin Tissoires
If someone stores both a timer and a workqueue in a map, on free we would walk it twice. Add a check in array_map_free_timers_wq and free the timers and workqueues if they are present. Fixes: 246331e3f1ea ("bpf: allow struct bpf_wq to be embedded in arraymaps and hashmaps") Signed-off-by:

[PATCH bpf-next v3 0/3] bpf_wq followup series

2024-04-30 Thread Benjamin Tissoires
Few patches that should have been there from day 1. Anyway, they are coming now. Signed-off-by: Benjamin Tissoires --- Changes in v3: - fixed bpf_test module not being able to be removed, because the bpf_wq was never freed - Link to v2: https://lore.kernel.org/r/20240430-bpf-next-v2-0

Re: [PATCH v2 2/3] bpf: do not walk twice the hash map on free

2024-04-30 Thread Benjamin Tissoires
On Apr 30 2024, Benjamin Tissoires wrote: > If someone stores both a timer and a workqueue in a hash map, on free, we > would walk it twice. > Add a check in htab_free_malloced_timers_or_wq and free the timers > and workqueues if they are present. > > Fixes: 246331e3f1ea ("bpf: allow struct

[PATCH v2 3/3] selftests/bpf: drop an unused local variable

2024-04-30 Thread Benjamin Tissoires
Some copy/paste leftover, this is never used Fixes: e3d9eac99afd ("selftests/bpf: wq: add bpf_wq_init() checks") Signed-off-by: Benjamin Tissoires --- no changes in v2 --- tools/testing/selftests/bpf/prog_tests/wq.c | 2 -- 1 file changed, 2 deletions(-) diff --git

[PATCH v2 2/3] bpf: do not walk twice the hash map on free

2024-04-30 Thread Benjamin Tissoires
If someone stores both a timer and a workqueue in a hash map, on free, we would walk it twice. Add a check in htab_free_malloced_timers_or_wq and free the timers and workqueues if they are present. Fixes: 246331e3f1ea ("bpf: allow struct bpf_wq to be embedded in arraymaps and hashmaps")

[PATCH v2 1/3] bpf: do not walk twice the map on free

2024-04-30 Thread Benjamin Tissoires
If someone stores both a timer and a workqueue in a map, on free we would walk it twice. Add a check in array_map_free_timers_wq and free the timers and workqueues if they are present. Fixes: 246331e3f1ea ("bpf: allow struct bpf_wq to be embedded in arraymaps and hashmaps") Signed-off-by:

[PATCH v2 0/3] bpf_wq followup series

2024-04-30 Thread Benjamin Tissoires
Few patches that should have been there from day 1. Anyway, they are coming now. Signed-off-by: Benjamin Tissoires --- Changes in v2: - fix wq in hashtabs not being freed (and static call not being used) - Link to v1: https://lore.kernel.org/r/20240425-bpf-next-v1-0-1d8330e6c...@kernel.org

Re: [PATCH 2/3] bpf: do not walk twice the hash map on free

2024-04-30 Thread Benjamin Tissoires
On Apr 25 2024, Alexei Starovoitov wrote: > On Thu, Apr 25, 2024 at 6:59 AM Benjamin Tissoires wrote: > > > > If someone stores both a timer and a workqueue in a hash map, on free, we > > would walk it twice. > > Add a check in htab_free_malloced_timers_or_wq and free the timers > > and

Re: [PATCH] kunit: Cover 'assert.c' with tests

2024-04-30 Thread Ivan Orlov
On 4/29/24 22:26, Rae Moar wrote: On Sat, Apr 27, 2024 at 6:04 PM Ivan Orlov wrote: There are multiple assertion formatting functions in the `assert.c` file, which are not covered with tests yet. Implement the KUnit test for these functions. The test consists of 11 test cases for the

Re: [PATCH v2 15/25] KVM: VMX: Dump FRED context in dump_vmcs()

2024-04-30 Thread Chao Gao
On Thu, Feb 08, 2024 at 01:26:35AM +0800, Xin Li wrote: >Add FRED related VMCS fields to dump_vmcs() to have it dump FRED context. > >Signed-off-by: Xin Li >Tested-by: Shan Kang >--- > >Change since v1: >* Use kvm_cpu_cap_has() instead of cpu_feature_enabled() (Chao Gao). >* Dump guest FRED

Re: [PATCH v2 14/25] KVM: VMX: Disable FRED if FRED consistency checks fail

2024-04-30 Thread Chao Gao
On Thu, Feb 08, 2024 at 01:26:34AM +0800, Xin Li wrote: >Refuse to virtualize FRED if FRED consistency checks fail. After reading this, I realize some consistency checks are missing in setup_vmcs_config(). Actually Sean requested some infrastructure for vmcs_entry_exit_pairs to deal with

Re: [PATCH 6.6.y] kselftest: Add a ksft_perror() helper

2024-04-30 Thread Greg KH
On Tue, Apr 30, 2024 at 01:06:27AM +, Edward Liaw wrote: > From: Mark Brown > > [ Upstream commit 907f33028871fa7c9a3db1efd467b78ef82cce20 ] > > The standard library perror() function provides a convenient way to print > an error message based on the current errno but this doesn't play

Re: [PATCH v2 13/25] KVM: VMX: Handle VMX nested exception for FRED

2024-04-30 Thread Chao Gao
On Thu, Feb 08, 2024 at 01:26:33AM +0800, Xin Li wrote: >Set VMX nested exception bit in the VM-entry interruption information >VMCS field when injecting a nested exception using FRED event delivery >to ensure: > 1) The nested exception is injected on a correct stack level. > 2) The nested bit

Re: [PATCH v4 02/11] riscv: add ISA extensions validation

2024-04-30 Thread Clément Léger
On 30/04/2024 00:15, Conor Dooley wrote: > On Mon, Apr 29, 2024 at 05:04:55PM +0200, Clément Léger wrote: >> Since a few extensions (Zicbom/Zicboz) already needs validation and >> future ones will need it as well (Zc*) add a validate() callback to >> struct riscv_isa_ext_data. This require to