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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Fri, 16 Oct 2020 05:52:59 -0700
From:   Richard Cochran <>
To:     Christian Eggers <>
Cc:     Florian Fainelli <>,
        "David S . Miller" <>,
        Jakub Kicinski <>,
        Krzysztof Halasa <>,
        Vishal Kulkarni <>,,
Subject: Re: [PATCH net-next] net: ptp: get rid of IPV4_HLEN() and OFF_IHL

On Fri, Oct 16, 2020 at 09:04:38AM +0200, Christian Eggers wrote:
> IPV4_HLEN() is only used for PTP. Is there any way to use "normal"
> infrastructure as in the rest of the network stack?

You answered your own question...

> It looks like PTP code
> typically has to look into multiple network layers (mac, network, transport)
> at places these layers may not be processed yet (at least in RX direction).


(The pointers in the skb are moved around as the skb flows through the stack.)

The original, per-driver, un-refactored callers of that macro (at
least the ones written by me) used the macro carefully.  Also, I think
the recent re-factoring that Kurt implemented preserves the correct
usage of the macro.  Any new users must, of course, use it carefully
while parsing the bytes of a frame.

I agree that the macro is perhaps not the best possible solution, but
it is not the worst either.


Powered by blists - more mailing lists