Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp5223249pxv; Wed, 28 Jul 2021 06:10:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyqpersFSop8zC+fKZRRWkAVozMUexLv8vtADgRr1m1A98gnbUYu2YsiUahkWM3X7I/DimH X-Received: by 2002:a02:c8d0:: with SMTP id q16mr26481787jao.110.1627477840216; Wed, 28 Jul 2021 06:10:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627477840; cv=none; d=google.com; s=arc-20160816; b=T1RpSx6SaRtFw5TjMCWRMY26D0V3yVi4m7LWBHiktpOGtb7QRICqGSrQKU0ZqEDYRf 8bl6V55YPVyV3OENrMf+l0HzXURIXhCvwoEogUIlIj4gpDb5Fx+PbdTv+OJkSSCGBUU5 ceX9J03IYYwiFF7VBd1FQ3rGGcLAk9dc6khGfS0sDmNPca1qseu7rlQF3ayY61GAghmQ 2FXILsUoJRiwxnivcioRL30hqFd+Vsj+aMpnBQi2YkWIh6FcRKjD9z/st7sXaJOIxbXu WLvNAUHBvgieCV2+6pYesv2fd/1BSmW0UZ6JfktmZywUqIikapgAeJ2xg4ex6ZmTzcK3 zzxw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=a1wCfC6Cs0epU8Q1tugxEIo+aVffMfOZW75JEVzyS88=; b=JmekbkMoqpBY6cSbZursXm4H73jdpVb2oBs5HWlH6SBo8EoxLi8B6k7HmaViS983pI SJ/MDzE0aK5spOGgsN+W6+UkZGWSa49h2Kum1hojWFkDobd/UK5mjr1XPk3huOTQjzRh WZqhxroCqgpO8vorj+ZPLeN/B3vD3rYjpNtrlNoSPZa8zalI/tZ8AdMD5JbkEWxc/Zd6 lyFI1yRP5LvShA5A9dFjr8hVlcT7qtLVwbbUC908LgZMrYdFhNrDl+ecmgyiqyt0RRfE ZZ+cmm4aG5bX8OVfxNR8kmzNcyZaIlDVS5dKvsEF/44WuHIKsy6zHu+TFKGehoqNXyrj U57A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=lhF2L+uV; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q10si6656477ilu.60.2021.07.28.06.10.28; Wed, 28 Jul 2021 06:10:40 -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=@kernel.org header.s=k20201202 header.b=lhF2L+uV; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236589AbhG1NJC (ORCPT + 99 others); Wed, 28 Jul 2021 09:09:02 -0400 Received: from mail.kernel.org ([198.145.29.99]:58344 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236430AbhG1NIc (ORCPT ); Wed, 28 Jul 2021 09:08:32 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 3B45160F02; Wed, 28 Jul 2021 13:08:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1627477710; bh=H1S7AlV0COt/bxaXeyQx1d8vL8M0dbUMU7ZJt6NPQao=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=lhF2L+uVa1UwdQ7Cqk0pnrjHOQNx7pTKWuDDejBNYjN7A4it/H9lYpeC/cKU1T5bw hQM3Na89GeH11aOtWH5LwuNLnQAzrNKm1hNd9combq4MNd6d5kj5hDdM43SvCKXuKm mQOhkROUEBDNzZVgDZy+12+010DsTRsyj4B8C+cW8N8WMZzTKfcnsxLC5IeSxnLEkM Usd1c13/hPiRiWHeJ/26+IQEYEfcTRZhtc2H+p0eWQJKqapIBSJDHdGLSMPqq0dXGK f+ajcoWDqnl3jOR5pdzhqf7hM7P7LLGGQbhY4LgJjY4meNxxAHNKQB500JiB5bLB/j ByRRqXtjzReFA== Date: Wed, 28 Jul 2021 15:08:23 +0200 From: Mauro Carvalho Chehab To: Roberto Sassu Cc: "zohar@linux.ibm.com" , "gregkh@linuxfoundation.org" , "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 v2 02/12] diglim: Basic definitions Message-ID: <20210728150823.705623ad@sal.lan> In-Reply-To: References: <20210726163700.2092768-1-roberto.sassu@huawei.com> <20210726163700.2092768-3-roberto.sassu@huawei.com> <20210728133102.339c7b8e@coco.lan> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; x86_64-redhat-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Em Wed, 28 Jul 2021 11:45:02 +0000 Roberto Sassu escreveu: > > From: Mauro Carvalho Chehab [mailto:mchehab+huawei@kernel.org] > > Sent: Wednesday, July 28, 2021 1:31 PM > > Em Mon, 26 Jul 2021 18:36:50 +0200 > > Roberto Sassu escreveu: > > > > > +struct compact_list_hdr { > > > + __u8 version; > > > + __u8 _reserved; > > > + __le16 type; > > > + __le16 modifiers; > > > + __le16 algo; > > > + __le32 count; > > > + __le32 datalen; > > > +} __packed; > > > +#endif /*_UAPI__LINUX_DIGLIM_H*/ > > > > Besides Greg's notes, I'm wondering why to enforce a particular > > endness here. I mean, this is uAPI. I would expect it to use the > > CPU endianness instead, in order to avoid uneeded conversions. > > Also Greg had the same concern. I hoped the Lifecycle section clarified > the fact that digest lists are generated by software vendors not the > local system. Should I add something more in the documentation? It shouldn't matter what kind of endness software vendors use on userspace (either CPU or a fixed endiannes - either LE or BE). I mean, I won't doubt that some package tools use LE while others would use BE. At some point, this needs to be converted to CPU endiannes. IMO, the best would be to isolate whatever RPM/DEB/... endianness is used on userspace from what the Kernel will use internally. Just my 2 cents. Regards, Mauro