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: <YNiX7nyQIS/eg+VC@casper.infradead.org>
Date:   Sun, 27 Jun 2021 16:23:26 +0100
From:   Matthew Wilcox <willy@...radead.org>
To:     Greg KH <gregkh@...uxfoundation.org>
Cc:     Roberto Sassu <roberto.sassu@...wei.com>, zohar@...ux.ibm.com,
        linux-integrity@...r.kernel.org,
        linux-security-module@...r.kernel.org, linux-doc@...r.kernel.org,
        linux-kselftest@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [RFC][PATCH 03/12] digest_lists: Basic definitions

On Sun, Jun 27, 2021 at 12:53:47PM +0200, Greg KH wrote:
> > +enum ops { DIGEST_LIST_ADD, DIGEST_LIST_DEL, DIGEST_LIST_OP__LAST };
> > +
> 
> For enums you export to userspace, you need to specify the values so
> that all compilers get them right.

I've never heard that rule before.  Where does it come from?
https://en.cppreference.com/w/c/language/enum
says:

  If enumeration-constant is not followed by = constant-expression,
  its value is the value one greater than the value of the previous
  enumerator in the same enumeration. The value of the first enumerator
  (if it does not use = constant-expression) is zero.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ