lists.openwall.net   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  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20251028-work-coredump-signal-v1-16-ca449b7b7aa0@kernel.org>
Date: Tue, 28 Oct 2025 09:46:01 +0100
From: Christian Brauner <brauner@...nel.org>
To: linux-fsdevel@...r.kernel.org
Cc: Oleg Nesterov <oleg@...hat.com>, Amir Goldstein <amir73il@...il.com>, 
 Aleksa Sarai <cyphar@...har.com>, 
 Yu Watanabe <watanabe.yu+github@...il.com>, 
 Josef Bacik <josef@...icpanda.com>, Jeff Layton <jlayton@...nel.org>, 
 Jann Horn <jannh@...gle.com>, Luca Boccassi <luca.boccassi@...il.com>, 
 Alexander Mikhalitsyn <alexander@...alicyn.com>, 
 linux-kernel@...r.kernel.org, Alexander Viro <viro@...iv.linux.org.uk>, 
 Jan Kara <jack@...e.cz>, Lennart Poettering <lennart@...ttering.net>, 
 Mike Yuan <me@...dnzj.com>, 
 Zbigniew Jędrzejewski-Szmek <zbyszek@...waw.pl>, 
 Christian Brauner <brauner@...nel.org>
Subject: [PATCH 16/22] selftests/coredump: handle edge-triggered epoll
 correctly

by putting the file descriptor into non-blocking mode.

Signed-off-by: Christian Brauner <brauner@...nel.org>
---
 tools/testing/selftests/coredump/coredump_test_helpers.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/tools/testing/selftests/coredump/coredump_test_helpers.c b/tools/testing/selftests/coredump/coredump_test_helpers.c
index 7512a8ef73d3..116c797090a1 100644
--- a/tools/testing/selftests/coredump/coredump_test_helpers.c
+++ b/tools/testing/selftests/coredump/coredump_test_helpers.c
@@ -291,6 +291,14 @@ void process_coredump_worker(int fd_coredump, int fd_peer_pidfd, int fd_core_fil
 	int epfd = -1;
 	int exit_code = EXIT_FAILURE;
 	struct epoll_event ev;
+	int flags;
+
+	/* Set socket to non-blocking mode for edge-triggered epoll */
+	flags = fcntl(fd_coredump, F_GETFL, 0);
+	if (flags < 0)
+		goto out;
+	if (fcntl(fd_coredump, F_SETFL, flags | O_NONBLOCK) < 0)
+		goto out;
 
 	epfd = epoll_create1(0);
 	if (epfd < 0)

-- 
2.47.3


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ