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  PHC 
Open Source and information security mailing list archives
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 17 Dec 2020 12:46:57 +0100
From:   Lukasz Stelmach <>
To:     Jakub Kicinski <>
Cc:     Andrew Lunn <>,,
        Heiner Kallweit <>,
        "David S. Miller" <>,
        Rob Herring <>,
        Kukjin Kim <>,
        Krzysztof Kozlowski <>,
        Russell King <>,,,,,,
        Bartłomiej Żolnierkiewicz 
        Marek Szyprowski <>
Subject: Re: [PATCH v8 3/3] net: ax88796c: ASIX AX88796C SPI Ethernet
 Adapter Driver

It was <2020-12-16 śro 08:13>, when Jakub Kicinski wrote:
> On Wed, 16 Dec 2020 13:21:52 +0100 Lukasz Stelmach wrote:
>> So, the only thing that's left is pskb_expand_head(). I need to wrap my
>> head around it. Can you tell me how a cloned skb is different and why
>> there may be separate branch for it?
> I think this driver needs to prepend and append some info to the packet
> data, right? Cloned skb is sharing the data with another skb, the
> metadata is separate but the packet data is shared, so you can't modify
> the data, you need to do a copy of the data. pskb_expand_head() should
> take care of cloned skbs so you can just call it upfront and it will
> make sure the skb is the right geometry for you.
> BTW you should set netdev->needed_headroom and netdev->needed_tailroom


> to the correct values so the stack pre-allocates the needed spaces,
> when it can.

Yes, I fonud these. However, I am not sure setting needed_tailroom has
any effect. In many places where alloc_skb() is called needed_headrom
and hard_header_len are refered to via the LL_RESERVED_SPACE macro. But
the macro does not refer to needed_tailroom. Once (f5184d267c1a ("net:
Allow netdevices to specify needed head/tailroom") there was
LL_ALLOCATED_SPACE macro, but but it was removed in 56c978f1da1f ("net:
Remove LL_ALLOCATED_SPACE"). And now only some protocols refer to

BTW. What is hard_header_len for? Is it the length of the link layer
header? Considering "my" hardware requires some headers with each
packet, I find hard_headr_len name a bit confusing.

I will be sending v9 in a minute or two.

Kind regards,
Łukasz Stelmach
Samsung R&D Institute Poland
Samsung Electronics

Download attachment "signature.asc" of type "application/pgp-signature" (488 bytes)

Powered by blists - more mailing lists