Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1641655 > unrolled thread

Re: [PATCH v8 1/5] skbuff: return -EMSGSIZE in skb_to_sgvec to prevent overflow

Started byDavid Howells <dhowells@redhat.com>
First post2017-05-15 15:20 +0200
Last post2017-05-17 00:20 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH v8 1/5] skbuff: return -EMSGSIZE in skb_to_sgvec to prevent overflow David Howells <dhowells@redhat.com> - 2017-05-15 15:20 +0200
    Re: [PATCH v8 1/5] skbuff: return -EMSGSIZE in skb_to_sgvec to  prevent overflow "Jason A. Donenfeld" <Jason@zx2c4.com> - 2017-05-17 00:20 +0200

#1641655 — Re: [PATCH v8 1/5] skbuff: return -EMSGSIZE in skb_to_sgvec to prevent overflow

FromDavid Howells <dhowells@redhat.com>
Date2017-05-15 15:20 +0200
SubjectRe: [PATCH v8 1/5] skbuff: return -EMSGSIZE in skb_to_sgvec to prevent overflow
Message-ID<tHo4O-fL-17@gated-at.bofh.it>
Jason A. Donenfeld <Jason@zx2c4.com> wrote:

> +int skb_to_sgvec(struct sk_buff *skb, struct scatterlist *sg, int offset, int len)
> ...
> -int skb_to_sgvec(struct sk_buff *skb, struct scatterlist *sg, int offset, int len)

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)?

David

[toc] | [next] | [standalone]


#1642870 — Re: [PATCH v8 1/5] skbuff: return -EMSGSIZE in skb_to_sgvec to prevent overflow

From"Jason A. Donenfeld" <Jason@zx2c4.com>
Date2017-05-17 00:20 +0200
SubjectRe: [PATCH v8 1/5] skbuff: return -EMSGSIZE in skb_to_sgvec to prevent overflow
Message-ID<tHSYW-371-15@gated-at.bofh.it>
In reply to#1641655
On Mon, May 15, 2017 at 3:12 PM, David Howells <dhowells@redhat.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.

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web