mm_id.h 617 B

123456789101112131415161718192021222324252627282930
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. /*
  3. * Copyright (C) 2005 Jeff Dike (jdike@karaya.com)
  4. */
  5. #ifndef __MM_ID_H
  6. #define __MM_ID_H
  7. #include <linux/compiler_types.h>
  8. #define STUB_MAX_FDS 4
  9. struct mm_id {
  10. int pid;
  11. unsigned long stack;
  12. int syscall_data_len;
  13. /* Only used with SECCOMP mode */
  14. int sock;
  15. int syscall_fd_num;
  16. int syscall_fd_map[STUB_MAX_FDS];
  17. };
  18. struct mutex *__get_turnstile(struct mm_id *mm_id);
  19. void enter_turnstile(struct mm_id *mm_id) __acquires(__get_turnstile(mm_id));
  20. void exit_turnstile(struct mm_id *mm_id) __releases(__get_turnstile(mm_id));
  21. void notify_mm_kill(int pid);
  22. #endif