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:   Sun, 12 Sep 2021 21:37:20 +0900
From:   Alexei Lozovsky <me@...mmy.net>
To:     Alexey Dobriyan <adobriyan@...il.com>
Cc:     Thomas Gleixner <tglx@...utronix.de>,
        Christoph Lameter <cl@...ux.com>,
        LKML <linux-kernel@...r.kernel.org>,
        linux-fsdevel@...r.kernel.org
Subject: Re: [PATCH 0/7] proc/stat: Maintain monotonicity of "intr" and
 "softirq"

On Sun, Sep 12, 2021, at 18:30, Alexey Dobriyan wrote:
> How about making everything "unsigned long" or even "u64" like NIC
> drivers do?

I see some possible hurdles ahead:

- Not all architectures have atomic operations for 64-bit values

  All those "unsigned int" counters are incremented with __this_cpu_inc()
  which tries to use atomics if possible. Though, I'm not quite sure
  how this works for read side which does not seem to use atomic reads
  at all. I guess, just by the virtue of properly aligned 32-bit reads
  being atomic everywhere? If that's so, I think widening counters to
  64 bits will come with an asterisk.

- We'll need to update all counters to be 64-bit.

  Like, *everyone*. Every field that gets summed up needs to be 64-bit
  (or else wrap-arounds will be incorrect). Basically every counter in
  every irq_cpustat_t will need to become twice as wide. If that's
  a fine price to pay for accurate, full-width counters...

  Previously I thought that some of these counters even come from
  hardware, but now that I'm reviewing them, that does not seem to be
  the case. Thankfully.

So right now I don't see why it shouldn't be doable in theory.
I'll give it a shot, I guess, and see how it works in practice,
at least as far as the patches go (since I can't really test on all
architectures).

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ