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] [day] [month] [year] [list]
Message-ID: <CANn89iLibjjMhJqX_CA4gSDxpBuD9bytfW6LSCKM0fyDvv5K0A@mail.gmail.com>
Date:   Tue, 5 Dec 2023 21:08:12 +0100
From:   Eric Dumazet <edumazet@...gle.com>
To:     YangXin <yx.0xffff@...il.com>
Cc:     davem@...emloft.net, kuba@...nel.org, pabeni@...hat.com,
        netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] net: remove ___neigh_lookup_noref().

On Tue, Dec 5, 2023 at 8:10 PM YangXin <yx.0xffff@...il.com> wrote:
>
> key_eq() and hash() are functions of struct neigh_table, so we just need to call tbl->key_eq() and tbl->hash(), instead of passing them in as parameters.
>
> And if those two parameters were removed,  ___neigh_lookup_noref() would be pointless, so I replaced ___neigh_lookup_noref() with __neigh_lookup_noref().
>
> Signed-off-by: YangXin <yx.0xffff@...il.com>
> ---
> Last time I comitted this patch, Mr Dumazet said "this might defeat inlining.".
> So I compiled kernel on my computer with defconfig, made sure that this patch would not lead __neigh_lookup_noref() fail to inline.

Not sure how you checked, but I found the opposite.

This patch adds additional indirect function calls, with additional
RETPOLINE costs.

Look at ip_neigh_gw4() disassembly before/after your patch.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ