From: Luca Boccassi Date: Mon, 28 Mar 2022 10:33:37 +0000 (+0100) Subject: docs: use native type instead of byte stream in COREDUMP_PACKAGE_METADATA X-Git-Tag: v251-rc1~24 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=505df87ea85d62071f6daefa14c52107a085246b;p=thirdparty%2Fsystemd.git docs: use native type instead of byte stream in COREDUMP_PACKAGE_METADATA The first three fields of a note are binary, so they are subject to flipping due to endianess. Instead of a stream of bytes, just use the native 4-bytes type so that it gets encoded automatically. Implemented in the tools via: https://github.com/systemd/package-notes/pull/31 --- diff --git a/docs/COREDUMP_PACKAGE_METADATA.md b/docs/COREDUMP_PACKAGE_METADATA.md index db75ad14325..8dac5c61bf1 100644 --- a/docs/COREDUMP_PACKAGE_METADATA.md +++ b/docs/COREDUMP_PACKAGE_METADATA.md @@ -92,9 +92,9 @@ $ ./generate-package-notes.py --rpm systemd-248~rc2-1.fc33.arm32 --cpe cpe:/o:fe SECTIONS { .note.package (READONLY) : ALIGN(4) { - BYTE(0x04) BYTE(0x00) BYTE(0x00) BYTE(0x00) /* Length of Owner including NUL */ - BYTE(0x7b) BYTE(0x00) BYTE(0x00) BYTE(0x00) /* Length of Value including NUL */ - BYTE(0x7e) BYTE(0x1a) BYTE(0xfe) BYTE(0xca) /* Note ID */ + LONG(0x0004) /* Length of Owner including NUL */ + LONG(0x007b) /* Length of Value including NUL */ + LONG(0xcafe1a7e) /* Note ID */ BYTE(0x46) BYTE(0x44) BYTE(0x4f) BYTE(0x00) /* Owner: 'FDO\x00' */ BYTE(0x7b) BYTE(0x22) BYTE(0x74) BYTE(0x79) /* Value: '{"type":"rpm","name":"systemd","version":"248~rc2-1.fc33","architecture":"arm32","osCpe":"cpe:/o:fedoraproject:fedora:33"}\x00\x00' */ BYTE(0x70) BYTE(0x65) BYTE(0x22) BYTE(0x3a)