From: Stanislav Fomichev <sdf.kernel@gmail.com>
To: Xia Yan <yanxia@cmss.chinamobile.com>
Cc: netdev@vger.kernel.org, edumazet@kernel.org, kuniyu@google.com,
pabeni@redhat.com, willemb@google.com, davem@davemloft.net,
kuba@kernel.org, horms@kernel.org, asml.silence@gmail.com,
kaiyuanz@google.com, linux-kernel@vger.kernel.org,
almasrymina@google.com, yana06070@163.com
Subject: Re: [PATCH net-next] net: fix token index wraparound in SO_DEVMEM_DONTNEED
Date: Wed, 11 Nov 2026 14:16:46 -0800 [thread overview]
Message-ID: <avTocmy4u8HH0Yo0@devvm16445.scu0.facebook.com> (raw)
In-Reply-To: <20261110120331.13661-1-yanxia@cmss.chinamobile.com>
On 11/10, Xia Yan wrote:
> SO_DEVMEM_DONTNEED computes each index as token_start + j, in 32-bit
> unsigned arithmetic. A start of 0xfffffffe and a count of 4 produce
> indices 0xfffffffe, 0xffffffff, 0 and 1. Once the sum wraps, the loop
> can erase an existing low-numbered token from the same socket.
Sorry, I fail to understand what's the issue. This is (buggy) userspace
misusing the api and potentially removing different tokens, right?
So what are we fixing? Can you explain more?
prev parent reply other threads:[~2026-11-11 22:16 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-10 12:03 Xia Yan
2026-11-11 22:16 ` Stanislav Fomichev [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=avTocmy4u8HH0Yo0@devvm16445.scu0.facebook.com \
--to=sdf.kernel@gmail.com \
--cc=almasrymina@google.com \
--cc=asml.silence@gmail.com \
--cc=davem@davemloft.net \
--cc=edumazet@kernel.org \
--cc=horms@kernel.org \
--cc=kaiyuanz@google.com \
--cc=kuba@kernel.org \
--cc=kuniyu@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=willemb@google.com \
--cc=yana06070@163.com \
--cc=yanxia@cmss.chinamobile.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®