Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Wed, 17 May 2017 00:11:03 +0200
From: "Jason A. Donenfeld" <Jason@...c4.com>
To: David Howells <dhowells@...hat.com>
Cc: Netdev <netdev@...r.kernel.org>, LKML <linux-kernel@...r.kernel.org>, 
	David Miller <davem@...emloft.net>, kernel-hardening@...ts.openwall.com, 
	Steffen Klassert <steffen.klassert@...unet.com>, Herbert Xu <herbert@...dor.apana.org.au>, 
	Sabrina Dubroca <sd@...asysnail.net>, "Michael S. Tsirkin" <mst@...hat.com>, Jason Wang <jasowang@...hat.com>
Subject: Re: [PATCH v8 1/5] skbuff: return -EMSGSIZE in skb_to_sgvec to
 prevent overflow

On Mon, May 15, 2017 at 3:12 PM, David Howells <dhowells@...hat.com> wrote:
> Is there a reason you moved skb_to_sgvec() in the file rather than just moving
> the comment to it (since you moved the comment anyway)?

1) Because it's easier to understand skb_to_sgvec_nomark as a variant
of skb_to_sgvec, so I'd rather skb_to_sgvec to be first when reading.
2) Because skb_to_sgvec relies on the return value of __skb_to_sgvec,
and so when assessing it, it's sometimes nice to be able to look at
why it will return different things. In that case, it's easier to have
both functions within the same view without scrolling.

It's the little things that make life easier sometimes.

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.