Skip to content

Commit

Permalink
fix rh9.4
Browse files Browse the repository at this point in the history
  • Loading branch information
paulcacheux committed Dec 10, 2024
1 parent c55b11c commit a4c4a47
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkg/security/ebpf/kernel/kernel.go
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,11 @@ func (k *Version) IsRH9_3Kernel() bool {
return k.IsRH9Kernel() && strings.HasPrefix(k.OsRelease["VERSION_ID"], "9.3")
}

// IsRH9_4Kernel returns whether the kernel is a rh9.3 kernel
func (k *Version) IsRH9_4Kernel() bool {
return k.IsRH9Kernel() && strings.HasPrefix(k.OsRelease["VERSION_ID"], "9.4")
}

// IsSuseKernel returns whether the kernel is a suse kernel
func (k *Version) IsSuseKernel() bool {
return k.IsSLESKernel() || k.OsRelease["ID"] == "opensuse-leap"
Expand Down
4 changes: 4 additions & 0 deletions pkg/security/probe/probe_ebpf.go
Original file line number Diff line number Diff line change
Expand Up @@ -2338,6 +2338,10 @@ func getOvlPathInOvlInode(kernelVersion *kernel.Version) uint64 {
return 2
}

if kernelVersion.IsInRangeCloseOpen(kernel.Kernel5_14, kernel.Kernel5_15) && kernelVersion.IsRH9_4Kernel() {
return 2
}

// https://github.com/torvalds/linux/commit/ffa5723c6d259b3191f851a50a98d0352b345b39
// changes a bit how the lower dentry/inode is stored in `ovl_inode`. To check if we
// are in this configuration we first probe the kernel version, then we check for the
Expand Down

0 comments on commit a4c4a47

Please sign in to comment.