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: <CAHk-=witwrbw0mExDpGzxYic87FpGhe1gCB+nqm1woUvwPY9GA@mail.gmail.com>
Date:   Tue, 12 Feb 2019 09:38:42 -0800
From:   Linus Torvalds <torvalds@...ux-foundation.org>
To:     Frederic Weisbecker <frederic@...nel.org>
Cc:     LKML <linux-kernel@...r.kernel.org>,
        Sebastian Andrzej Siewior <bigeasy@...utronix.de>,
        Peter Zijlstra <peterz@...radead.org>,
        Mauro Carvalho Chehab <mchehab@...pensource.com>,
        "David S . Miller" <davem@...emloft.net>,
        Thomas Gleixner <tglx@...utronix.de>,
        "Paul E . McKenney" <paulmck@...ux.vnet.ibm.com>,
        Frederic Weisbecker <fweisbec@...il.com>,
        Pavan Kondeti <pkondeti@...eaurora.org>,
        Ingo Molnar <mingo@...nel.org>,
        Joel Fernandes <joel@...lfernandes.org>
Subject: Re: [PATCH 02/32] locking/lockdep: Introduce struct lock_usage

On Tue, Feb 12, 2019 at 9:14 AM Frederic Weisbecker <frederic@...nel.org> wrote:
>
> +static u64 lock_usage_mask(struct lock_usage *usage)
> +{
> +       return BIT(usage->bit);
> +}

More insane "u64" - and it's *incorrect* too.

    #define BIT(nr)                    (1UL << (nr))

fundamentally means that "BIT()" can only work on up to "unsigned long".

So this odd use of u64 seems to be a disease. It only uses more memory
(and more CPU) for no obvious reason.

u64 is not some "default type". It's expensive and shouldn't be used
unless you have a *reason* for it.

              Linus

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ