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]
Date:   Mon, 13 Feb 2023 17:28:16 +0800
From:   Herbert Xu <herbert@...dor.apana.org.au>
To:     Linus Torvalds <torvalds@...ux-foundation.org>
Cc:     david@...morbit.com, metze@...ba.org, axboe@...nel.dk,
        linux-fsdevel@...r.kernel.org, linux-api@...r.kernel.org,
        io-uring@...r.kernel.org, linux-kernel@...r.kernel.org,
        viro@...iv.linux.org.uk, samba-technical@...ts.samba.org
Subject: Re: copy on write for splice() from file to pipe?

Linus Torvalds <torvalds@...ux-foundation.org> wrote:
>
> Ok, so I decided to try to take a look.
> 
> Somebody who actually does networking (and drivers in particular)
> should probably check this, but it *looks* like the IPv4 TCP case
> (just to pick the ony I looked at) gores through
> tcp_sendpage_locked(), which does
> 
>        if (!(sk->sk_route_caps & NETIF_F_SG))
>                return sock_no_sendpage_locked(sk, page, offset, size, flags);
> 
> which basically says "if you can't handle fragmented socket buffers,
> do that 'no_sendpage' case".
> 
> So that will basically end up just falling back to a kernel
> 'sendmsg()', which does a copy and then it's stable.
> 
> But for the networks that *can* handle fragmented socket buffers, it
> then calls do_tcp_sendpages() instead, which just creates a skb
> fragment of the page (with tcp_build_frag()).
> 
> I wonder if that case should just require NETIF_F_HW_CSUM?

NETIF_F_SG already depends on checksum offload (either via
NETIF_F_HW_CSUM or something else that is equivalent).

So are you guys just imagining non-existant problems?

Cheers,
-- 
Email: Herbert Xu <herbert@...dor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ