Thread (47 messages) flat view 47 messages, 4 authors, 2021-08-05

Re: [RFC][PATCH v2 02/12] diglim: Basic definitions

From: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Date: 2021-07-28 13:09:04
Also in: linux-doc, linux-kselftest, linux-security-module, lkml

Em Wed, 28 Jul 2021 11:45:02 +0000
Roberto Sassu [off-list ref] escreveu:
quoted
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 [off-list ref] escreveu:
  
quoted
quoted
+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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help