Do not warn for ELF note for FDO packaging metadata

(https://systemd.io/COREDUMP_PACKAGE_METADATA/),
found in userland binaries of Fedora 36.
This commit is contained in:
rin 2022-06-08 10:12:42 +00:00
parent 65d5dda139
commit b858ac1337
2 changed files with 19 additions and 3 deletions

View File

@ -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. * Copyright (c) 1994, 2000, 2005, 2015, 2020 The NetBSD Foundation, Inc.
@ -57,7 +57,7 @@
*/ */
#include <sys/cdefs.h> #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 #ifdef _KERNEL_OPT
#include "opt_pax.h" #include "opt_pax.h"
@ -1084,6 +1084,9 @@ netbsd_elf_note(struct exec_package *epp,
case ELF_NOTE_TYPE_GO_BUILDID_TAG: case ELF_NOTE_TYPE_GO_BUILDID_TAG:
break; break;
case ELF_NOTE_TYPE_FDO_PACKAGING_METADATA:
break;
case ELF_NOTE_TYPE_NETBSD_EMUL_TAG: case ELF_NOTE_TYPE_NETBSD_EMUL_TAG:
/* Ancient NetBSD version tag */ /* Ancient NetBSD version tag */
break; break;

View File

@ -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. * Copyright (c) 1994 The NetBSD Foundation, Inc.
@ -1027,6 +1027,19 @@ typedef struct {
#define ELF_NOTE_GO_BUILDID_DESCSZ 40 #define ELF_NOTE_GO_BUILDID_DESCSZ 40
#define ELF_NOTE_GO_BUILDID_NAME "Go\0\0" #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. /* NetBSD-specific note type: NetBSD ABI version.
* name: NetBSD\0\0 * name: NetBSD\0\0
* namesz: 8 * namesz: 8