Skip to content

Commit 4d65759

Browse files
committed
selftests/pidfd: add PIDFD_INFO_COREDUMP infrastructure
Add PIDFD_INFO_COREDUMP infrastructure so we can use it in tests. Link: https://lore.kernel.org/[email protected] Acked-by: Luca Boccassi <[email protected]> Reviewed-by: Alexander Mikhalitsyn <[email protected]> Signed-off-by: Christian Brauner <[email protected]>
1 parent 16195d2 commit 4d65759

File tree

1 file changed

+22
-0
lines changed
  • tools/testing/selftests/pidfd

1 file changed

+22
-0
lines changed

tools/testing/selftests/pidfd/pidfd.h

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,26 @@
131131
#define PIDFD_INFO_EXIT (1UL << 3) /* Always returned if available, even if not requested */
132132
#endif
133133

134+
#ifndef PIDFD_INFO_COREDUMP
135+
#define PIDFD_INFO_COREDUMP (1UL << 4)
136+
#endif
137+
138+
#ifndef PIDFD_COREDUMPED
139+
#define PIDFD_COREDUMPED (1U << 0) /* Did crash and... */
140+
#endif
141+
142+
#ifndef PIDFD_COREDUMP_SKIP
143+
#define PIDFD_COREDUMP_SKIP (1U << 1) /* coredumping generation was skipped. */
144+
#endif
145+
146+
#ifndef PIDFD_COREDUMP_USER
147+
#define PIDFD_COREDUMP_USER (1U << 2) /* coredump was done as the user. */
148+
#endif
149+
150+
#ifndef PIDFD_COREDUMP_ROOT
151+
#define PIDFD_COREDUMP_ROOT (1U << 3) /* coredump was done as root. */
152+
#endif
153+
134154
#ifndef PIDFD_THREAD
135155
#define PIDFD_THREAD O_EXCL
136156
#endif
@@ -150,6 +170,8 @@ struct pidfd_info {
150170
__u32 fsuid;
151171
__u32 fsgid;
152172
__s32 exit_code;
173+
__u32 coredump_mask;
174+
__u32 __spare1;
153175
};
154176

155177
/*

0 commit comments

Comments
 (0)