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] [day] [month] [year] [list]
Message-ID: <CAHk-=wgf+qpDY31ojxqPdkSHT6f+E9yGM_L16iNhv9owEpbx7Q@mail.gmail.com>
Date:   Thu, 21 Nov 2019 16:04:58 -0800
From:   Linus Torvalds <torvalds@...ux-foundation.org>
To:     Rasmus Villemoes <linux@...musvillemoes.dk>
Cc:     LKML <linux-kernel@...r.kernel.org>,
        Thomas Gleixner <tglx@...utronix.de>,
        Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: can we get rid of the cpumask_t typedef?

On Thu, Nov 21, 2019 at 12:55 AM Rasmus Villemoes
<linux@...musvillemoes.dk> wrote:
>
> The cpumask_t alias for "struct cpumask" doesn't seem to qualify for the
> kernel's requirement for when a typedef is warranted. It's also somewhat
> easily confused with cpumask_var_t which has very good reasons for being
> a typedef. "struct cpumask" outnumbers "cpumask_t" about 5:2.
>
> The motivation for this is that kbuild informed me about some driver
> that I just enabled for ARM happens to include asm/irq.h, and for magic
> reasons no other previous header happens to pull in cpumask.h. So the
> build fails
>
> >> arch/arm/include/asm/irq.h:34:50: error: unknown type name 'cpumask_t'
>     extern void arch_trigger_cpumask_backtrace(const cpumask_t *mask,

Yes. Please just add a forward declaration of 'struct cpumask', and
change that cpumask_t to use that instead.

I'm not sure we need to remove it entirely (there's a fair number of
users), but we can/should deprecate it, and certainly use 'struct
cpumask' in function declarations etc so that you don't need to go
through some include file hell.

           Linus

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ