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-next>] [day] [month] [year] [list]
Date:   Thu, 14 Oct 2021 23:46:11 +0000
From:   "Elliott, Robert (Servers)" <elliott@....com>
To:     'Thomas Gleixner' <tglx@...utronix.de>,
        "'john.stultz@...aro.org'" <john.stultz@...aro.org>,
        "'sboyd@...nel.org'" <sboyd@...nel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
CC:     "Kani, Toshi" <toshi.kani@....com>
Subject: Is CLOCKS_MASK macro obsolete?

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 
CLOCKS_MONO.

Should those macros be deleted?

Excerpt:
#define CLOCK_REALTIME                  0
#define CLOCK_MONOTONIC                 1
#define CLOCK_PROCESS_CPUTIME_ID        2
#define CLOCK_THREAD_CPUTIME_ID         3
#define CLOCK_MONOTONIC_RAW             4
#define CLOCK_REALTIME_COARSE           5
#define CLOCK_MONOTONIC_COARSE          6
#define CLOCK_BOOTTIME                  7
#define CLOCK_REALTIME_ALARM            8
#define CLOCK_BOOTTIME_ALARM            9
/*
 * The driver implementing this got removed. The clock ID is kept as a
 * place holder. Do not reuse!
 */
#define CLOCK_SGI_CYCLE                 10
#define CLOCK_TAI                       11

#define MAX_CLOCKS                      16
#define CLOCKS_MASK                     (CLOCK_REALTIME | CLOCK_MONOTONIC)
#define CLOCKS_MONO                     CLOCK_MONOTONIC


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ