Skip to content

Build error on Ubuntu 24.04 (kernel 6.14.0-32): 'struct fd' has no member named 'file' #23

@lycself

Description

@lycself

Hi,
Thanks for this useful project! I tried to build it on Ubuntu 24.04 with kernel 6.14.0-32 and gcc 13.3, but the build failed due to a struct layout change in newer kernels.

System Information
• OS: Ubuntu 24.04 (Noble)
• Kernel: 6.14.0-32-generic
• GCC: 13.3.0
• NVIDIA Driver: 580.82.07

Build Command
make

Error Log
src/mpu_syscall_hook.c: In function ‘get_rdev’:
src/mpu_syscall_hook.c:73:8: error: ‘struct fd’ has no member named ‘file’
73 | if (f.file)
| ^
src/mpu_syscall_hook.c:75:25: error: ‘struct fd’ has no member named ‘file’
75 | inode = FILE_INODE(f.file);
| ^
make[4]: *** [src/mpu_syscall_hook.o] Error 1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions