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]
Date: Fri, 27 Oct 2023 10:21:05 +0200
From: Daniel Borkmann <daniel@...earbox.net>
To: Jakub Kicinski <kuba@...nel.org>, Coco Li <lixiaoyan@...gle.com>
Cc: Eric Dumazet <edumazet@...gle.com>, Neal Cardwell <ncardwell@...gle.com>,
 Mubashir Adnan Qureshi <mubashirq@...gle.com>,
 Paolo Abeni <pabeni@...hat.com>, Andrew Lunn <andrew@...n.ch>,
 Jonathan Corbet <corbet@....net>, David Ahern <dsahern@...nel.org>,
 netdev@...r.kernel.org, Chao Wu <wwchao@...gle.com>,
 Wei Wang <weiwan@...gle.com>, Pradeep Nemavat <pnemavat@...gle.com>
Subject: Re: [PATCH v4 net-next 2/6] cache: enforce cache groups

On 10/26/23 4:17 PM, Jakub Kicinski wrote:
> On Thu, 26 Oct 2023 08:19:55 +0000 Coco Li wrote:
>> Set up build time warnings to safegaurd against future header changes
>> of organized structs.
> 
> TBH I had some doubts about the value of these asserts, I thought
> it was just me but I was talking to Vadim F and he brought up
> the same question.
> 
> IIUC these markings will protect us from people moving the members
> out of the cache lines. Does that actually happen?
> 
> It'd be less typing to assert the _size_ of each group, which protects
> from both moving out, and adding stuff haphazardly, which I'd guess is
> more common. Perhaps we should do that in addition?

Size would be good, I also had that in the prototype in [0], I think
blowing up the size is a bigger risk than moving existing members to
somewhere else in the struct, and this way it is kind of a forcing
factor to think deeper when this triggers, and helps in reviews hopefully
as well since it's an explicit change when the size is bumped. Having
this in addition would be nice imo.

Thanks,
Daniel

   [0] https://lore.kernel.org/netdev/50ca7bc1-e5c1-cb79-b2af-e5cd83b54dab@iogearbox.net/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ