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  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:   Tue, 5 Oct 2021 13:45:52 -0700
From:   Linus Torvalds <>
To:     Steven Rostedt <>
Cc:     Jan Engelhardt <>,
        Mathieu Desnoyers <>,
        Rasmus Villemoes <>,
        linux-kernel <>,
        Paul <>,
        Josh Triplett <>,
        Lai Jiangshan <>,
        "Joel Fernandes, Google" <>,
        Pablo Neira Ayuso <>,
        Jozsef Kadlecsik <>,
        Florian Westphal <>,
        "David S. Miller" <>,
        Hideaki YOSHIFUJI <>,
        David Ahern <>,
        Jakub Kicinski <>, rcu <>,
        netfilter-devel <>,
        coreteam <>,
        netdev <>
Subject: Re: [RFC][PATCH] rcu: Use typeof(p) instead of typeof(*p) *

On Tue, Oct 5, 2021 at 1:38 PM Steven Rostedt <> wrote:
> Really, thinking about abstraction, I don't believe there's anything wrong
> with returning a pointer of one type, and then typecasting it to a pointer
> of another type. Is there? As long as whoever uses the returned type does
> nothing with it.

Just stop doing this.,

Dammit, just include the header file that defines the type in the
places that you use the thing.

Because, yes, there is a LOT wrong with just randomly casting pointers
that you think have the "wrong type". You're basically taking it on
yourself to lie to the compiler, and intentionally breaking the type
system, because you have some completely bogus reason to hide a type.

We don't hide types in the kernel for no good reason.

You are literally talking about making things worse, for a reason that
hasn't even been explained, and isn't valid in the first place.
Nothing else in the kernel has had a problem just declaring the damn

If there was some clean and simple solution to the compiler warning
problem, that would be one thing. But when you think you need to
change core RCU macros, or lie to the compiler about the type system,
at that point it's not some clean and simple fix any more. At that
point you're literally making things worse than just exposing the


Powered by blists - more mailing lists