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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CANn89iL+JDghoudzGfGgeQkwDrtOHKoDbGiaracs0foWm+Pmpw@mail.gmail.com>
Date: Mon, 8 Jan 2024 10:20:27 +0100
From: Eric Dumazet <edumazet@...gle.com>
To: Zhengchao Shao <shaozhengchao@...wei.com>
Cc: netdev@...r.kernel.org, davem@...emloft.net, kuba@...nel.org, 
	pabeni@...hat.com, weiyongjun1@...wei.com, yuehaibing@...wei.com
Subject: Re: [PATCH net-next] fib: rules: use memcmp to simplify code in rule_exists

On Mon, Jan 8, 2024 at 2:01 AM Zhengchao Shao <shaozhengchao@...wei.com> wrote:
>
> In the fib_rule structure, the member variables 'pref' to 'oifname' are
> consecutive.

This could be changed in the future.
This is error prone for no gain (as David said, this is control path)

 In addition, the newly generated rule uses kzalloc to
> allocate memory, and all allocated memory is initialized to 0. Therefore,
> the comparison of two fib_rule structures from 'pref' to 'oifname' can be
> simplified into the comparison of continuous memory.
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ