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: <20260202191121.71326ca2@kernel.org>
Date: Mon, 2 Feb 2026 19:11:21 -0800
From: Jakub Kicinski <kuba@...nel.org>
To: Niklas Söderlund
 <niklas.soderlund+renesas@...natech.se>
Cc: Yoshihiro Shimoda <yoshihiro.shimoda.uh@...esas.com>, Andrew Lunn
 <andrew+netdev@...n.ch>, "David S. Miller" <davem@...emloft.net>, Eric
 Dumazet <edumazet@...gle.com>, Paolo Abeni <pabeni@...hat.com>, Geert
 Uytterhoeven <geert+renesas@...der.be>, Magnus Damm
 <magnus.damm@...il.com>, Richard Cochran <richardcochran@...il.com>,
 netdev@...r.kernel.org, linux-renesas-soc@...r.kernel.org
Subject: Re: [net-next 4/4] net: ethernet: renesas: rcar_gen4_ptp: Hide
 private data from users

On Sun,  1 Feb 2026 19:37:45 +0100 Niklas Söderlund wrote:
> The Gen4 PTP helper module is already used by RTSN and RSWITCH to
> support PTP clocks and will be used by RAVB too. Hide the Gen4 PTP
> private data structure to make sure none of the users poke at it.
> 
> This will be more important for RAVB use-cases as more then one RAVB
> device will need to cooperate using one PTP clock source.

IMO hiding type definitions in C is an anti-pattern.
Sooner or later you'll need a sizeof or a static inline helper 
and you'll have to bend over backwards to access the type info.

We can take this if you have a strong preference, but please
think again if you really need this or it's a code cleanliness
instinct carried over from objective programming, hence foreign..

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ