1 /* SPDX-License-Identifier: GPL-2.0 */ 2 /* 3 * Define struct user_exit_info which is shared between BPF and userspace parts 4 * to communicate exit status and other information. 5 * 6 * Copyright (c) 2022 Meta Platforms, Inc. and affiliates. 7 * Copyright (c) 2022 Tejun Heo <tj@kernel.org> 8 * Copyright (c) 2022 David Vernet <dvernet@meta.com> 9 */ 10 #ifndef __USER_EXIT_INFO_COMMON_H 11 #define __USER_EXIT_INFO_COMMON_H 12 13 #ifdef LSP 14 #include "../vmlinux.h" 15 #endif 16 17 enum uei_sizes { 18 UEI_REASON_LEN = 128, 19 UEI_MSG_LEN = 1024, 20 UEI_DUMP_DFL_LEN = 32768, 21 }; 22 23 struct user_exit_info { 24 int kind; 25 s64 exit_code; 26 char reason[UEI_REASON_LEN]; 27 char msg[UEI_MSG_LEN]; 28 }; 29 30 #endif /* __USER_EXIT_INFO_COMMON_H */ 31