Skip to content

Commit

Permalink
Overlay FS: Add fields proc.is_exe_lower_layer, fd.is_upper_layer and…
Browse files Browse the repository at this point in the history
… fd.is_lower_layer

Signed-off-by: Eddy Duer <[email protected]>
  • Loading branch information
eddyduer-sysdig committed Jun 26, 2024
1 parent 473bf06 commit 5508317
Show file tree
Hide file tree
Showing 24 changed files with 647 additions and 173 deletions.
9 changes: 4 additions & 5 deletions driver/bpf/filler_helpers.h
Original file line number Diff line number Diff line change
Expand Up @@ -280,21 +280,20 @@ static __always_inline unsigned long bpf_encode_dev(dev_t dev)
return (minor & 0xff) | (major << 8) | ((minor & ~0xff) << 12);
}

static __always_inline void bpf_get_fd_dev_ino(int fd, unsigned long *dev, unsigned long *ino)
static __always_inline void bpf_get_fd_dev_ino_file(int fd, unsigned long *dev, unsigned long *ino, struct file **file)
{
struct super_block *sb;
struct inode *inode;
struct file *file;
dev_t kdev;

if (fd < 0)
return;

file = bpf_fget(fd);
if (!file)
*file = bpf_fget(fd);
if (!*file)
return;

inode = _READ(file->f_inode);
inode = _READ((*file)->f_inode);
if (!inode)
return;

Expand Down
Loading

0 comments on commit 5508317

Please sign in to comment.