Skip to content

Commit

Permalink
fix(driver): fixed build against linux 6.6.
Browse files Browse the repository at this point in the history
Signed-off-by: Federico Di Pierro <[email protected]>
  • Loading branch information
FedeDP authored and poiana committed Oct 17, 2023
1 parent 026d219 commit 0bba33c
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 12 deletions.
2 changes: 0 additions & 2 deletions driver/bpf/fillers.h
Original file line number Diff line number Diff line change
Expand Up @@ -2839,7 +2839,6 @@ FILLER(execve_extra_tail_1, true)
/* Parameter 25: exe_file ctime (last status change time, epoch value in nanoseconds) (type: PT_ABSTIME) */
#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 6, 0)
time = _READ(inode->__i_ctime);
time.tv_nsec = time.tv_nsec & ~I_CTIME_QUERIED; // See https://elixir.bootlin.com/linux/v6.6-rc1/source/include/linux/fs.h#L1544
#else
time = _READ(inode->i_ctime);
#endif
Expand Down Expand Up @@ -6695,7 +6694,6 @@ FILLER(sched_prog_exec_4, false)
/* Parameter 25: exe_file ctime (last status change time, epoch value in nanoseconds) (type: PT_ABSTIME) */
#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 6, 0)
time = _READ(inode->__i_ctime);
time.tv_nsec = time.tv_nsec & ~I_CTIME_QUERIED; // See https://elixir.bootlin.com/linux/v6.6-rc1/source/include/linux/fs.h#L1544
#else
time = _READ(inode->i_ctime);
#endif
Expand Down
7 changes: 0 additions & 7 deletions driver/modern_bpf/definitions/missing_definitions.h
Original file line number Diff line number Diff line change
Expand Up @@ -585,13 +585,6 @@

#define FMODE_CREATED (/*(__force fmode_t) */0x100000)

//////////////////////////
// ctime flags
//////////////////////////

/* `include/linux/fs.h` from kernel source tree. */
#define I_CTIME_QUERIED (1L<<30)

//////////////////////////
// flock flags
//////////////////////////
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,6 @@ int BPF_PROG(t1_sched_p_exec,
{
struct inode___v6_6 *exe_inode_v6_6 = (void *)exe_inode;
BPF_CORE_READ_INTO(&time, exe_inode_v6_6, __i_ctime);
time.tv_nsec = time.tv_nsec & ~I_CTIME_QUERIED;
}
auxmap__store_u64_param(auxmap, extract__epoch_ns_from_time(time));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,6 @@ int BPF_PROG(t1_execve_x,
{
struct inode___v6_6 *exe_inode_v6_6 = (void *)exe_inode;
BPF_CORE_READ_INTO(&time, exe_inode_v6_6, __i_ctime);
time.tv_nsec = time.tv_nsec & ~I_CTIME_QUERIED;
}
auxmap__store_u64_param(auxmap, extract__epoch_ns_from_time(time));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,6 @@ int BPF_PROG(t1_execveat_x,
{
struct inode___v6_6 *exe_inode_v6_6 = (void *)exe_inode;
BPF_CORE_READ_INTO(&time, exe_inode_v6_6, __i_ctime);
time.tv_nsec = time.tv_nsec & ~I_CTIME_QUERIED;
}
auxmap__store_u64_param(auxmap, extract__epoch_ns_from_time(time));

Expand Down

0 comments on commit 0bba33c

Please sign in to comment.