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:	Wed, 1 Oct 2014 00:38:54 -0700
From:	Vijay Subramanian <subramanian.vijay@...il.com>
To:	Eric Dumazet <eric.dumazet@...il.com>
Cc:	David Miller <davem@...emloft.net>, netdev <netdev@...r.kernel.org>
Subject: Re: [PATCH v2 net-next] net: cleanup and document skb fclone layout

>         case SKB_FCLONE_CLONE:
> -               fclone_ref = (atomic_t *) (skb + 1);
> -               other = skb - 1;
> +               fclones = container_of(skb, struct sk_buff_fclones, skb2);
>
>                 /* The clone portion is available for
>                  * fast-cloning again.
>                  */
>                 skb->fclone = SKB_FCLONE_UNAVAILABLE;
>

It looks like SKB_FCLONE_UNAVAILABLE has overloaded use depending on
whether we are referring to skb allocated from head_cache or from
fclone_cache. In the former case, it means this skb cannot be cloned
i.e.(clone is unavailable) but in latter case, it means clone is free
to be used.
This overleading is confusing as seen in the comment in snippet above.

Should we add  something like SKB_CLONE_FREE for the second case that
indicates that clone is free for use.?  I can send a patch if it makes
sense..

-vijay
--
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