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: <20230526201202.1cd35fe9@kernel.org>
Date:   Fri, 26 May 2023 20:12:02 -0700
From:   Jakub Kicinski <kuba@...nel.org>
To:     David Howells <dhowells@...hat.com>
Cc:     netdev@...r.kernel.org, "David S. Miller" <davem@...emloft.net>,
        Eric Dumazet <edumazet@...gle.com>,
        Paolo Abeni <pabeni@...hat.com>,
        Willem de Bruijn <willemdebruijn.kernel@...il.com>,
        David Ahern <dsahern@...nel.org>,
        Matthew Wilcox <willy@...radead.org>,
        Jens Axboe <axboe@...nel.dk>, linux-mm@...ck.org,
        linux-kernel@...r.kernel.org, Tom Herbert <tom@...bertland.com>,
        Tom Herbert <tom@...ntonium.net>
Subject: Re: [PATCH net-next 3/4] kcm: Support MSG_SPLICE_PAGES

On Wed, 24 May 2023 15:49:22 +0100 David Howells wrote:
> +			err = skb_splice_from_iter(skb, &msg->msg_iter, copy,
> +						   sk->sk_allocation);
> +			if (err < 0) {
> +				if (err == -EMSGSIZE)
> +					goto wait_for_memory;
> +				goto out_error;
> +			}
>  

should there be a:

		copy = err;
or:
		copy -= msg_data_left(msg);

or some such here? Can we safely assume that skb_splice_from_iter() will
copy all or nothing? 

> -		err = skb_copy_to_page_nocache(sk, &msg->msg_iter, skb,
> -					       pfrag->page,
> -					       pfrag->offset,
> -					       copy);
> -		if (err)
> -			goto out_error;
> +			skb_shinfo(skb)->flags |= SKBFL_SHARED_FRAG;

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ