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]
Date:	Thu, 20 Sep 2012 07:53:58 +0200
From:	Eric Dumazet <eric.dumazet@...il.com>
To:	RongQing Li <roy.qing.li@...il.com>
Cc:	netdev@...r.kernel.org, edumazet@...gle.com
Subject: Re: [PATCH net-next] core: adjust checks for calling skb_copy_bits
 in skb_try_coalesce

On Thu, 2012-09-20 at 13:40 +0800, RongQing Li wrote:
> >>               unsigned int offset;
> >
> > This is not needed at all.
> >
> >
> 
> I think the below modification maybe needed,
> if (len <= skb_tailroom(to) && !skb_shinfo(to)->nr_frags) {
> ..
> }
> 
> First skb A is added to skb TO frags, since the len is larger
> than skb_tailroot(TO), but second len of skb B is less than
> skb_tailroot(To)  which will call skb_copy_bits.
> 
> Of cause, this kinds of cases maybe only exist on my mind.
> 

Did you read skb_tailroom(to) definition by any chance ?

static inline int skb_tailroom(const struct sk_buff *skb)
{
        return skb_is_nonlinear(skb) ? 0 : skb->end - skb->tail;
}

Current code is fine, because if @to is linear, its ... linear.



--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ