Skip to content

Commit c0a3a20

Browse files
vapiertorvalds
authored andcommitted
linux/audit.h: move ptrace.h include to kernel header
While the kernel internals want pt_regs (and so it includes linux/ptrace.h), the user version of audit.h does not need it. So move the include out of the uapi version. This avoids issues where people want the audit defines and userland ptrace api. Including both the kernel ptrace and the userland ptrace headers can easily lead to failure. Signed-off-by: Mike Frysinger <vapier@gentoo.org> Cc: Eric Paris <eparis@redhat.com> Cc: Al Viro <viro@zeniv.linux.org.uk> Reviewed-by: Kees Cook <keescook@chromium.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent 8291991 commit c0a3a20

File tree

2 files changed

+1
-1
lines changed

2 files changed

+1
-1
lines changed

include/linux/audit.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
#define _LINUX_AUDIT_H_
2525

2626
#include <linux/sched.h>
27+
#include <linux/ptrace.h>
2728
#include <uapi/linux/audit.h>
2829

2930
struct audit_sig_info {

include/uapi/linux/audit.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626

2727
#include <linux/types.h>
2828
#include <linux/elf-em.h>
29-
#include <linux/ptrace.h>
3029

3130
/* The netlink messages for the audit system is divided into blocks:
3231
* 1000 - 1099 are for commanding the audit system

0 commit comments

Comments
 (0)