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aW5hbCBhdXRob3Igd291bGQg
dGhvdWdodCBpdCBiZSBzYWZlciB0aGFuIGp1c3QgdXNpbmcgb2Zmc2V0Lgo+Cj4JCQkJCW9mZnNl
dCA9IGlwdjZfc2tpcF9leHRoZHIoc2tiLCBzaXplb2YoKmhkciksCj4gICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJm5leHRoZHIpOwo+ICAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAob2Zmc2V0IDwgMCkKPiAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICBnb3RvIG91dDsKPiAKPiAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgaWYgKG5leHRoZHIgIT0gSVBQUk9UT19JQ01QVjYpCj4gICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZ290byBvdXQ7Cj4gCj4gICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgIGlmICghcHNrYl9tYXlfcHVsbChza2IsIChza2JfbmV0d29y
a19oZWFkZXIoc2tiKSArCj4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICBvZmZzZXQgKyAxIC0gc2tiLT5kYXRhKSkpCj4gICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgZ290byBvdXQ7Cj4gCj4gICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgIGljbXA2ID0gKHN0cnVjdCBpY21wNmhkciAqKShza2JfbmV0d29ya19oZWFkZXIo
c2tiKSArIG9mZnNldCk7Cj4KPgo+Cj5UaGFua3MKPlRvbWFzCj4KPgo+LS0tLS0tLS0tLS0tLS0t
LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tCj5J
bnRlbCBJc3JhZWwgKDc0KSBMaW1pdGVkCj4KPlRoaXMgZS1tYWlsIGFuZCBhbnkgYXR0YWNobWVu
dHMgbWF5IGNvbnRhaW4gY29uZmlkZW50aWFsIG1hdGVyaWFsIGZvcgo+dGhlIHNvbGUgdXNlIG9m
IHRoZSBpbnRlbmRlZCByZWNpcGllbnQocykuIEFueSByZXZpZXcgb3IgZGlzdHJpYnV0aW9uCj5i
eSBvdGhlcnMgaXMgc3RyaWN0bHkgcHJvaGliaXRlZC4gSWYgeW91IGFyZSBub3QgdGhlIGludGVu
ZGVkCj5yZWNpcGllbnQsIHBsZWFzZSBjb250YWN0IHRoZSBzZW5kZXIgYW5kIGRlbGV0ZSBhbGwg
Y29waWVzLgo+Cg==



2010-12-31 10:18:24

by Johannes Berg

[permalink] [raw]
Subject: RE: [PATCH net-2.6] bridge: fix br_multicast_ipv6_rcv for paged skbs

On Fri, 2010-12-31 at 01:29 +0200, Winkler, Tomas wrote:
>
> > -----Original Message-----
> > From: Stephen Hemminger [mailto:[email protected]]
> > Sent: Friday, December 31, 2010 1:06 AM
> > To: Winkler, Tomas; Stephen Hemminger; Johannes Berg
> > Cc: [email protected]; [email protected] ; linux-
> > [email protected]
> > Subject: RE: [PATCH net-2.6] bridge: fix br_multicast_ipv6_rcv for paged
> > skbs
> >
> > Although copy is slower for large packets, this is a non performance path.
> > The code in question is for bridged multicast Ipv6 ICMP packets. This case
> > is so uncritical it could be done in BASIC and no one could possibly care!
> >
>
>
> Fair enough, although you got few of those when you connect to win7 client.
> Anyhow my fix would work if the second pull would be
> if (!pskb_may_pull(skb2, sizeof(struct mld_msg))) instead of (!pskb_may_pull(skb2, sizeof(*icmp6h)))

I don't think that works either since that may be longer than the entire
skb's length since the payload still is variable at this point.

johannes


2010-12-31 21:16:55

by Tomas Winkler

[permalink] [raw]
Subject: RE: [PATCH net-2.6] bridge: fix br_multicast_ipv6_rcv for paged skbs



> -----Original Message-----
> From: David Miller [mailto:[email protected]]
> Sent: Friday, December 31, 2010 10:46 PM
> To: [email protected]
> Cc: Winkler, Tomas; [email protected]; [email protected];
> [email protected]; [email protected]
> Subject: Re: [PATCH net-2.6] bridge: fix br_multicast_ipv6_rcv for paged
> skbs
>
> From: Stephen Hemminger <[email protected]>
> Date: Thu, 30 Dec 2010 15:06:16 -0800
>
> > Although copy is slower for large packets, this is a non performance
> > path. The code in question is for bridged multicast Ipv6 ICMP
> > packets. This case is so uncritical it could be done in BASIC and no
> > one could possibly care!
>
> I still think we should be judicious and keep using skb_clone() here.
>
> Simply combine the two pskb_may_pull() calls into one on "skb2" after
> the clone and before the blind __skb_pull() call. Then add a error
> path "out:" called "out_nopush:" for the error path to goto.
>
> Also, I think the "+ 1" in the ipv6 stack code comes from the fact that
> the parsing loop can "peek" into the next header's byte to see the type.
> And I really don't think it's relevant here.
>
> Also, all of these "x_header + ... + 1 - skb->data" factors are
> irrelevent and shouldn't be used. Just pass "offset + sizeof(*icmp6h)"
> to pskb_may_pull().

Sounds reasonable but maybe we shall pass offset + sizeof(struct mld_msg) as *icmp6h is casted to this struct mld_mca is accessed.

struct mld_msg {
struct icmp6hdr mld_hdr;
struct in6_addr mld_mca;
};

Thanks
Tomas


---------------------------------------------------------------------
Intel Israel (74) Limited

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.


2010-12-31 20:45:03

by David Miller

[permalink] [raw]
Subject: Re: [PATCH net-2.6] bridge: fix br_multicast_ipv6_rcv for paged skbs

From: Stephen Hemminger <[email protected]>
Date: Thu, 30 Dec 2010 15:06:16 -0800

> Although copy is slower for large packets, this is a non performance
> path. The code in question is for bridged multicast Ipv6 ICMP
> packets. This case is so uncritical it could be done in BASIC and no
> one could possibly care!

I still think we should be judicious and keep using skb_clone() here.

Simply combine the two pskb_may_pull() calls into one on "skb2" after
the clone and before the blind __skb_pull() call. Then add a error
path "out:" called "out_nopush:" for the error path to goto.

Also, I think the "+ 1" in the ipv6 stack code comes from the fact that
the parsing loop can "peek" into the next header's byte to see the type.
And I really don't think it's relevant here.

Also, all of these "x_header + ... + 1 - skb->data" factors are
irrelevent and shouldn't be used. Just pass "offset + sizeof(*icmp6h)"
to pskb_may_pull().


2010-12-30 23:29:23

by Tomas Winkler

[permalink] [raw]
Subject: RE: [PATCH net-2.6] bridge: fix br_multicast_ipv6_rcv for paged skbs

DQoNCj4gLS0tLS1PcmlnaW5hbCBNZXNzYWdlLS0tLS0NCj4gRnJvbTogU3RlcGhlbiBIZW1taW5n
ZXIgW21haWx0bzpzdGVwaGVuLmhlbW1pbmdlckB2eWF0dGEuY29tXQ0KPiBTZW50OiBGcmlkYXks
IERlY2VtYmVyIDMxLCAyMDEwIDE6MDYgQU0NCj4gVG86IFdpbmtsZXIsIFRvbWFzOyBTdGVwaGVu
IEhlbW1pbmdlcjsgSm9oYW5uZXMgQmVyZw0KPiBDYzogZGF2ZW1AZGF2ZW1sb2Z0Lm5ldDsgbmV0
ZGV2QHZnZXIua2VybmVsLm9yZyA7IGxpbnV4LQ0KPiB3aXJlbGVzc0B2Z2VyLmtlcm5lbC5vcmcN
Cj4gU3ViamVjdDogUkU6IFtQQVRDSCBuZXQtMi42XSBicmlkZ2U6IGZpeCBicl9tdWx0aWNhc3Rf
aXB2Nl9yY3YgZm9yIHBhZ2VkDQo+IHNrYnMNCj4gDQo+IEFsdGhvdWdoIGNvcHkgaXMgc2xvd2Vy
IGZvciBsYXJnZSBwYWNrZXRzLCB0aGlzIGlzIGEgbm9uIHBlcmZvcm1hbmNlIHBhdGguDQo+IFRo
ZSBjb2RlIGluIHF1ZXN0aW9uIGlzIGZvciBicmlkZ2VkIG11bHRpY2FzdCBJcHY2IElDTVAgcGFj
a2V0cy4gVGhpcyBjYXNlDQo+IGlzIHNvIHVuY3JpdGljYWwgaXQgY291bGQgYmUgZG9uZSBpbiBC
QVNJQyBhbmQgbm8gb25lIGNvdWxkIHBvc3NpYmx5IGNhcmUhDQo+IA0KDQoNCkZhaXIgZW5vdWdo
LCBhbHRob3VnaCB5b3UgZ290IGZldyBvZi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