aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorEric Paris <eparis@redhat.com>2012-01-03 14:23:05 -0500
committerAl Viro <viro@zeniv.linux.org.uk>2012-01-17 16:16:55 -0500
commit85e7bac33b8d5edafc4e219c7dfdb3d48e0b4e31 (patch)
tree6a1f178de829d2219a65a8563e12f2c8029d4b13 /include
parent16c174bd95cb07c9d0ad3fcd8c70f9cea7214c9d (diff)
seccomp: audit abnormal end to a process due to seccomp
The audit system likes to collect information about processes that end abnormally (SIGSEGV) as this may me useful intrusion detection information. This patch adds audit support to collect information when seccomp forces a task to exit because of misbehavior in a similar way. Signed-off-by: Eric Paris <eparis@redhat.com>
Diffstat (limited to 'include')
-rw-r--r--include/linux/audit.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/linux/audit.h b/include/linux/audit.h
index 426ab9f4dd85..6e1c533f9b46 100644
--- a/include/linux/audit.h
+++ b/include/linux/audit.h
@@ -430,6 +430,7 @@ extern void audit_putname(const char *name);
430extern void __audit_inode(const char *name, const struct dentry *dentry); 430extern void __audit_inode(const char *name, const struct dentry *dentry);
431extern void __audit_inode_child(const struct dentry *dentry, 431extern void __audit_inode_child(const struct dentry *dentry,
432 const struct inode *parent); 432 const struct inode *parent);
433extern void __audit_seccomp(unsigned long syscall);
433extern void __audit_ptrace(struct task_struct *t); 434extern void __audit_ptrace(struct task_struct *t);
434 435
435static inline int audit_dummy_context(void) 436static inline int audit_dummy_context(void)
@@ -453,6 +454,12 @@ static inline void audit_inode_child(const struct dentry *dentry,
453} 454}
454void audit_core_dumps(long signr); 455void audit_core_dumps(long signr);
455 456
457static inline void audit_seccomp(unsigned long syscall)
458{
459 if (unlikely(!audit_dummy_context()))
460 __audit_seccomp(syscall);
461}
462
456static inline void audit_ptrace(struct task_struct *t) 463static inline void audit_ptrace(struct task_struct *t)
457{ 464{
458 if (unlikely(!audit_dummy_context())) 465 if (unlikely(!audit_dummy_context()))
@@ -558,6 +565,7 @@ extern int audit_signals;
558#define audit_inode(n,d) do { (void)(d); } while (0) 565#define audit_inode(n,d) do { (void)(d); } while (0)
559#define audit_inode_child(i,p) do { ; } while (0) 566#define audit_inode_child(i,p) do { ; } while (0)
560#define audit_core_dumps(i) do { ; } while (0) 567#define audit_core_dumps(i) do { ; } while (0)
568#define audit_seccomp(i) do { ; } while (0)
561#define auditsc_get_stamp(c,t,s) (0) 569#define auditsc_get_stamp(c,t,s) (0)
562#define audit_get_loginuid(t) (-1) 570#define audit_get_loginuid(t) (-1)
563#define audit_get_sessionid(t) (-1) 571#define audit_get_sessionid(t) (-1)