Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp2779511pxv; Sun, 27 Jun 2021 08:34:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyNbLkpgfKnIvnbHjBORUF5drqmpf8T0ChnB0lSE0C2ys9r1zwCnvEOKofjA/MF8ald/zHG X-Received: by 2002:aa7:dd5a:: with SMTP id o26mr27305403edw.277.1624808054108; Sun, 27 Jun 2021 08:34:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624808054; cv=none; d=google.com; s=arc-20160816; b=jRal5el+O8pPYWP3IfSi8+6fnWV+lkSji/4Rvzvqokii1vL/y42RDkHnbV353cuGjv pi06O6ZA3ZWGwRvTDcxMIJ5SizM+UO0BOnztWDe1uhqsxjTtWfgrU//kOtJv53eeT9pr n+wVeHCYy6J/H6kF+cHmOAMjQL52TF1Fih4aFnRpP0SGJopK7MZPGwSCcfqQliGjlcCO 9vyAJ80gXDmDIY70Q3jUG0H+yv0m02GsXpF/n4iG2fTKlY6KLN7tu4dwQJLQ8AHZOjMV EQnJgMFA1mTUXaXLT7O3VjjCPKv2F5+qxBsQu4LVBFuNk0otXCRGNz0Ll2C+5u2g5DxJ 43wQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=5TjA7PSFWDPnK1JEPwMyjrDO4IXpUkyVPH+qXipsLzI=; b=M4isSLt31ndcuEPAydt6XJ3Eo5M/dwY1JszyzZmCXj/yHwT+FWQAXN+J9EwtSkchwF cFJOU6b/YRKM/+tSkk6Y/yotY4pfX5K6XYmBNoiTw0R7iBjdAwDGn4/a+6PKasMOZO1j 3NV133msCUbZSfZPhTeT5aVt7Ha5K8vvKeFN4bH6qNpfaSO1Kl93uzFi+enzpiH6uq2Q G/vIsRPR30XqXMfXBRQ5FtXSmGdlMhSWQLfRQIMW7N1FAabFToZJhYuC2G0W5FEWJ4l2 VLcZ5JQeDlFnu1lvistpLkgBNhA10VYhjXCmXAbRiB4fegWoMVH3r4OfMCAnSFvYhuns pKaA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=FB+cE5V6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v27si11700022ejk.55.2021.06.27.08.33.24; Sun, 27 Jun 2021 08:34:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=FB+cE5V6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231143AbhF0P0X (ORCPT + 99 others); Sun, 27 Jun 2021 11:26:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43622 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230260AbhF0P0W (ORCPT ); Sun, 27 Jun 2021 11:26:22 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BE4F3C061574; Sun, 27 Jun 2021 08:23:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=5TjA7PSFWDPnK1JEPwMyjrDO4IXpUkyVPH+qXipsLzI=; b=FB+cE5V6zlmQ3S9KW0NvTeKstw zq39qvfjji5PrG/b2xqx0jDeddwlfPRG8kdCN5zAI9uE7og3NneIPqxJNS+Z8VBRqJUTbXqBPNJ6f mp0NWmZOK6zAMqw9JBIZNHQf0W/cJniQ0Qtdbzn0vK1WUNMOjC2oStYpNsOdf3OeJO0g3Q/6Vqr8x Xj5djUGWwSgQmdJHrYN6XDqMJvgJnkkDCmdMqDYJN5sgCk409U8NTVlYqSBl64AT8fsYX5j9CJ1A0 ShhzJ7ENznjKRUkm9EAuALLMhmTBrmyhjjt5wFZuMLJKhqw9CXG8mtUcfH9Pv3UFCA+qwt/BMPPNM O/+TNZUw==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1lxWd4-0020zz-Kw; Sun, 27 Jun 2021 15:23:31 +0000 Date: Sun, 27 Jun 2021 16:23:26 +0100 From: Matthew Wilcox To: Greg KH Cc: Roberto Sassu , zohar@linux.ibm.com, linux-integrity@vger.kernel.org, linux-security-module@vger.kernel.org, linux-doc@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [RFC][PATCH 03/12] digest_lists: Basic definitions Message-ID: References: <20210625165614.2284243-1-roberto.sassu@huawei.com> <20210625165614.2284243-4-roberto.sassu@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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.