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]
Message-ID: <20230531111602.7ecf401b@kernel.org>
Date:   Wed, 31 May 2023 11:16:02 -0700
From:   Jakub Kicinski <kuba@...nel.org>
To:     Qingfang DENG <dqfext@...il.com>
Cc:     "David S. Miller" <davem@...emloft.net>,
        Eric Dumazet <edumazet@...gle.com>,
        Paolo Abeni <pabeni@...hat.com>,
        YOSHIFUJI Hideaki <yoshfuji@...ux-ipv6.org>,
        Ville Nuorvala <vnuorval@....hut.fi>,
        Masahide NAKAMURA <nakam@...ux-ipv6.org>,
        netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
        Qingfang DENG <qingfang.deng@...lower.com.cn>
Subject: Re: [PATCH net] neighbour: fix unaligned access to pneigh_entry

On Wed, 31 May 2023 18:42:33 +0800 Qingfang DENG wrote:
> +#ifdef CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS
>  	u8			key[];
> +#else
> +	u8			key[] __aligned(4);
> +#endif

I'd appreciate a second opinion, but to me it's very unlikely we'd save
any memory even with efficient aligned access here. No reasonably key
will fit into 3 bytes, right? So we can as well avoid the ifdef and
make the key[] always aligned. Or preferably, if it doesn't cause
compilation issues, make the type of the key u32?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ