Re: [PATCH bpf-next 0/2] bpf: add csum/ip_summed fields to __sk_buff

2024-01-02 Thread Menglong Dong
On Wed, Jan 3, 2024 at 11:55 AM Yonghong Song wrote: > > > On 1/2/24 6:54 PM, Menglong Dong wrote: > > On Wed, Jan 3, 2024 at 8:52 AM Martin KaFai Lau > > wrote: > >> On 1/2/24 10:11 AM, Stanislav Fomichev wrote: > >>> On 12/29, Menglong Dong wrote: > For now, we have to call some helpers

Re: [PATCH bpf-next 0/2] bpf: add csum/ip_summed fields to __sk_buff

2024-01-02 Thread Yonghong Song
On 1/2/24 6:54 PM, Menglong Dong wrote: On Wed, Jan 3, 2024 at 8:52 AM Martin KaFai Lau wrote: On 1/2/24 10:11 AM, Stanislav Fomichev wrote: On 12/29, Menglong Dong wrote: For now, we have to call some helpers when we need to update the csum, such as bpf_l4_csum_replace,

Re: [PATCH v10 10/10] iommu/vt-d: Add iotlb flush for nested domain

2024-01-02 Thread Baolu Lu
On 2024/1/3 9:33, Yi Liu wrote: On 2024/1/3 02:44, Jason Gunthorpe wrote: On Tue, Jan 02, 2024 at 06:38:34AM -0800, Yi Liu wrote: +static void intel_nested_flush_cache(struct dmar_domain *domain, u64 addr, + unsigned long npages, bool ih, u32 *error) +{ +    struct

Re: [PATCH bpf-next 0/2] bpf: add csum/ip_summed fields to __sk_buff

2024-01-02 Thread Menglong Dong
On Wed, Jan 3, 2024 at 8:52 AM Martin KaFai Lau wrote: > > On 1/2/24 10:11 AM, Stanislav Fomichev wrote: > > On 12/29, Menglong Dong wrote: > >> For now, we have to call some helpers when we need to update the csum, > >> such as bpf_l4_csum_replace, bpf_l3_csum_replace, etc. These helpers are >

Re: [PATCH v7 1/3] iommufd: Add data structure for Intel VT-d stage-1 cache invalidation

2024-01-02 Thread Yi Liu
On 2024/1/3 07:38, Jason Gunthorpe wrote: On Fri, Dec 15, 2023 at 12:01:19PM +0800, Yi Liu wrote: I think I misread Yi's narrative: dev_id is a working approach for VMM to convert to a vRID, while he is asking for a better alternative :) In concept, dev_id works, but in reality we have

Re: [PATCH v2 1/1] userfaultfd: fix move_pages_pte() splitting folio under RCU read lock

2024-01-02 Thread Peter Xu
On Tue, Jan 02, 2024 at 03:32:56PM -0800, Suren Baghdasaryan wrote: > While testing the split PMD path with lockdep enabled I've got an > "Invalid wait context" error caused by split_huge_page_to_list() trying > to lock anon_vma->rwsem while inside RCU read section. The issues is due > to

Re: [PATCH v10 10/10] iommu/vt-d: Add iotlb flush for nested domain

2024-01-02 Thread Yi Liu
On 2024/1/3 02:44, Jason Gunthorpe wrote: On Tue, Jan 02, 2024 at 06:38:34AM -0800, Yi Liu wrote: +static void intel_nested_flush_cache(struct dmar_domain *domain, u64 addr, +unsigned long npages, bool ih, u32 *error) +{ + struct iommu_domain_info

Re: [PATCH bpf-next 0/2] bpf: add csum/ip_summed fields to __sk_buff

2024-01-02 Thread Martin KaFai Lau
On 1/2/24 10:11 AM, Stanislav Fomichev wrote: On 12/29, Menglong Dong wrote: For now, we have to call some helpers when we need to update the csum, such as bpf_l4_csum_replace, bpf_l3_csum_replace, etc. These helpers are not inlined, which causes poor performance. In fact, we can define our

Re: [PATCH v7 1/3] iommufd: Add data structure for Intel VT-d stage-1 cache invalidation

2024-01-02 Thread Jason Gunthorpe
On Fri, Dec 15, 2023 at 12:01:19PM +0800, Yi Liu wrote: > > I think I misread Yi's narrative: dev_id is a working approach > > for VMM to convert to a vRID, while he is asking for a better > > alternative :) > > In concept, dev_id works, but in reality we have problem to get a dev_id > for a

Re: [PATCH 1/1] userfaultfd: fix move_pages_pte() splitting folio under RCU read lock

2024-01-02 Thread Suren Baghdasaryan
On Tue, Jan 2, 2024 at 3:16 PM Suren Baghdasaryan wrote: > > On Tue, Jan 2, 2024 at 8:58 AM Suren Baghdasaryan wrote: > > > > On Tue, Jan 2, 2024 at 1:00 AM Peter Xu wrote: > > > > > > On Fri, Dec 29, 2023 at 06:56:07PM -0800, Suren Baghdasaryan wrote: > > > > @@ -1078,9 +1078,14 @@ static int

[PATCH v2 1/1] userfaultfd: fix move_pages_pte() splitting folio under RCU read lock

2024-01-02 Thread Suren Baghdasaryan
While testing the split PMD path with lockdep enabled I've got an "Invalid wait context" error caused by split_huge_page_to_list() trying to lock anon_vma->rwsem while inside RCU read section. The issues is due to move_pages_pte() calling split_folio() under RCU read lock. Fix this by unmapping

Re: [PATCH 1/1] userfaultfd: fix move_pages_pte() splitting folio under RCU read lock

2024-01-02 Thread Suren Baghdasaryan
On Tue, Jan 2, 2024 at 8:58 AM Suren Baghdasaryan wrote: > > On Tue, Jan 2, 2024 at 1:00 AM Peter Xu wrote: > > > > On Fri, Dec 29, 2023 at 06:56:07PM -0800, Suren Baghdasaryan wrote: > > > @@ -1078,9 +1078,14 @@ static int move_pages_pte(struct mm_struct *mm, > > > pmd_t *dst_pmd, pmd_t

Re: [PATCH v3 4/4] selftest/bpf: Test a perf bpf program that suppresses side effects.

2024-01-02 Thread Song Liu
On Sun, Dec 10, 2023 at 8:56 PM Kyle Huey wrote: > > The test sets a hardware breakpoint and uses a bpf program to suppress the > side effects of a perf event sample, including I/O availability signals, > SIGTRAPs, and decrementing the event counter limit, if the ip matches the > expected value.

Re: [PATCH RESEND v4 1/3] kselftests: lib.mk: Add TEST_GEN_MODS_DIR variable

2024-01-02 Thread Joe Lawrence
On Wed, Dec 20, 2023 at 01:53:12PM -0300, Marcos Paulo de Souza wrote: > Add TEST_GEN_MODS_DIR variable for kselftests. It can point to > a directory containing kernel modules that will be used by > selftest scripts. > > The modules are built as external modules for the running kernel. > As a

Re: [PATCH] selftests: Move KTAP bash helpers to selftests common folder

2024-01-02 Thread Nícolas F . R . A . Prado
On Tue, Jan 02, 2024 at 03:15:28PM +0100, Laura Nao wrote: > Move bash helpers for outputting in KTAP format to the common selftests > folder. This allows kselftests other than the dt one to source the file > and make use of the helper functions. > Define pass, fail and skip codes in the same file

Re: [PATCH v10 00/10] Add iommufd nesting (part 2/2)

2024-01-02 Thread Jason Gunthorpe
On Tue, Jan 02, 2024 at 06:38:24AM -0800, Yi Liu wrote: > Lu Baolu (4): > iommu: Add cache_invalidate_user op > iommu/vt-d: Allow qi_submit_sync() to return the QI faults > iommu/vt-d: Convert stage-1 cache invalidation to return QI fault > iommu/vt-d: Add iotlb flush for nested domain >

Re: [PATCH v10 10/10] iommu/vt-d: Add iotlb flush for nested domain

2024-01-02 Thread Jason Gunthorpe
On Tue, Jan 02, 2024 at 06:38:34AM -0800, Yi Liu wrote: > +static void intel_nested_flush_cache(struct dmar_domain *domain, u64 addr, > + unsigned long npages, bool ih, u32 *error) > +{ > + struct iommu_domain_info *info; > + unsigned long i; > +

Re: [PATCH bpf-next 0/2] bpf: add csum/ip_summed fields to __sk_buff

2024-01-02 Thread Stanislav Fomichev
On 12/29, Menglong Dong wrote: > For now, we have to call some helpers when we need to update the csum, > such as bpf_l4_csum_replace, bpf_l3_csum_replace, etc. These helpers are > not inlined, which causes poor performance. > > In fact, we can define our own csum update functions in BPF program

Re: [PATCH v7 1/3] iommufd: Add data structure for Intel VT-d stage-1 cache invalidation

2024-01-02 Thread Jason Gunthorpe
On Fri, Dec 15, 2023 at 01:50:07AM +, Tian, Kevin wrote: > > - Reuse Nicolin's vRID->pRID mapping. If thevRID->pRID mapping is > > maintained, then intel iommu can report a vRID back to user. But intel > > iommu driver does not have viommu context, no place to hold the vRID- > > >pRID > >

Re: [PATCH v8 21/24] evm: Move to LSM infrastructure

2024-01-02 Thread Mimi Zohar
On Tue, 2024-01-02 at 12:56 +0100, Roberto Sassu wrote: > On 12/26/2023 11:13 PM, Mimi Zohar wrote: > > On Thu, 2023-12-14 at 18:08 +0100, Roberto Sassu wrote: > >> From: Roberto Sassu > >> > >> As for IMA, move hardcoded EVM function calls from various places in the > >> kernel to the LSM

Re: [PATCH net-next v2 2/3] net: gro: parse ipv6 ext headers without frag0 invalidation

2024-01-02 Thread Eric Dumazet
On Tue, Jan 2, 2024 at 2:25 PM Richard Gobert wrote: > > The existing code always pulls the IPv6 header and sets the transport > offset initially. Then optionally again pulls any extension headers in > ipv6_gso_pull_exthdrs and sets the transport offset again on return from > that call. skb->data

Re: [PATCH net-next v2 1/3] net: gso: add HBH extension header offload support

2024-01-02 Thread Eric Dumazet
On Tue, Jan 2, 2024 at 2:21 PM Richard Gobert wrote: > > This commit adds net_offload to IPv6 Hop-by-Hop extension headers (as it > is done for routing and dstopts) since it is supported in GSO and GRO. > This allows to remove specific HBH conditionals in GSO and GRO when > pulling and parsing an

Re: [PATCH 1/1] userfaultfd: fix move_pages_pte() splitting folio under RCU read lock

2024-01-02 Thread Suren Baghdasaryan
On Tue, Jan 2, 2024 at 1:00 AM Peter Xu wrote: > > On Fri, Dec 29, 2023 at 06:56:07PM -0800, Suren Baghdasaryan wrote: > > @@ -1078,9 +1078,14 @@ static int move_pages_pte(struct mm_struct *mm, > > pmd_t *dst_pmd, pmd_t *src_pmd, > > > > /* at this point we have src_folio locked */

Re: [PATCH net-next v2 2/3] net: gro: parse ipv6 ext headers without frag0 invalidation

2024-01-02 Thread David Ahern
On 1/2/24 6:24 AM, Richard Gobert wrote: > The existing code always pulls the IPv6 header and sets the transport > offset initially. Then optionally again pulls any extension headers in > ipv6_gso_pull_exthdrs and sets the transport offset again on return from > that call. skb->data is set at the

Re: [PATCH net-next v2 1/3] net: gso: add HBH extension header offload support

2024-01-02 Thread David Ahern
On 1/2/24 6:20 AM, Richard Gobert wrote: > This commit adds net_offload to IPv6 Hop-by-Hop extension headers (as it > is done for routing and dstopts) since it is supported in GSO and GRO. > This allows to remove specific HBH conditionals in GSO and GRO when > pulling and parsing an incoming

Re: [PATCH net-next v2 3/3] selftests/net: fix GRO coalesce test and add ext header coalesce tests

2024-01-02 Thread Willem de Bruijn
Richard Gobert wrote: > Currently there is no test which checks that IPv6 extension header packets > successfully coalesce. This commit adds a test, which verifies two IPv6 > packets with HBH extension headers do coalesce, and another test which > checks that packets with different extension

[PATCH v10 10/10] iommu/vt-d: Add iotlb flush for nested domain

2024-01-02 Thread Yi Liu
From: Lu Baolu This implements the .cache_invalidate_user() callback to support iotlb flush for nested domain. Reviewed-by: Kevin Tian Signed-off-by: Lu Baolu Co-developed-by: Yi Liu Signed-off-by: Yi Liu --- drivers/iommu/intel/nested.c | 107 +++ 1 file

[PATCH v10 09/10] iommufd: Add data structure for Intel VT-d stage-1 cache invalidation

2024-01-02 Thread Yi Liu
This adds the data structure invalidating caches for the nested domain allocated with IOMMU_HWPT_DATA_VTD_S1 type. Reviewed-by: Kevin Tian Signed-off-by: Lu Baolu Signed-off-by: Yi Liu --- include/uapi/linux/iommufd.h | 58 1 file changed, 58 insertions(+)

[PATCH v10 08/10] iommu/vt-d: Convert stage-1 cache invalidation to return QI fault

2024-01-02 Thread Yi Liu
From: Lu Baolu This makes the pasid based cache invalidation and device TLB invalidation to return QI faults to callers. This is needed when usersapce invalidates cache after modifying the stage-1 page table used in nested translation. Hardware errors during invalidation should be reported to

[PATCH v10 07/10] iommu/vt-d: Allow qi_submit_sync() to return the QI faults

2024-01-02 Thread Yi Liu
From: Lu Baolu This allows qi_submit_sync() to return back faults to callers. qi_submit_sync() has a retry when timeout error happens, thus it cannot return timeout error back to the caller. This was discussed in a separate thread [1]. Here we keep it intact and just make sure no retry for the

[PATCH v10 06/10] iommufd/selftest: Add coverage for IOMMU_HWPT_INVALIDATE ioctl

2024-01-02 Thread Yi Liu
From: Nicolin Chen Add test cases for the IOMMU_HWPT_INVALIDATE ioctl and verify it by using the new IOMMU_TEST_OP_MD_CHECK_IOTLB. Reviewed-by: Kevin Tian Signed-off-by: Nicolin Chen Co-developed-by: Yi Liu Signed-off-by: Yi Liu --- tools/testing/selftests/iommu/iommufd.c | 186

[PATCH v10 05/10] iommufd/selftest: Add IOMMU_TEST_OP_MD_CHECK_IOTLB test op

2024-01-02 Thread Yi Liu
From: Nicolin Chen Allow to test whether IOTLB has been invalidated or not. Reviewed-by: Kevin Tian Signed-off-by: Nicolin Chen Signed-off-by: Yi Liu --- drivers/iommu/iommufd/iommufd_test.h | 5 drivers/iommu/iommufd/selftest.c | 26 +++

[PATCH v10 04/10] iommufd/selftest: Add mock_domain_cache_invalidate_user support

2024-01-02 Thread Yi Liu
From: Nicolin Chen Add mock_domain_cache_invalidate_user() data structure to support user space selftest program to cover user cache invalidation pathway. Reviewed-by: Kevin Tian Signed-off-by: Nicolin Chen Co-developed-by: Yi Liu Signed-off-by: Yi Liu ---

[PATCH v10 03/10] iommu: Add iommu_copy_struct_from_user_array helper

2024-01-02 Thread Yi Liu
From: Nicolin Chen Wrap up the data pointer/num sanity and __iommu_copy_struct_from_user call for iommu drivers to copy driver specific data at a specific location in the struct iommu_user_data_array, and iommu_respond_struct_to_user_array() to copy response to a specific location in the struct

[PATCH v10 02/10] iommufd: Add IOMMU_HWPT_INVALIDATE

2024-01-02 Thread Yi Liu
In nested translation, the stage-1 page table is user-managed but cached by the IOMMU hardware, so an update on present page table entries in the stage-1 page table should be followed with a cache invalidation. Add an IOMMU_HWPT_INVALIDATE ioctl to support such a cache invalidation. It takes

[PATCH v10 01/10] iommu: Add cache_invalidate_user op

2024-01-02 Thread Yi Liu
From: Lu Baolu The updates of the PTEs in the nested page table will be propagated to the hardware caches. Add a new domain op cache_invalidate_user for the userspace to flush the hardware caches for a nested domain through iommufd. No wrapper for it, as it's only supposed to be used by

[PATCH v10 00/10] Add iommufd nesting (part 2/2)

2024-01-02 Thread Yi Liu
Nested translation is a hardware feature that is supported by many modern IOMMU hardwares. It has two stages (stage-1, stage-2) address translation to get access to the physical address. stage-1 translation table is owned by userspace (e.g. by a guest OS), while stage-2 is owned by kernel. Changes

Re: [PATCH] kselftest: Add basic test for probing the rust sample modules

2024-01-02 Thread Laura Nao
On 12/21/23 20:46, Miguel Ojeda wrote: > On Fri, Dec 15, 2023 at 2:21 PM Laura Nao > wrote: >> >> Add new basic kselftest that checks if the available rust sample >> modules >> can be added and removed correctly. >> >> Signed-off-by: Laura Nao > > Thanks Laura! > > Shuah: do you want that we

[PATCH] selftests: Move KTAP bash helpers to selftests common folder

2024-01-02 Thread Laura Nao
Move bash helpers for outputting in KTAP format to the common selftests folder. This allows kselftests other than the dt one to source the file and make use of the helper functions. Define pass, fail and skip codes in the same file too. Signed-off-by: Laura Nao ---

Re: [PATCH net-next 0/4] mptcp: add CurrEstab MIB counter

2024-01-02 Thread patchwork-bot+netdevbpf
Hello: This series was applied to netdev/net-next.git (main) by David S. Miller : On Fri, 22 Dec 2023 13:47:21 +0100 you wrote: > This MIB counter is similar to the one of TCP -- CurrEstab -- available > in /proc/net/snmp. This is useful to quickly list the number of MPTCP > connections without

Re: [PATCH net-next 0/2] selftest/net: Some more TCP-AO selftest post-merge fixups

2024-01-02 Thread patchwork-bot+netdevbpf
Hello: This series was applied to netdev/net-next.git (main) by David S. Miller : On Fri, 22 Dec 2023 01:59:05 + you wrote: > Note that there's another post-merge fix for TCP-AO selftests, but that > doesn't conflict with these, so I don't resend that: > >

[PATCH net-next v2 3/3] selftests/net: fix GRO coalesce test and add ext header coalesce tests

2024-01-02 Thread Richard Gobert
Currently there is no test which checks that IPv6 extension header packets successfully coalesce. This commit adds a test, which verifies two IPv6 packets with HBH extension headers do coalesce, and another test which checks that packets with different extension header data do not coalesce in GRO.

[PATCH net-next v2 2/3] net: gro: parse ipv6 ext headers without frag0 invalidation

2024-01-02 Thread Richard Gobert
The existing code always pulls the IPv6 header and sets the transport offset initially. Then optionally again pulls any extension headers in ipv6_gso_pull_exthdrs and sets the transport offset again on return from that call. skb->data is set at the start of the first extension header before

[PATCH net-next v2 1/3] net: gso: add HBH extension header offload support

2024-01-02 Thread Richard Gobert
This commit adds net_offload to IPv6 Hop-by-Hop extension headers (as it is done for routing and dstopts) since it is supported in GSO and GRO. This allows to remove specific HBH conditionals in GSO and GRO when pulling and parsing an incoming packet. Signed-off-by: Richard Gobert Reviewed-by:

[PATCH net-next v2 0/3] net: gro: reduce extension header parsing overhead

2024-01-02 Thread Richard Gobert
This series attempts to reduce the parsing overhead of IPv6 extension headers in GRO and GSO, by removing extension header specific code and enabling the frag0 fast path. The following changes were made: - Removed some unnecessary HBH conditionals by adding HBH offload to inet6_offloads -

Re: [RFC PATCH v3 0/3] Add test to verify probe of devices from discoverable busses

2024-01-02 Thread Nícolas F . R . A . Prado
On Tue, Jan 02, 2024 at 10:45:59AM +0300, Dan Carpenter wrote: > Life hack: Don't put RFC in the subject. Especially if it's a v2 or > higher. No one reads RFC patches. Thanks for the tip. I've had a mixed experience with RFC series in the past, though this time around I did get some feedback

Re: [PATCH v8 21/24] evm: Move to LSM infrastructure

2024-01-02 Thread Roberto Sassu
On 12/26/2023 11:13 PM, Mimi Zohar wrote: On Thu, 2023-12-14 at 18:08 +0100, Roberto Sassu wrote: From: Roberto Sassu As for IMA, move hardcoded EVM function calls from various places in the kernel to the LSM infrastructure, by introducing a new LSM named 'evm' (last and always enabled like

Re: [PATCH v2 net-next] selftests/net: change shebang to bash to support "source"

2024-01-02 Thread Guillaume Nault
On Tue, Jan 02, 2024 at 04:20:16PM +0800, Yujie Liu wrote: > On Sun, Dec 31, 2023 at 01:17:11PM +0100, Guillaume Nault wrote: > > On Fri, Dec 29, 2023 at 09:19:31PM +0800, Yujie Liu wrote: > > > The patch set [1] added a general lib.sh in net selftests, and converted > > > several test scripts to

Re: [PATCH v8 23/24] ima: Make it independent from 'integrity' LSM

2024-01-02 Thread Roberto Sassu
On 12/27/2023 8:21 PM, Mimi Zohar wrote: On Wed, 2023-12-27 at 17:39 +0100, Roberto Sassu wrote: On 12/27/2023 2:22 PM, Mimi Zohar wrote: On Thu, 2023-12-14 at 18:08 +0100, Roberto Sassu wrote: From: Roberto Sassu Make the 'ima' LSM independent from the 'integrity' LSM by introducing IMA

Re: [PATCH 1/1] userfaultfd: fix move_pages_pte() splitting folio under RCU read lock

2024-01-02 Thread Peter Xu
On Fri, Dec 29, 2023 at 06:56:07PM -0800, Suren Baghdasaryan wrote: > @@ -1078,9 +1078,14 @@ static int move_pages_pte(struct mm_struct *mm, pmd_t > *dst_pmd, pmd_t *src_pmd, > > /* at this point we have src_folio locked */ > if (folio_test_large(src_folio)) { > +

[PATCH] mm/selftests: hugepage-mremap: conform test to TAP format output

2024-01-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/hugepage-mremap.c | 87 1 file changed, 35 insertions(+), 52

Re: [PATCH v2 net-next] selftests/net: change shebang to bash to support "source"

2024-01-02 Thread Yujie Liu
On Sun, Dec 31, 2023 at 01:17:11PM +0100, Guillaume Nault wrote: > On Fri, Dec 29, 2023 at 09:19:31PM +0800, Yujie Liu wrote: > > The patch set [1] added a general lib.sh in net selftests, and converted > > several test scripts to source the lib.sh. > > > > unicast_extensions.sh (converted in