lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHS8izMgmSQPPqu4xo1To=4vFvJi+cxP72KewhMJ+BqDbka0hQ@mail.gmail.com>
Date: Mon, 16 Jun 2025 09:50:30 -0700
From: Mina Almasry <almasrymina@...gle.com>
To: Stanislav Fomichev <stfomichev@...il.com>
Cc: netdev@...r.kernel.org, linux-kernel@...r.kernel.org, 
	"David S. Miller" <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>, 
	Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>, Simon Horman <horms@...nel.org>, 
	willemb@...gle.com, sdf@...ichev.me, asml.silence@...il.com
Subject: Re: [PATCH net v1] net: netmem: fix skb_ensure_writable with
 unreadable skbs

On Mon, Jun 16, 2025 at 7:38 AM Stanislav Fomichev <stfomichev@...il.com> wrote:
>
> On 06/15, Mina Almasry wrote:
> > skb_ensure_writable should succeed when it's trying to write to the
> > header of the unreadable skbs, so it doesn't need an unconditional
> > skb_frags_readable check. The preceding pskb_may_pull() call will
> > succeed if write_len is within the head and fail if we're trying to
> > write to the unreadable payload, so we don't need an additional check.
> >
> > Removing this check restores DSCP functionality with unreadable skbs as
> > it's called from dscp_tg.
>
> Can you share more info on which use-case (or which call sites) you're
> trying to fix?

Hi Stan,

It's the use case of setting a DSCP header, and the call site is
dscp_tg() -> skb_ensure_writable.

Repro steps should roughly be:

# Set DSCP header
sudo iptables -tmangle -A POSTROUTING -p tcp -m comment --comment
"foo" -j DSCP --set-dscp 0x08

# then run some unreadable netmem workload.

Before this change you should see 0 throughput, after this change the
unreadable netmem workload should work as expected.

-- 
Thanks,
Mina

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ