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]
Date:   Thu, 14 Oct 2021 17:05:05 -0700
From:   John Stultz <>
To:     "Elliott, Robert (Servers)" <>
Cc:     Thomas Gleixner <>,
        "" <>,
        "" <>,
        "Kani, Toshi" <>
Subject: Re: Is CLOCKS_MASK macro obsolete?

On Thu, Oct 14, 2021 at 4:46 PM Elliott, Robert (Servers)
<> wrote:
> The CLOCKS_MASK macro in include/uapi/linux/time.h seems broken; it's ORing together
> two numbered values, one of which is 0. Perhaps these clock IDs started as a bitmask?
> CLOCKS_MASK doesn't appear to be used anywhere in the kernel; nor does the adjacent
> Should those macros be deleted?

As for CLOCKS_MASK, the earliest reference I can find is here:

Right before the 2.6 release. Seems to have come in with this patch:
But even there, it doesn't make sense as a mask.

There was even a patch to remove it:

Then it took its current form with this:

So, yea, I suspect it can be dropped as it really doesn't make much
sense, so I don't think it's likely used anywhere in a useful way.
(Though it is referenced in some docs -

For CLOCKS_MONO, the main risk is breaking existing userland code that
uses it at build time. But as the fix changing to CLOCK_MONOTONIC
seems not too difficult, it's probably ok.


Powered by blists - more mailing lists