Re: [PATCH net-next] selftests: netdevsim: stop using ifconfig

2024-02-02 Thread Eric Dumazet
On Fri, Feb 2, 2024 at 1:12 AM Jakub Kicinski wrote: > > Paolo points out that ifconfig is legacy and we should not use it. > > Signed-off-by: Jakub Kicinski Reviewed-by: Eric Dumazet

Re: [PATCH v4 4/5] KVM: selftests: aarch64: Introduce pmu_event_filter_test

2024-02-02 Thread Oliver Upton
On Thu, Feb 01, 2024 at 09:56:53PM -0500, Shaoqin Huang wrote: > Introduce pmu_event_filter_test for arm64 platforms. The test configures > PMUv3 for a vCPU, and sets different pmu event filters for the vCPU, and > check if the guest can see those events which user allow and can't use > those event

[PATCH] selftests/bpf: Use ARRAY_SIZE for array length

2024-02-02 Thread Jiapeng Chong
Use of macro ARRAY_SIZE to calculate array size minimizes the redundant code and improves code reusability. ./tools/testing/selftests/bpf/progs/syscall.c:122:26-27: WARNING: Use ARRAY_SIZE. Reported-by: Abaci Robot Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=8170 Signed-off-by: Jiape

Re: [PATCH v3 5/5] selftests/resctrl: Add non-contiguous CBMs CAT test

2024-02-02 Thread Maciej Wieczor-Retman
Hello! On 2024-02-01 at 11:47:44 -0800, Reinette Chatre wrote: >Hi Maciej, > >On 1/31/2024 4:55 AM, Maciej Wieczor-Retman wrote: >> On 2024-01-26 at 13:10:18 -0800, Reinette Chatre wrote: >>> On 1/25/2024 3:13 AM, Maciej Wieczor-Retman wrote: + if (sparse_masks != ((ecx >> 3) & 1)) { +

Re: [PATCH net-next] selftests: openvswitch: Test ICMP related matches work with SNAT

2024-02-02 Thread patchwork-bot+netdevbpf
Hello: This patch was applied to netdev/net-next.git (main) by David S. Miller : On Wed, 31 Jan 2024 17:08:22 +1300 you wrote: > Add a test case for regression in openvswitch nat that was fixed by > commit e6345d2824a3 ("netfilter: nf_nat: fix action not being set for > all ct states"). > > Link

Re: [PATCH net-next v2] net: ctnetlink: support filtering by zone

2024-02-02 Thread Ilya Maximets
On 12/22/23 13:01, Pablo Neira Ayuso wrote: > On Mon, Nov 27, 2023 at 11:49:16AM +, Felix Huettner wrote: >> conntrack zones are heavily used by tools like openvswitch to run >> multiple virtual "routers" on a single machine. In this context each >> conntrack zone matches to a single router, th

Re: [PATCH net-next v2] net: ctnetlink: support filtering by zone

2024-02-02 Thread Pablo Neira Ayuso
On Fri, Feb 02, 2024 at 12:04:35PM +0100, Ilya Maximets wrote: > On 12/22/23 13:01, Pablo Neira Ayuso wrote: > > On Mon, Nov 27, 2023 at 11:49:16AM +, Felix Huettner wrote: > >> conntrack zones are heavily used by tools like openvswitch to run > >> multiple virtual "routers" on a single machine

[PATCH v2 00/12] conform tests to TAP format output

2024-02-02 Thread Muhammad Usama Anjum
Changes since v1: - Rebased the series on top of next-20240202 Muhammad Usama Anjum (12): selftests/mm: map_fixed_noreplace: conform test to TAP format output selftests/mm: map_hugetlb: conform test to TAP format output selftests/mm: map_populate: conform test to TAP format output

[PATCH v2 01/12] selftests/mm: map_fixed_noreplace: conform test to TAP format output

2024-02-02 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. While at it, convert commenting style from // to /**/. Signed-off-by: Muhammad Usama Anjum --- .../selftests/mm/map_fixed_noreplace.c| 96 ++---

[PATCH v2 02/12] selftests/mm: map_hugetlb: conform test to TAP format output

2024-02-02 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 --- tools/testing/selftests/mm/map_hugetlb.c | 42 +++- 1 file changed, 20 insertions(+), 22 deletions(

[PATCH v2 03/12] selftests/mm: map_populate: conform test to TAP format output

2024-02-02 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. Minor cleanups have also been included. Signed-off-by: Muhammad Usama Anjum --- tools/testing/selftests/mm/map_populate.c | 37 ++- 1 file

[PATCH v2 04/12] selftests/mm: mlock-random-test: conform test to TAP format output

2024-02-02 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 --- .../testing/selftests/mm/mlock-random-test.c | 136 +++--- 1 file changed, 54 insertions(+), 82 deletions(

[PATCH v2 05/12] selftests/mm: mlock2-tests: conform test to TAP format output

2024-02-02 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. I've done some cleanups as well. Signed-off-by: Muhammad Usama Anjum --- tools/testing/selftests/mm/mlock2-tests.c | 282 +- tools/testing/

[PATCH v2 06/12] selftests/mm: mrelease_test: conform test to TAP format output

2024-02-02 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 --- tools/testing/selftests/mm/mrelease_test.c | 80 +- 1 file changed, 33 insertions(+), 47 deletions(

[PATCH v2 07/12] selftests/mm: mremap_dontunmap: conform test to TAP format output

2024-02-02 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 --- tools/testing/selftests/mm/mremap_dontunmap.c | 32 --- 1 file changed, 20 insertions(+), 12 deletions(

[PATCH v2 08/12] selftests/mm: split_huge_page_test: conform test to TAP format output

2024-02-02 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 --- .../selftests/mm/split_huge_page_test.c | 161 -- 1 file changed, 69 insertions(+), 92 deletions(

[PATCH v2 09/12] selftests/mm: thp_settings: conform to TAP format output

2024-02-02 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 --- tools/testing/selftests/mm/khugepaged.c | 3 +- tools/testing/selftests/mm/thp_settings.c | 123 ---

[PATCH v2 10/12] selftests/mm: thuge-gen: conform to TAP format output

2024-02-02 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. Also remove un-needed logging which isn't enabled. Skip a hugepage size if it has less free pages to avoid unnecessary failures. For examples, some systems may n

[PATCH v2 11/12] selftests/mm: transhuge-stress: conform to TAP format output

2024-02-02 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 --- tools/testing/selftests/mm/transhuge-stress.c | 36 +++ tools/testing/selftests/mm/vm_util.c |

[PATCH v2 12/12] selftests/mm: virtual_address_range: conform to TAP format output

2024-02-02 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 --- .../selftests/mm/virtual_address_range.c | 44 +-- 1 file changed, 22 insertions(+), 22 deletions(

Re: [PATCH net-next v2] net: ctnetlink: support filtering by zone

2024-02-02 Thread Felix Huettner
On Fri, Feb 02, 2024 at 12:12:03PM +0100, Pablo Neira Ayuso wrote: > On Fri, Feb 02, 2024 at 12:04:35PM +0100, Ilya Maximets wrote: > > On 12/22/23 13:01, Pablo Neira Ayuso wrote: > > > On Mon, Nov 27, 2023 at 11:49:16AM +, Felix Huettner wrote: > > >> conntrack zones are heavily used by tools

Re: [PATCH v8 0/4] Introduce mseal

2024-02-02 Thread Liam R. Howlett
* Jeff Xu [240201 22:15]: > On Thu, Feb 1, 2024 at 12:45 PM Liam R. Howlett > wrote: > > > > * Jeff Xu [240131 20:27]: > > > On Wed, Jan 31, 2024 at 11:34 AM Liam R. Howlett > > > wrote: > > > > > > > > Having to opt-in to allowing mseal will probably not work well. > I'm leaving the opt-in di

Re: [PATCH v8 0/4] Introduce mseal

2024-02-02 Thread Greg KH
On Thu, Feb 01, 2024 at 07:24:02PM -0800, Jeff Xu wrote: > On Thu, Feb 1, 2024 at 5:06 PM Greg KH wrote: > > > > On Thu, Feb 01, 2024 at 03:24:40PM -0700, Theo de Raadt wrote: > > > As an outsider, Linux development is really strange: > > > > > > Two sub-features are being pushed very hard, and th

[PATCH net] selftests: net: let big_tcp test cope with slow env

2024-02-02 Thread Paolo Abeni
In very slow environments, most big TCP cases including segmentation and reassembly of big TCP packets have a good chance to fail: by default the TCP client uses write size well below 64K. If the host is low enough autocorking is unable to build real big TCP packets. Address the issue using much l

Re: [PATCH net] selftests: net: let big_tcp test cope with slow env

2024-02-02 Thread Eric Dumazet
On Fri, Feb 2, 2024 at 5:07 PM Paolo Abeni wrote: > > In very slow environments, most big TCP cases including > segmentation and reassembly of big TCP packets have a good > chance to fail: by default the TCP client uses write size > well below 64K. If the host is low enough autocorking is > unable

Re: [PATCH net] selftests: net: let big_tcp test cope with slow env

2024-02-02 Thread Xin Long
On Fri, Feb 2, 2024 at 11:07 AM Paolo Abeni wrote: > > In very slow environments, most big TCP cases including > segmentation and reassembly of big TCP packets have a good > chance to fail: by default the TCP client uses write size > well below 64K. If the host is low enough autocorking is > unabl

Re: [PATCH v2 1/7] arm64: Unconditionally call unflatten_device_tree()

2024-02-02 Thread Rob Herring
On Wed, Jan 31, 2024 at 02:59:53PM -0800, Stephen Boyd wrote: > Quoting Rob Herring (2024-01-31 12:54:05) > > On Mon, Jan 29, 2024 at 04:45:00PM -0800, Stephen Boyd wrote: > > > Call this function unconditionally so that we can populate an empty DTB > > > on platforms that don't boot with a firmwar

Re: [PATCH net] selftests: net: let big_tcp test cope with slow env

2024-02-02 Thread Paolo Abeni
On Fri, 2024-02-02 at 17:13 +0100, Eric Dumazet wrote: > On Fri, Feb 2, 2024 at 5:07 PM Paolo Abeni wrote: > > > > In very slow environments, most big TCP cases including > > segmentation and reassembly of big TCP packets have a good > > chance to fail: by default the TCP client uses write size >

Re: [PATCH v8 0/4] Introduce mseal

2024-02-02 Thread Theo de Raadt
Another interaction to consider is sigaltstack(). In OpenBSD, sigaltstack() forces MAP_STACK onto the specified (pre-allocated) region, because on kernel-entry we require the "sp" register to point to a MAP_STACK region (this severely damages ROP pivot methods). Linux does not have MAP_STACK enfo

Re: [PATCH v3 5/5] selftests/resctrl: Add non-contiguous CBMs CAT test

2024-02-02 Thread Reinette Chatre
Hi Maciej, On 2/2/2024 2:17 AM, Maciej Wieczor-Retman wrote: > On 2024-02-01 at 11:47:44 -0800, Reinette Chatre wrote: >> Hi Maciej, >> >> On 1/31/2024 4:55 AM, Maciej Wieczor-Retman wrote: >>> On 2024-01-26 at 13:10:18 -0800, Reinette Chatre wrote: On 1/25/2024 3:13 AM, Maciej Wieczor-Retman

Re: [PATCH v8 0/4] Introduce mseal

2024-02-02 Thread Jeff Xu
On Fri, Feb 2, 2024 at 7:13 AM Liam R. Howlett wrote: > > * Jeff Xu [240201 22:15]: > > On Thu, Feb 1, 2024 at 12:45 PM Liam R. Howlett > > wrote: > > > > > > * Jeff Xu [240131 20:27]: > > > > On Wed, Jan 31, 2024 at 11:34 AM Liam R. Howlett > > > > wrote: > > > > > > > > > > > Having to opt-

Re: [PATCH v12 00/20] KVM: xen: update shared_info and vcpu_info handling

2024-02-02 Thread Paul Durrant
On 26/01/2024 01:19, Sean Christopherson wrote: On Thu, Jan 25, 2024, Paul Durrant wrote: On 15/01/2024 12:56, Paul Durrant wrote: From: Paul Durrant This series has one small fix to what was in v11 [1]: * KVM: xen: re-initialize shared_info if guest (32/64-bit) mode is set The v11 patch fa

Re: [PATCH v2 net 2/4] selftests: net: fix setup_ns usage in rtnetlink.sh

2024-02-02 Thread Paolo Abeni
On Thu, 2024-02-01 at 19:42 +0100, Paolo Abeni wrote: > The setup_ns helper marks the testns global variable as > readonly. Later attempts to set such variable are unsuccessful, > causing a couple test failures. > > Avoid completely the variable re-initialization and let the > function access the

Re: [PATCH v3] KVM: selftests: Fix the dirty_log_test semaphore imbalance

2024-02-02 Thread Sean Christopherson
On Fri, Feb 02, 2024, Shaoqin Huang wrote: > --- > v2->v3: > - Rebase to v6.8-rc2. > - Use TEST_ASSERT(). Patch says otherwise. > @@ -726,6 +728,11 @@ static void run_test(enum vm_guest_mode mode, void *arg) > return; > } > > + sem_getvalue(&sem_vcpu_stop, &sem_val);

Re: [PATCH v8 0/4] Introduce mseal

2024-02-02 Thread Jeff Xu
On Thu, Feb 1, 2024 at 9:00 PM Theo de Raadt wrote: > > Jeff Xu wrote: > > > Even without free. > > I personally do not like the heap getting sealed like that. > > > > Component A. > > p=malloc(4096); > > writing something to p. > > > > Component B: > > mprotect(p,4096, RO) > > mseal(p,4096) > >

Re: [PATCH v8 0/4] Introduce mseal

2024-02-02 Thread Pedro Falcato
On Fri, Feb 2, 2024 at 5:59 PM Jeff Xu wrote: > > On Thu, Feb 1, 2024 at 9:00 PM Theo de Raadt wrote: > > > > Jeff Xu wrote: > > > > > Even without free. > > > I personally do not like the heap getting sealed like that. > > > > > > Component A. > > > p=malloc(4096); > > > writing something to p.

Re: [PATCH v8 0/4] Introduce mseal

2024-02-02 Thread Liam R. Howlett
* Jeff Xu [240202 12:24]: ... > > Provide code that uses this feature. Please do this too :) > > > > Provide benchmark results where you apply mseal to 1, 2, 4, 8, 16, and > > 32 VMAs. > > > I will prepare for the benchmark tests. Thank you, please also include runs of calls that you are modi

Re: [PATCH v8 0/4] Introduce mseal

2024-02-02 Thread Theo de Raadt
> What I'm more concerned about is what happens if you call mseal() on a > range and it can mseal a portion. Like, what happens to the first vma > in your test_seal_unmapped_middle case? I see it returns an error, but > is the first VMA mseal()'ed? (no it's not, but test that) That is correct, L

[PATCH v3 0/7] of: populate of_root node if bootloader doesn't

2024-02-02 Thread Stephen Boyd
Arch maintainers, please ack/review patches. This is a resend of a series from Frank last year[1]. I worked in Rob's review comments to unconditionally call unflatten_device_tree() and fixup/audit calls to of_have_populated_dt() so that behavior doesn't change. I need this series so I can add DT

[PATCH v3 1/7] of: Always unflatten in unflatten_and_copy_device_tree()

2024-02-02 Thread Stephen Boyd
We want to populate an empty DT whenever CONFIG_OF is enabled so that overlays can be applied and the DT unit tests can be run. Make unflatten_and_copy_device_tree() stop printing a warning if the 'initial_boot_params' pointer is NULL. Instead, simply copy the dtb if there is one and then unflatten

[PATCH v3 2/7] of: Create of_root if no dtb provided by firmware

2024-02-02 Thread Stephen Boyd
From: Frank Rowand When enabling CONFIG_OF on a platform where 'of_root' is not populated by firmware, we end up without a root node. In order to apply overlays and create subnodes of the root node, we need one. Create this root node by unflattening an empty builtin dtb. If firmware provides a f

[PATCH v3 3/7] um: Unconditionally call unflatten_device_tree()

2024-02-02 Thread Stephen Boyd
Call this function unconditionally so that we can populate an empty DTB on platforms that don't boot with a command line provided DTB. There's no harm in calling unflatten_device_tree() unconditionally. If there isn't a valid initial_boot_params dtb then unflatten_device_tree() returns early. Cc:

[PATCH v3 4/7] x86/of: Unconditionally call unflatten_and_copy_device_tree()

2024-02-02 Thread Stephen Boyd
Call this function unconditionally so that we can populate an empty DTB on platforms that don't boot with a firmware provided or builtin DTB. There's no harm in calling unflatten_device_tree() unconditionally here. If there isn't a non-NULL 'initial_boot_params' pointer then unflatten_device_tree()

[PATCH v3 5/7] arm64: Unconditionally call unflatten_device_tree()

2024-02-02 Thread Stephen Boyd
Call this function unconditionally so that we can populate an empty DTB on platforms that don't boot with a firmware provided or builtin DTB. When ACPI is in use, unflatten_device_tree() ignores the 'initial_boot_params' pointer so the live DT on those systems won't be whatever that's pointing to.

[PATCH v3 6/7] of: unittest: treat missing of_root as error instead of fixing up

2024-02-02 Thread Stephen Boyd
From: Frank Rowand unflatten_device_tree() now ensures that the 'of_root' node is populated with the root of a default empty devicetree. Remove the unittest code that created 'of_root' if it was missing. Verify that 'of_root' is valid before attempting to attach the testcase-data subtree. Remove

[PATCH v3 7/7] of: Add KUnit test to confirm DTB is loaded

2024-02-02 Thread Stephen Boyd
Add a KUnit test that confirms a DTB has been loaded, i.e. there is a root node, and that the of_have_populated_dt() API works properly. Cc: Rob Herring Cc: Frank Rowand Cc: David Gow Cc: Brendan Higgins Signed-off-by: Stephen Boyd --- drivers/of/.kunitconfig | 3 +++ drivers/of/Kconfig

Re: [PATCH v8 0/4] Introduce mseal

2024-02-02 Thread Jeff Xu
On Fri, Feb 2, 2024 at 11:21 AM Liam R. Howlett wrote: > > * Jeff Xu [240202 12:24]: > > ... > > > > Provide code that uses this feature. > > Please do this too :) > Yes. Will do. > > > > > > Provide benchmark results where you apply mseal to 1, 2, 4, 8, 16, and > > > 32 VMAs. > > > > > I will

Re: [PATCH] kunit: device: Unregister the kunit_bus on shutdown

2024-02-02 Thread Rae Moar
On Thu, Feb 1, 2024 at 1:06 AM David Gow wrote: > > If KUnit is built as a module, and it's unloaded, the kunit_bus is not > unregistered. This causes an error if it's then re-loaded later, as we > try to re-register the bus. > > Unregister the bus and root_device on shutdown, if it looks valid. >

Re: [PATCH v8 0/4] Introduce mseal

2024-02-02 Thread Linus Torvalds
On Fri, 2 Feb 2024 at 11:32, Theo de Raadt wrote: > > Unix system calls must be atomic. > > They either return an error, and that is a promise they made no changes. That's actually not true, and never has been. It's a good thing to aim for, but several errors means "some or all may have been don

Re: [PATCH v8 0/4] Introduce mseal

2024-02-02 Thread Jeff Xu
On Fri, Feb 2, 2024 at 12:37 PM Linus Torvalds wrote: > > On Fri, 2 Feb 2024 at 11:32, Theo de Raadt wrote: > > > > Unix system calls must be atomic. > > > > They either return an error, and that is a promise they made no changes. > > That's actually not true, and never has been. > > It's a good

Re: [PATCH v8 0/4] Introduce mseal

2024-02-02 Thread Jeff Xu
On Fri, Feb 2, 2024 at 9:05 AM Theo de Raadt wrote: > > Another interaction to consider is sigaltstack(). > > In OpenBSD, sigaltstack() forces MAP_STACK onto the specified > (pre-allocated) region, because on kernel-entry we require the "sp" > register to point to a MAP_STACK region (this severely

Re: [PATCH v3] KVM: selftests: Fix the dirty_log_test semaphore imbalance

2024-02-02 Thread Sean Christopherson
On Fri, Feb 02, 2024, Sean Christopherson wrote: > On Fri, Feb 02, 2024, Shaoqin Huang wrote: > > --- > > v2->v3: > > - Rebase to v6.8-rc2. > > - Use TEST_ASSERT(). > > Patch says otherwise. > > > @@ -726,6 +728,11 @@ static void run_test(enum vm_guest_mode mode, void > > *arg) > >

Re: [PATCH v8 0/4] Introduce mseal

2024-02-02 Thread Liam R. Howlett
* Linus Torvalds [240202 15:37]: > On Fri, 2 Feb 2024 at 11:32, Theo de Raadt wrote: > > > > Unix system calls must be atomic. > > > > They either return an error, and that is a promise they made no changes. > > That's actually not true, and never has been. ... > > In the specific case of mse

Re: [PATCH v8 0/4] Introduce mseal

2024-02-02 Thread Jeff Xu
On Fri, Feb 2, 2024 at 10:52 AM Pedro Falcato wrote: > > On Fri, Feb 2, 2024 at 5:59 PM Jeff Xu wrote: > > > > On Thu, Feb 1, 2024 at 9:00 PM Theo de Raadt wrote: > > > > > > Jeff Xu wrote: > > > > > > > Even without free. > > > > I personally do not like the heap getting sealed like that. > >

Re: [PATCH bpf-next v3 0/6] Improvements for tracking scalars in the BPF verifier

2024-02-02 Thread patchwork-bot+netdevbpf
Hello: This series was applied to bpf/bpf-next.git (master) by Andrii Nakryiko : On Sat, 27 Jan 2024 19:52:31 +0200 you wrote: > From: Maxim Mikityanskiy > > The goal of this series is to extend the verifier's capabilities of > tracking scalars when they are spilled to stack, especially when th

Re: [PATCH] selftests/bpf: Use ARRAY_SIZE for array length

2024-02-02 Thread Martin KaFai Lau
On 2/2/24 1:06 AM, Jiapeng Chong wrote: Use of macro ARRAY_SIZE to calculate array size minimizes the redundant code and improves code reusability. ./tools/testing/selftests/bpf/progs/syscall.c:122:26-27: WARNING: Use ARRAY_SIZE. Reported-by: Abaci Robot Closes: https://bugzilla.openanolis.cn

Re: [PATCH v12 00/20] KVM: xen: update shared_info and vcpu_info handling

2024-02-02 Thread Sean Christopherson
On Fri, Feb 02, 2024, Paul Durrant wrote: > On 26/01/2024 01:19, Sean Christopherson wrote: > > On Thu, Jan 25, 2024, Paul Durrant wrote: > > > On 15/01/2024 12:56, Paul Durrant wrote: > > > > From: Paul Durrant > > > > > > > > This series has one small fix to what was in v11 [1]: > > > > > > >

Re: [PATCH bpf-next v4 0/3] Annotate kfuncs in .BTF_ids section

2024-02-02 Thread Manu Bretelle
On Sun, Jan 28, 2024 at 06:24:05PM -0700, Daniel Xu wrote: > === Description === > > This is a bpf-treewide change that annotates all kfuncs as such inside > .BTF_ids. This annotation eventually allows us to automatically generate > kfunc prototypes from bpftool. > > We store this metadata inside

Re: [PATCH v8 0/4] Introduce mseal

2024-02-02 Thread Linus Torvalds
On Fri, 2 Feb 2024 at 13:18, Liam R. Howlett wrote: > > There will be a larger performance cost to checking up front without > allowing the partial completion. I suspect that for mseal(), the only half-way common case will be sealing an area that is entirely contained within one vma. So the cost

Re: [PATCH net-next] selftests/net: ignore timing errors in so_txtime if KSFT_MACHINE_SLOW

2024-02-02 Thread Jakub Kicinski
On Thu, 1 Feb 2024 11:21:19 -0500 Willem de Bruijn wrote: > This test is time sensitive. It may fail on virtual machines and for > debug builds. > > Continue to run in these environments to get code coverage. But > optionally suppress failure for timing errors (only). This is > controlled with en

[PATCH RFT v5 0/7] fork: Support shadow stacks in clone3()

2024-02-02 Thread Mark Brown
The kernel has recently added support for shadow stacks, currently x86 only using their CET feature but both arm64 and RISC-V have equivalent features (GCS and Zicfiss respectively), I am actively working on GCS[1]. With shadow stacks the hardware maintains an additional stack containing only the

[PATCH RFT v5 1/7] Documentation: userspace-api: Add shadow stack API documentation

2024-02-02 Thread Mark Brown
There are a number of architectures with shadow stack features which we are presenting to userspace with as consistent an API as we can (though there are some architecture specifics). Especially given that there are some important considerations for userspace code interacting directly with the feat

[PATCH RFT v5 2/7] selftests: Provide helper header for shadow stack testing

2024-02-02 Thread Mark Brown
While almost all users of shadow stacks should be relying on the dynamic linker and libc to enable the feature there are several low level test programs where it is useful to enable without any libc support, allowing testing without full system enablement. This low level testing is helpful during b

[PATCH RFT v5 3/7] mm: Introduce ARCH_HAS_USER_SHADOW_STACK

2024-02-02 Thread Mark Brown
Since multiple architectures have support for shadow stacks and we need to select support for this feature in several places in the generic code provide a generic config option that the architectures can select. Suggested-by: David Hildenbrand Acked-by: David Hildenbrand Signed-off-by: Mark Brow

[PATCH RFT v5 4/7] fork: Add shadow stack support to clone3()

2024-02-02 Thread Mark Brown
Unlike with the normal stack there is no API for configuring the the shadow stack for a new thread, instead the kernel will dynamically allocate a new shadow stack with the same size as the normal stack. This appears to be due to the shadow stack series having been in development since before the m

[PATCH RFT v5 5/7] selftests/clone3: Factor more of main loop into test_clone3()

2024-02-02 Thread Mark Brown
In order to make it easier to add more configuration for the tests and more support for runtime detection of when tests can be run pass the structure describing the tests into test_clone3() rather than picking the arguments out of it and have that function do all the per-test work. No functional c

[PATCH RFT v5 6/7] selftests/clone3: Allow tests to flag if -E2BIG is a valid error code

2024-02-02 Thread Mark Brown
The clone_args structure is extensible, with the syscall passing in the length of the structure. Inside the kernel we use copy_struct_from_user() to read the struct but this has the unfortunate side effect of silently accepting some overrun in the structure size providing the extra data is all zero

[PATCH RFT v5 7/7] selftests/clone3: Test shadow stack support

2024-02-02 Thread Mark Brown
Add basic test coverage for specifying the shadow stack for a newly created thread via clone3(), including coverage of the newly extended argument structure. In order to facilitate testing on systems without userspace shadow stack support we manually enable shadow stacks on startup, this is archit

Re: [PATCH net-next] selftests/net: ignore timing errors in so_txtime if KSFT_MACHINE_SLOW

2024-02-02 Thread Willem de Bruijn
Jakub Kicinski wrote: > On Thu, 1 Feb 2024 11:21:19 -0500 Willem de Bruijn wrote: > > This test is time sensitive. It may fail on virtual machines and for > > debug builds. > > > > Continue to run in these environments to get code coverage. But > > optionally suppress failure for timing errors (o

Re: [PATCH v2 3/3] selftests: add zswapin and no zswap tests

2024-02-02 Thread Nhat Pham
On Thu, Feb 1, 2024 at 1:08 AM Yosry Ahmed wrote: > > Hey Nhat, > > I have a few more comments, sorry for not catching everything the first > time around. No worries :) > > Adding Roman to CC. > > On Wed, Jan 31, 2024 at 07:27:18PM -0800, Nhat Pham wrote: > > Add a selftest to cover the zswapin

Re: [PATCH bpf-next v4 0/3] Annotate kfuncs in .BTF_ids section

2024-02-02 Thread Daniel Xu
Hi Manu, On Fri, Feb 02, 2024 at 03:09:05PM -0800, Manu Bretelle wrote: > On Sun, Jan 28, 2024 at 06:24:05PM -0700, Daniel Xu wrote: > > === Description === > > > > This is a bpf-treewide change that annotates all kfuncs as such inside > > .BTF_ids. This annotation eventually allows us to automat

Re: [PATCH v2 3/3] selftests: add zswapin and no zswap tests

2024-02-02 Thread Yosry Ahmed
> > > +{ > > > + size_t size = (size_t)arg; > > > + char *mem = (char *)malloc(size); > > > + int ret = 0; > > > + > > > + if (!mem) > > > + return -1; > > > + for (int i = 0; i < size; i += 4095) > > > + mem[i] = 'a'; > > > > cgroup_util.h defines PAGE_S

Re: [RFC PATCH v2 19/29] selftests: ntsync: Add some tests for NTSYNC_IOC_WAIT_ANY.

2024-02-02 Thread Elizabeth Figura
On Wednesday, 31 January 2024 02:52:11 CST Andi Kleen wrote: > Elizabeth Figura writes: > > > +TEST(test_wait_any) > > +{ > > + struct ntsync_mutex_args mutex_args = {0}; > > + struct ntsync_wait_args wait_args = {0}; > > + struct ntsync_sem_args sem_args = {0}; > > + __u32 owner, index,

Re: [PATCH v3 7/7] of: Add KUnit test to confirm DTB is loaded

2024-02-02 Thread David Gow
On Sat, 3 Feb 2024 at 03:59, Stephen Boyd wrote: > > Add a KUnit test that confirms a DTB has been loaded, i.e. there is a > root node, and that the of_have_populated_dt() API works properly. > > Cc: Rob Herring > Cc: Frank Rowand > Cc: David Gow > Cc: Brendan Higgins > Signed-off-by: Stephen

Re: [PATCH v8 0/4] Introduce mseal

2024-02-02 Thread Liam R. Howlett
* Linus Torvalds [240202 18:36]: > On Fri, 2 Feb 2024 at 13:18, Liam R. Howlett wrote: > > > > There will be a larger performance cost to checking up front without > > allowing the partial completion. > > I suspect that for mseal(), the only half-way common case will be > sealing an area that is

Re: [PATCH v2 net 0/4] selftests: net: more fixes

2024-02-02 Thread patchwork-bot+netdevbpf
Hello: This series was applied to netdev/net.git (main) by Jakub Kicinski : On Thu, 1 Feb 2024 19:42:37 +0100 you wrote: > Another small bunch of fixes, addressing issues outlined by the > netdev CI. > > The first 2 patches are just rebased. > > The following 2 are new fixes, for even more pro

Re: [KTAP V2 PATCH v2] ktap_v2: add test metadata

2024-02-02 Thread David Gow
On Sat, 27 Jan 2024 at 06:15, Rae Moar wrote: > > Add specification for test metadata to the KTAP v2 spec. > > KTAP v1 only specifies the output format of very basic test information: > test result and test name. Any additional test information either gets > added to general diagnostic data or is