Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys Do not warn for ELF note for FDO packaging metadata



details:   https://anonhg.NetBSD.org/src/rev/df53ebfb12cb
branches:  trunk
changeset: 366686:df53ebfb12cb
user:      rin <rin%NetBSD.org@localhost>
date:      Wed Jun 08 10:12:42 2022 +0000

description:
Do not warn for ELF note for FDO packaging metadata
(https://systemd.io/COREDUMP_PACKAGE_METADATA/),
found in userland binaries of Fedora 36.

diffstat:

 sys/kern/exec_elf.c |   7 +++++--
 sys/sys/exec_elf.h  |  15 ++++++++++++++-
 2 files changed, 19 insertions(+), 3 deletions(-)

diffs (57 lines):

diff -r 9ed97b4086de -r df53ebfb12cb sys/kern/exec_elf.c
--- a/sys/kern/exec_elf.c       Wed Jun 08 07:24:12 2022 +0000
+++ b/sys/kern/exec_elf.c       Wed Jun 08 10:12:42 2022 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: exec_elf.c,v 1.102 2021/05/18 08:59:44 hannken Exp $   */
+/*     $NetBSD: exec_elf.c,v 1.103 2022/06/08 10:12:42 rin Exp $       */
 
 /*-
  * Copyright (c) 1994, 2000, 2005, 2015, 2020 The NetBSD Foundation, Inc.
@@ -57,7 +57,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(1, "$NetBSD: exec_elf.c,v 1.102 2021/05/18 08:59:44 hannken Exp $");
+__KERNEL_RCSID(1, "$NetBSD: exec_elf.c,v 1.103 2022/06/08 10:12:42 rin Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_pax.h"
@@ -1084,6 +1084,9 @@
        case ELF_NOTE_TYPE_GO_BUILDID_TAG:
                break;
 
+       case ELF_NOTE_TYPE_FDO_PACKAGING_METADATA:
+               break;
+
        case ELF_NOTE_TYPE_NETBSD_EMUL_TAG:
                /* Ancient NetBSD version tag */
                break;
diff -r 9ed97b4086de -r df53ebfb12cb sys/sys/exec_elf.h
--- a/sys/sys/exec_elf.h        Wed Jun 08 07:24:12 2022 +0000
+++ b/sys/sys/exec_elf.h        Wed Jun 08 10:12:42 2022 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: exec_elf.h,v 1.169 2022/05/28 22:00:55 andvar Exp $    */
+/*     $NetBSD: exec_elf.h,v 1.170 2022/06/08 10:12:42 rin Exp $       */
 
 /*-
  * Copyright (c) 1994 The NetBSD Foundation, Inc.
@@ -1027,6 +1027,19 @@
 #define ELF_NOTE_GO_BUILDID_DESCSZ     40
 #define ELF_NOTE_GO_BUILDID_NAME       "Go\0\0"
 
+/*
+ * FDO-specific note type: packaging metadata
+ * name: FDO\0
+ * namesz: 4
+ * desc:
+ *     a single JSON object encoded as a zero-terminated UTF-8 string
+ *     (see https://systemd.io/COREDUMP_PACKAGE_METADATA/)
+ * descsz: variable
+ */
+#define        ELF_NOTE_TYPE_FDO_PACKAGING_METADATA    0xcafe1a7e
+#define        ELF_NOTE_FDO_PACKAGING_METADATA_NAMESZ  4
+#define        ELF_NOTE_FDO_PACKAGING_METADATA_NAME    "FDO\0"
+
 /* NetBSD-specific note type: NetBSD ABI version.
  * name: NetBSD\0\0
  * namesz: 8



Home | Main Index | Thread Index | Old Index