* Re: [PATCH] elf: add definition for FDO_PACKAGING_METADATA note
2021-11-21 19:39 [PATCH] elf: add definition for FDO_PACKAGING_METADATA note luca.boccassi
@ 2021-11-22 14:03 ` Florian Weimer
2021-11-22 14:44 ` Luca Boccassi
2021-11-26 16:49 ` Mark Wielaard
` (2 subsequent siblings)
3 siblings, 1 reply; 13+ messages in thread
From: Florian Weimer @ 2021-11-22 14:03 UTC (permalink / raw)
To: luca.boccassi--- via Libc-alpha; +Cc: luca.boccassi, mark
* luca boccassi:
> From: Luca Boccassi <bluca@debian.org>
>
> As defined on: https://systemd.io/COREDUMP_PACKAGE_METADATA/
> this note will be used starting from Fedora 36.
>
> Signed-off-by: Luca Boccassi <bluca@debian.org>
> ---
> As requested by Mark on:
> https://sourceware.org/pipermail/elfutils-devel/2021q4/004387.html
>
> elf/elf.h | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/elf/elf.h b/elf/elf.h
> index 50f87bac..4bb390b2 100644
> --- a/elf/elf.h
> +++ b/elf/elf.h
> @@ -1302,6 +1302,9 @@ typedef struct
> /* Program property. */
> #define NT_GNU_PROPERTY_TYPE_0 5
>
> +/* Packaging metadata as defined on https://systemd.io/COREDUMP_PACKAGE_METADATA/ */
> +#define FDO_PACKAGING_METADATA 0xcafe1a7e
Given that this is in the "FDO" namespace, do we have to document this?
Do you have your own registry for this?
Thanks,
Florian
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH] elf: add definition for FDO_PACKAGING_METADATA note
2021-11-22 14:03 ` Florian Weimer
@ 2021-11-22 14:44 ` Luca Boccassi
2021-11-22 15:17 ` Florian Weimer
0 siblings, 1 reply; 13+ messages in thread
From: Luca Boccassi @ 2021-11-22 14:44 UTC (permalink / raw)
To: Florian Weimer, libc-alpha; +Cc: mark
[-- Attachment #1: Type: text/plain, Size: 1510 bytes --]
On Mon, 2021-11-22 at 15:03 +0100, Florian Weimer wrote:
> * luca boccassi:
>
> > From: Luca Boccassi <bluca@debian.org>
> >
> > As defined on: https://systemd.io/COREDUMP_PACKAGE_METADATA/
> > this note will be used starting from Fedora 36.
> >
> > Signed-off-by: Luca Boccassi <bluca@debian.org>
> > ---
> > As requested by Mark on:
> > https://sourceware.org/pipermail/elfutils-devel/2021q4/004387.html
> >
> > elf/elf.h | 3 +++
> > 1 file changed, 3 insertions(+)
> >
> > diff --git a/elf/elf.h b/elf/elf.h
> > index 50f87bac..4bb390b2 100644
> > --- a/elf/elf.h
> > +++ b/elf/elf.h
> > @@ -1302,6 +1302,9 @@ typedef struct
> > /* Program property. */
> > #define NT_GNU_PROPERTY_TYPE_0 5
> >
> > +/* Packaging metadata as defined on
> > https://systemd.io/COREDUMP_PACKAGE_METADATA/ */
> > +#define FDO_PACKAGING_METADATA 0xcafe1a7e
>
> Given that this is in the "FDO" namespace, do we have to document this?
Hi,
This change was requested by the maintainer of elfutils (CC'ed):
https://sourceware.org/pipermail/elfutils-devel/2021q4/004387.html
I've sent a similar change for binutils' readelf:
https://sourceware.org/pipermail/binutils/2021-November/118584.html
We'll be using this ID through various projects, so IMHO it would be
useful to document it, yes.
> Do you have your own registry for this?
Sorry, what do you mean by registry here? A public header? If so, then
no we do not AFAIK.
--
Kind regards,
Luca Boccassi
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH] elf: add definition for FDO_PACKAGING_METADATA note
2021-11-22 14:44 ` Luca Boccassi
@ 2021-11-22 15:17 ` Florian Weimer
2021-11-23 9:42 ` Mark Wielaard
0 siblings, 1 reply; 13+ messages in thread
From: Florian Weimer @ 2021-11-22 15:17 UTC (permalink / raw)
To: Luca Boccassi; +Cc: libc-alpha, mark
* Luca Boccassi:
>> Do you have your own registry for this?
>
> Sorry, what do you mean by registry here? A public header? If so, then
> no we do not AFAIK.
A means for avoiding tag number collisions under the "FDO" namespace.
glibc <elf.h> only covers a small subset of the note section names. The
Solaris is probably not up to date, and we do not track FreeBSD and
NetBSD at all. (FreeBSD definitely has a bunch of their own tags.)
We can add it to our own <elf.h>, but the extension mechanism with its
namespace mechanism means that we don't have to.
Thanks,
Florian
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH] elf: add definition for FDO_PACKAGING_METADATA note
2021-11-22 15:17 ` Florian Weimer
@ 2021-11-23 9:42 ` Mark Wielaard
0 siblings, 0 replies; 13+ messages in thread
From: Mark Wielaard @ 2021-11-23 9:42 UTC (permalink / raw)
To: Florian Weimer, Luca Boccassi; +Cc: libc-alpha
Hi,
On Mon, 2021-11-22 at 16:17 +0100, Florian Weimer wrote:
> * Luca Boccassi:
>
> > > Do you have your own registry for this?
> >
> > Sorry, what do you mean by registry here? A public header? If so, then
> > no we do not AFAIK.
>
> A means for avoiding tag number collisions under the "FDO" namespace.
>
> glibc <elf.h> only covers a small subset of the note section names. The
> Solaris is probably not up to date, and we do not track FreeBSD and
> NetBSD at all. (FreeBSD definitely has a bunch of their own tags.)
>
> We can add it to our own <elf.h>, but the extension mechanism with its
> namespace mechanism means that we don't have to.
I thing freedesktop.org (FDO) didn't know they could register a new
constant under the GNU ELF notes namespace. But it really is just a
companion note to NT_GNU_BUILD_ID in the GNU namespace. So it would be
really convenient if it gets into the glibc elf.h so that others can
pick it up and use it.
Cheers,
Mark
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH] elf: add definition for FDO_PACKAGING_METADATA note
2021-11-21 19:39 [PATCH] elf: add definition for FDO_PACKAGING_METADATA note luca.boccassi
2021-11-22 14:03 ` Florian Weimer
@ 2021-11-26 16:49 ` Mark Wielaard
2021-11-26 17:01 ` Luca Boccassi
2021-11-26 17:01 ` [PATCH v2] elf: add definition for NT_FDO_PACKAGING_METADATA note luca.boccassi
2021-11-26 20:58 ` [PATCH v3] elf: add definition for ELF_NOTE_FDO and " luca.boccassi
3 siblings, 1 reply; 13+ messages in thread
From: Mark Wielaard @ 2021-11-26 16:49 UTC (permalink / raw)
To: luca.boccassi, libc-alpha
[-- Attachment #1: Type: text/plain, Size: 1160 bytes --]
Hi Luca,
On Sun, 2021-11-21 at 19:39 +0000, luca.boccassi@gmail.com wrote:
> From: Luca Boccassi <bluca@debian.org>
>
> As defined on: https://systemd.io/COREDUMP_PACKAGE_METADATA/
> this note will be used starting from Fedora 36.
>
> Signed-off-by: Luca Boccassi <bluca@debian.org>
> ---
> As requested by Mark on:
> https://sourceware.org/pipermail/elfutils-devel/2021q4/004387.html
>
> elf/elf.h | 3 +++
> 1 file changed, 3 insertions(+)
Two small nitpicks.
> diff --git a/elf/elf.h b/elf/elf.h
> index 50f87bac..4bb390b2 100644
> --- a/elf/elf.h
> +++ b/elf/elf.h
> @@ -1302,6 +1302,9 @@ typedef struct
> /* Program property. */
> #define NT_GNU_PROPERTY_TYPE_0 5
>
> +/* Packaging metadata as defined on https://systemd.io/COREDUMP_PACKAGE_METADATA/ */
This comment is a little too wide.
> +#define FDO_PACKAGING_METADATA 0xcafe1a7e
This doesn't follow the naming scheme of the other note types. Could we
use NT_FDO_PACKAGING_METADATA?
> /* Note section name of program property. */
> #define NOTE_GNU_PROPERTY_SECTION_NAME ".note.gnu.property"
Reformatted patch attached.
Thanks,
Mark
[-- Attachment #2: 0001-elf-add-definition-for-NT_FDO_PACKAGING_METADATA-not.patch --]
[-- Type: text/x-patch, Size: 901 bytes --]
From 8677485d565d820cbb5f931e1b319b4f4578ad19 Mon Sep 17 00:00:00 2001
From: Luca Boccassi <bluca@debian.org>
Date: Sun, 21 Nov 2021 19:39:39 +0000
Subject: [PATCH] elf: add definition for NT_FDO_PACKAGING_METADATA note
As defined on: https://systemd.io/COREDUMP_PACKAGE_METADATA/
this note will be used starting from Fedora 36.
Signed-off-by: Luca Boccassi <bluca@debian.org>
---
elf/elf.h | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/elf/elf.h b/elf/elf.h
index 50f87baceb..f2b72bd9f5 100644
--- a/elf/elf.h
+++ b/elf/elf.h
@@ -1302,6 +1302,10 @@ typedef struct
/* Program property. */
#define NT_GNU_PROPERTY_TYPE_0 5
+/* Packaging metadata as defined on
+ https://systemd.io/COREDUMP_PACKAGE_METADATA/ */
+#define NT_FDO_PACKAGING_METADATA 0xcafe1a7e
+
/* Note section name of program property. */
#define NOTE_GNU_PROPERTY_SECTION_NAME ".note.gnu.property"
--
2.18.4
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH] elf: add definition for FDO_PACKAGING_METADATA note
2021-11-26 16:49 ` Mark Wielaard
@ 2021-11-26 17:01 ` Luca Boccassi
0 siblings, 0 replies; 13+ messages in thread
From: Luca Boccassi @ 2021-11-26 17:01 UTC (permalink / raw)
To: Mark Wielaard, libc-alpha
[-- Attachment #1: Type: text/plain, Size: 1387 bytes --]
On Fri, 2021-11-26 at 17:49 +0100, Mark Wielaard wrote:
> Hi Luca,
>
> On Sun, 2021-11-21 at 19:39 +0000, luca.boccassi@gmail.com wrote:
> > From: Luca Boccassi <bluca@debian.org>
> >
> > As defined on: https://systemd.io/COREDUMP_PACKAGE_METADATA/
> > this note will be used starting from Fedora 36.
> >
> > Signed-off-by: Luca Boccassi <bluca@debian.org>
> > ---
> > As requested by Mark on:
> > https://sourceware.org/pipermail/elfutils-devel/2021q4/004387.html
> >
> > elf/elf.h | 3 +++
> > 1 file changed, 3 insertions(+)
>
> Two small nitpicks.
>
> > diff --git a/elf/elf.h b/elf/elf.h
> > index 50f87bac..4bb390b2 100644
> > --- a/elf/elf.h
> > +++ b/elf/elf.h
> > @@ -1302,6 +1302,9 @@ typedef struct
> > /* Program property. */
> > #define NT_GNU_PROPERTY_TYPE_0 5
> >
> >
> > +/* Packaging metadata as defined on https://systemd.io/COREDUMP_PACKAGE_METADATA/ */
>
> This comment is a little too wide.
>
> > +#define FDO_PACKAGING_METADATA 0xcafe1a7e
>
> This doesn't follow the naming scheme of the other note types. Could we
> use NT_FDO_PACKAGING_METADATA?
>
> > /* Note section name of program property. */
> > #define NOTE_GNU_PROPERTY_SECTION_NAME ".note.gnu.property"
>
> Reformatted patch attached.
>
> Thanks,
>
> Mark
Thank you, sent v2 as suggested.
--
Kind regards,
Luca Boccassi
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH v2] elf: add definition for NT_FDO_PACKAGING_METADATA note
2021-11-21 19:39 [PATCH] elf: add definition for FDO_PACKAGING_METADATA note luca.boccassi
2021-11-22 14:03 ` Florian Weimer
2021-11-26 16:49 ` Mark Wielaard
@ 2021-11-26 17:01 ` luca.boccassi
2021-11-26 20:27 ` Florian Weimer
2021-11-26 20:58 ` [PATCH v3] elf: add definition for ELF_NOTE_FDO and " luca.boccassi
3 siblings, 1 reply; 13+ messages in thread
From: luca.boccassi @ 2021-11-26 17:01 UTC (permalink / raw)
To: libc-alpha; +Cc: mark, fweimer
From: Luca Boccassi <bluca@debian.org>
As defined on: https://systemd.io/COREDUMP_PACKAGE_METADATA/
this note will be used starting from Fedora 36.
Signed-off-by: Luca Boccassi <bluca@debian.org>
---
v2: as suggested by Mark, indent comment and add NT_ suffix
elf/elf.h | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/elf/elf.h b/elf/elf.h
index 50f87baceb..f2b72bd9f5 100644
--- a/elf/elf.h
+++ b/elf/elf.h
@@ -1302,6 +1302,10 @@ typedef struct
/* Program property. */
#define NT_GNU_PROPERTY_TYPE_0 5
+/* Packaging metadata as defined on
+ https://systemd.io/COREDUMP_PACKAGE_METADATA/ */
+#define NT_FDO_PACKAGING_METADATA 0xcafe1a7e
+
/* Note section name of program property. */
#define NOTE_GNU_PROPERTY_SECTION_NAME ".note.gnu.property"
--
2.30.2
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH v2] elf: add definition for NT_FDO_PACKAGING_METADATA note
2021-11-26 17:01 ` [PATCH v2] elf: add definition for NT_FDO_PACKAGING_METADATA note luca.boccassi
@ 2021-11-26 20:27 ` Florian Weimer
2021-11-26 20:59 ` Luca Boccassi
0 siblings, 1 reply; 13+ messages in thread
From: Florian Weimer @ 2021-11-26 20:27 UTC (permalink / raw)
To: luca.boccassi; +Cc: libc-alpha, mark
* luca boccassi:
> From: Luca Boccassi <bluca@debian.org>
>
> As defined on: https://systemd.io/COREDUMP_PACKAGE_METADATA/
> this note will be used starting from Fedora 36.
>
> Signed-off-by: Luca Boccassi <bluca@debian.org>
> ---
> v2: as suggested by Mark, indent comment and add NT_ suffix
>
> elf/elf.h | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/elf/elf.h b/elf/elf.h
> index 50f87baceb..f2b72bd9f5 100644
> --- a/elf/elf.h
> +++ b/elf/elf.h
> @@ -1302,6 +1302,10 @@ typedef struct
> /* Program property. */
> #define NT_GNU_PROPERTY_TYPE_0 5
>
> +/* Packaging metadata as defined on
> + https://systemd.io/COREDUMP_PACKAGE_METADATA/ */
> +#define NT_FDO_PACKAGING_METADATA 0xcafe1a7e
> +
> /* Note section name of program property. */
> #define NOTE_GNU_PROPERTY_SECTION_NAME ".note.gnu.property"
Would you please add a definition of ELF_NOTE_FDO earlier in the file,
similar to ELF_NOTE_GNU?
I would like to point out that the format of the note is JSON-encoded,
so it's not really how we have done things so far in the GNU ABI. I
guess we can add this as a one-off exception. It shouldn't be an
example where things are supposed to go in the future.
Thanks,
Florian
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH v2] elf: add definition for NT_FDO_PACKAGING_METADATA note
2021-11-26 20:27 ` Florian Weimer
@ 2021-11-26 20:59 ` Luca Boccassi
0 siblings, 0 replies; 13+ messages in thread
From: Luca Boccassi @ 2021-11-26 20:59 UTC (permalink / raw)
To: Florian Weimer; +Cc: libc-alpha, mark
[-- Attachment #1: Type: text/plain, Size: 1480 bytes --]
On Fri, 2021-11-26 at 21:27 +0100, Florian Weimer wrote:
> * luca boccassi:
>
> > From: Luca Boccassi <bluca@debian.org>
> >
> > As defined on: https://systemd.io/COREDUMP_PACKAGE_METADATA/
> > this note will be used starting from Fedora 36.
> >
> > Signed-off-by: Luca Boccassi <bluca@debian.org>
> > ---
> > v2: as suggested by Mark, indent comment and add NT_ suffix
> >
> > elf/elf.h | 4 ++++
> > 1 file changed, 4 insertions(+)
> >
> > diff --git a/elf/elf.h b/elf/elf.h
> > index 50f87baceb..f2b72bd9f5 100644
> > --- a/elf/elf.h
> > +++ b/elf/elf.h
> > @@ -1302,6 +1302,10 @@ typedef struct
> > /* Program property. */
> > #define NT_GNU_PROPERTY_TYPE_0 5
> >
> > +/* Packaging metadata as defined on
> > + https://systemd.io/COREDUMP_PACKAGE_METADATA/ */
> > +#define NT_FDO_PACKAGING_METADATA 0xcafe1a7e
> > +
> > /* Note section name of program property. */
> > #define NOTE_GNU_PROPERTY_SECTION_NAME ".note.gnu.property"
>
> Would you please add a definition of ELF_NOTE_FDO earlier in the
> file,
> similar to ELF_NOTE_GNU?
>
> I would like to point out that the format of the note is JSON-
> encoded,
> so it's not really how we have done things so far in the GNU ABI. I
> guess we can add this as a one-off exception. It shouldn't be an
> example where things are supposed to go in the future.
>
> Thanks,
> Florian
Sent v3 as suggested, thanks.
--
Kind regards,
Luca Boccassi
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH v3] elf: add definition for ELF_NOTE_FDO and NT_FDO_PACKAGING_METADATA note
2021-11-21 19:39 [PATCH] elf: add definition for FDO_PACKAGING_METADATA note luca.boccassi
` (2 preceding siblings ...)
2021-11-26 17:01 ` [PATCH v2] elf: add definition for NT_FDO_PACKAGING_METADATA note luca.boccassi
@ 2021-11-26 20:58 ` luca.boccassi
2021-11-29 20:35 ` Florian Weimer
2021-12-02 22:02 ` Florian Weimer
3 siblings, 2 replies; 13+ messages in thread
From: luca.boccassi @ 2021-11-26 20:58 UTC (permalink / raw)
To: libc-alpha; +Cc: mark, fweimer
From: Luca Boccassi <bluca@debian.org>
As defined on: https://systemd.io/COREDUMP_PACKAGE_METADATA/
this note will be used starting from Fedora 36.
Signed-off-by: Luca Boccassi <bluca@debian.org>
---
v2: as suggested by Mark, indent comment and add NT_ suffix
v3: as requested by Florian, add ELF_NOTE_FDO definition
elf/elf.h | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/elf/elf.h b/elf/elf.h
index 50f87baceb..baa6c6693e 100644
--- a/elf/elf.h
+++ b/elf/elf.h
@@ -1259,6 +1259,8 @@ typedef struct
/* Note entries for GNU systems have this name. */
#define ELF_NOTE_GNU "GNU"
+/* Note entries for freedesktop.org have this name. */
+#define ELF_NOTE_FDO "FDO"
/* Defined types of notes for Solaris. */
@@ -1302,6 +1304,10 @@ typedef struct
/* Program property. */
#define NT_GNU_PROPERTY_TYPE_0 5
+/* Packaging metadata as defined on
+ https://systemd.io/COREDUMP_PACKAGE_METADATA/ */
+#define NT_FDO_PACKAGING_METADATA 0xcafe1a7e
+
/* Note section name of program property. */
#define NOTE_GNU_PROPERTY_SECTION_NAME ".note.gnu.property"
--
2.33.0
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH v3] elf: add definition for ELF_NOTE_FDO and NT_FDO_PACKAGING_METADATA note
2021-11-26 20:58 ` [PATCH v3] elf: add definition for ELF_NOTE_FDO and " luca.boccassi
@ 2021-11-29 20:35 ` Florian Weimer
2021-12-02 22:02 ` Florian Weimer
1 sibling, 0 replies; 13+ messages in thread
From: Florian Weimer @ 2021-11-29 20:35 UTC (permalink / raw)
To: luca.boccassi; +Cc: libc-alpha, mark
* luca boccassi:
> From: Luca Boccassi <bluca@debian.org>
>
> As defined on: https://systemd.io/COREDUMP_PACKAGE_METADATA/
> this note will be used starting from Fedora 36.
>
> Signed-off-by: Luca Boccassi <bluca@debian.org>
> ---
> v2: as suggested by Mark, indent comment and add NT_ suffix
> v3: as requested by Florian, add ELF_NOTE_FDO definition
>
> elf/elf.h | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/elf/elf.h b/elf/elf.h
> index 50f87baceb..baa6c6693e 100644
> --- a/elf/elf.h
> +++ b/elf/elf.h
> @@ -1259,6 +1259,8 @@ typedef struct
> /* Note entries for GNU systems have this name. */
> #define ELF_NOTE_GNU "GNU"
>
> +/* Note entries for freedesktop.org have this name. */
> +#define ELF_NOTE_FDO "FDO"
>
> /* Defined types of notes for Solaris. */
>
> @@ -1302,6 +1304,10 @@ typedef struct
> /* Program property. */
> #define NT_GNU_PROPERTY_TYPE_0 5
>
> +/* Packaging metadata as defined on
> + https://systemd.io/COREDUMP_PACKAGE_METADATA/ */
> +#define NT_FDO_PACKAGING_METADATA 0xcafe1a7e
> +
> /* Note section name of program property. */
> #define NOTE_GNU_PROPERTY_SECTION_NAME ".note.gnu.property"
I'm going to apply this later this week if no one objects.
(Note that the format of the note payload is very much unlike everything
else we do in the ELF space; see the URL.)
Thanks,
Florian
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH v3] elf: add definition for ELF_NOTE_FDO and NT_FDO_PACKAGING_METADATA note
2021-11-26 20:58 ` [PATCH v3] elf: add definition for ELF_NOTE_FDO and " luca.boccassi
2021-11-29 20:35 ` Florian Weimer
@ 2021-12-02 22:02 ` Florian Weimer
1 sibling, 0 replies; 13+ messages in thread
From: Florian Weimer @ 2021-12-02 22:02 UTC (permalink / raw)
To: luca.boccassi; +Cc: libc-alpha, mark
* luca boccassi:
> From: Luca Boccassi <bluca@debian.org>
>
> As defined on: https://systemd.io/COREDUMP_PACKAGE_METADATA/
> this note will be used starting from Fedora 36.
>
> Signed-off-by: Luca Boccassi <bluca@debian.org>
Thanks, now pushed.
Florian
^ permalink raw reply [flat|nested] 13+ messages in thread