mbox series

[net-next,v1,0/7] devmem TCP fixes

Message ID 20241029205524.1306364-1-almasrymina@google.com (mailing list archive)
Headers show
Series devmem TCP fixes | expand

Message

Mina Almasry Oct. 29, 2024, 8:55 p.m. UTC
A few unrelated devmem TCP fixes bundled in a series for some
convenience (if that's ok).

Patch 1-2: fix naming and provide page_pool_alloc_netmem for fragged
netmem.

Patch 3-4: fix issues with dma-buf dma addresses being potentially
passed to dma_sync_for_* helpers.

Patch 5-6: fix syzbot SO_DEVMEM_DONTNEED issue and add test for this
case.


Mina Almasry (6):
  net: page_pool: rename page_pool_alloc_netmem to *_netmems
  net: page_pool: create page_pool_alloc_netmem
  page_pool: disable sync for cpu for dmabuf memory provider
  netmem: add netmem_prefetch
  net: fix SO_DEVMEM_DONTNEED looping too long
  ncdevmem: add test for too many token_count

Samiullah Khawaja (1):
  page_pool: Set `dma_sync` to false for devmem memory provider

 include/net/netmem.h                   |  7 ++++
 include/net/page_pool/helpers.h        | 50 ++++++++++++++++++--------
 include/net/page_pool/types.h          |  2 +-
 net/core/devmem.c                      |  9 +++--
 net/core/page_pool.c                   | 11 +++---
 net/core/sock.c                        | 46 ++++++++++++++----------
 tools/testing/selftests/net/ncdevmem.c | 11 ++++++
 7 files changed, 93 insertions(+), 43 deletions(-)

Comments

Jakub Kicinski Nov. 1, 2024, 2:41 a.m. UTC | #1
On Tue, 29 Oct 2024 20:55:20 +0000 Mina Almasry wrote:
> A few unrelated devmem TCP fixes bundled in a series for some
> convenience (if that's ok).

These two should go to net I presume? It's missing input validation.

Either way you gotta repost either as two properly separate series,
or combine them as one, cause right now they are neither and patchwork
doesn't recognize they are related.
Mina Almasry Nov. 1, 2024, 1:14 p.m. UTC | #2
On Thu, Oct 31, 2024 at 7:42 PM Jakub Kicinski <kuba@kernel.org> wrote:
>
> On Tue, 29 Oct 2024 20:55:20 +0000 Mina Almasry wrote:
> > A few unrelated devmem TCP fixes bundled in a series for some
> > convenience (if that's ok).
>
> These two should go to net I presume? It's missing input validation.
>
> Either way you gotta repost either as two properly separate series,
> or combine them as one, cause right now they are neither and patchwork
> doesn't recognize they are related.
>

Yeah my apologies. I made a mistake posting the series and posted the
cover letter twice. Looks like that confused patchwork very much.

I'll also repost targeting net since these are fixes to existing code.

But what is the 'missing input validation'? Do you mean the input
validation for the SO_DEVMEM_DONTNEED API? That should be handled in
the patch  "net: fix SO_DEVMEM_DONTNEED looping too long" in this
series, unless I missed something.

--
Thanks,
Mina
Jakub Kicinski Nov. 2, 2024, 2:27 a.m. UTC | #3
On Fri, 1 Nov 2024 06:14:14 -0700 Mina Almasry wrote:
> But what is the 'missing input validation'? Do you mean the input
> validation for the SO_DEVMEM_DONTNEED API? That should be handled in
> the patch  "net: fix SO_DEVMEM_DONTNEED looping too long" in this
> series, unless I missed something.

I guess it's borderline but to me it feels like net material.
It changes the user visible behavior. Someone can write their
code to free 2k tokens on 6.12 and it will break on 6.13.
I don't feel strongly but the way the series ended up getting
split I figured maybe it was also your intuition. If you do
follow the net path -- please move the refactor out to the net-next
series.