Re: [PATCH v7 0/5] skb_to_sgvec hardening

2017-05-09 Thread Jason A. Donenfeld
On Tue, May 9, 2017 at 4:03 PM, Johannes Berg wrote: > Perhaps you should add __must_check annotation to the function > prototype(s)? Great idea. I've started doing this in my own code. Wasn't sure how popular it was outside of there, but I'm glad to hear a suggestion

Re: [PATCH v7 0/5] skb_to_sgvec hardening

2017-05-09 Thread Jason A. Donenfeld
On Tue, May 9, 2017 at 4:03 PM, Johannes Berg wrote: > Perhaps you should add __must_check annotation to the function > prototype(s)? Great idea. I've started doing this in my own code. Wasn't sure how popular it was outside of there, but I'm glad to hear a suggestion of it now. I'll have this

Re: [PATCH v7 0/5] skb_to_sgvec hardening

2017-05-09 Thread Johannes Berg
On Tue, 2017-05-09 at 15:50 +0200, Jason A. Donenfeld wrote: > The recent bug with macsec and historical one with virtio have > indicated that letting skb_to_sgvec trounce all over an sglist > without checking the length is probably a bad idea. And it's not > necessary either: an sglist already

Re: [PATCH v7 0/5] skb_to_sgvec hardening

2017-05-09 Thread Johannes Berg
On Tue, 2017-05-09 at 15:50 +0200, Jason A. Donenfeld wrote: > The recent bug with macsec and historical one with virtio have > indicated that letting skb_to_sgvec trounce all over an sglist > without checking the length is probably a bad idea. And it's not > necessary either: an sglist already

[PATCH v7 0/5] skb_to_sgvec hardening

2017-05-09 Thread Jason A. Donenfeld
The recent bug with macsec and historical one with virtio have indicated that letting skb_to_sgvec trounce all over an sglist without checking the length is probably a bad idea. And it's not necessary either: an sglist already explicitly marks its last item, and the initialization functions are

[PATCH v7 0/5] skb_to_sgvec hardening

2017-05-09 Thread Jason A. Donenfeld
The recent bug with macsec and historical one with virtio have indicated that letting skb_to_sgvec trounce all over an sglist without checking the length is probably a bad idea. And it's not necessary either: an sglist already explicitly marks its last item, and the initialization functions are