-
Notifications
You must be signed in to change notification settings - Fork 381
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding vmlinux.h file that includes the vmlinux_generated.h and adds our local tetragon structures. Signed-off-by: Jiri Olsa <[email protected]>
- Loading branch information
Showing
3 changed files
with
53 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
/* SPDX-License-Identifier: (LGPL-2.1 OR BSD-2-Clause) */ | ||
#ifndef __VMLINUX_H__ | ||
#define __VMLINUX_H__ | ||
|
||
#if defined(__TARGET_ARCH_x86) | ||
#include "vmlinux_generated_x86.h" | ||
#elif defined(__TARGET_ARCH_arm64) | ||
#include "vmlinux_generated_arm64.h" | ||
#endif | ||
|
||
/* | ||
* Local definitions that we use in tetragon and are no longer part | ||
* of vmlinux_generated.h. | ||
*/ | ||
|
||
struct pid_link { | ||
struct hlist_node node; | ||
struct pid *pid; | ||
}; | ||
|
||
struct audit_task_info { | ||
kuid_t loginuid; | ||
}; | ||
|
||
struct task_struct___local { | ||
struct pid_link pids[PIDTYPE_MAX]; // old school pid refs | ||
struct pid *thread_pid; | ||
struct audit_task_info *audit; // Added audit_task for older kernels | ||
kuid_t loginuid; | ||
}; | ||
|
||
/* Represent old kernfs node present in 5.4 kernels and older */ | ||
union kernfs_node_id { | ||
struct { | ||
/* | ||
* blktrace will export this struct as a simplified 'struct | ||
* fid' (which is a big data struction), so userspace can use | ||
* it to find kernfs node. The layout must match the first two | ||
* fields of 'struct fid' exactly. | ||
*/ | ||
u32 ino; | ||
u32 generation; | ||
}; | ||
u64 id; | ||
}; | ||
|
||
#endif /* __VMLINUX_H__ */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters