lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  PHC 
Open Source and information security mailing list archives
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 30 May 2019 04:40:47 -0700
From:   Guenter Roeck <>
To:     Jann Horn <>
Cc:     Christian Brauner <>,, Guenter Roeck <>
Subject: [PATCH] samples: pidfd: Fix compile error seen if __NR_pidfd_send_signal is undefined

To make pidfd-metadata compile on all arches, irrespective of whether
or not syscall numbers are assigned, define the syscall number to -1
if it isn't to cause the kernel to return -ENOSYS.

Fixes: 43c6afee48d4 ("samples: show race-free pidfd metadata access")
Cc: Christian Brauner <>
Signed-off-by: Guenter Roeck <>
 samples/pidfd/pidfd-metadata.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/samples/pidfd/pidfd-metadata.c b/samples/pidfd/pidfd-metadata.c
index 640f5f757c57..1e125ddde268 100644
--- a/samples/pidfd/pidfd-metadata.c
+++ b/samples/pidfd/pidfd-metadata.c
@@ -21,6 +21,10 @@
 #define CLONE_PIDFD 0x00001000
+#ifndef __NR_pidfd_send_signal
+#define __NR_pidfd_send_signal	-1
 static int do_child(void *args)
 	printf("%d\n", getpid());

Powered by blists - more mailing lists