| To get `pahole`: `apt install dwarves` | |
| pleb@gamey:~$ pahole /usr/lib/debug/boot/vmlinux-4.19.0-6-amd64 --hex -M -E -C file | |
| struct file { | |
| union { | |
| struct llist_node { | |
| struct llist_node * next; /* 0 0x8 */ | |
| } fu_llist; /* 0 0x8 */ | |
| struct callback_head { | |
| struct callback_head * next; /* 0 0x8 */ | |
| void (*func)(struct callback_head *); /* 0x8 0x8 */ | |
| } fu_rcuhead; /* 0 0x10 */ | |
| } f_u; /* 0 0x10 */ | |
| struct path { | |
| struct vfsmount * mnt; /* 0x10 0x8 */ | |
| struct dentry * dentry; /* 0x18 0x8 */ | |
| } f_path; /* 0x10 0x10 */ | |
| struct inode * f_inode; /* 0x20 0x8 */ | |
| const struct file_operations * f_op; /* 0x28 0x8 */ | |
| /* typedef spinlock_t */ struct spinlock { | |
| union { | |
| struct raw_spinlock { | |
| /* typedef arch_spinlock_t */ struct qspinlock { | |
| union { | |
| /* typedef atomic_t */ struct { | |
| int counter; /* 0x30 0x4 */ | |
| } val; /* 0x30 0x4 */ | |
| struct { | |
| /* typedef u8 -> __u8 */ unsigned char locked; /* 0x30 0x1 */ | |
| /* typedef u8 -> __u8 */ unsigned char pending; /* 0x31 0x1 */ | |
| }; /* 0x30 0x2 */ | |
| struct { | |
| /* typedef u16 -> __u16 */ short unsigned int locked_pending; /* 0x30 0x2 */ | |
| /* typedef u16 -> __u16 */ short unsigned int tail; /* 0x32 0x2 */ | |
| }; /* 0x30 0x4 */ | |
| }; /* 0x30 0x4 */ | |
| } raw_lock; /* 0x30 0x4 */ | |
| } rlock; /* 0x30 0x4 */ | |
| }; /* 0x30 0x4 */ | |
| } f_lock; /* 0x30 0x4 */ | |
| enum rw_hint f_write_hint; /* 0x34 0x4 */ | |
| /* typedef atomic_long_t -> atomic64_t */ struct { | |
| long int counter; /* 0x38 0x8 */ | |
| } f_count; /* 0x38 0x8 */ | |
| /* --- cacheline 1 boundary (64 bytes) --- */ | |
| unsigned int f_flags; /* 0x40 0x4 */ | |
| /* typedef fmode_t */ unsigned int f_mode; /* 0x44 0x4 */ | |
| struct mutex { | |
| /* typedef atomic_long_t -> atomic64_t */ struct { | |
| long int counter; /* 0x48 0x8 */ | |
| } owner; /* 0x48 0x8 */ | |
| /* typedef spinlock_t */ struct spinlock { | |
| union { | |
| struct raw_spinlock { | |
| /* typedef arch_spinlock_t */ struct qspinlock { | |
| union { | |
| /* typedef atomic_t */ struct { | |
| int counter; /* 0x50 0x4 */ | |
| } val; /* 0x50 0x4 */ | |
| struct { | |
| /* typedef u8 -> __u8 */ unsigned char locked; /* 0x50 0x1 */ | |
| /* typedef u8 -> __u8 */ unsigned char pending; /* 0x51 0x1 */ | |
| }; /* 0x50 0x2 */ | |
| struct { | |
| /* typedef u16 -> __u16 */ short unsigned int locked_pending; /* 0x50 0x2 */ | |
| /* typedef u16 -> __u16 */ short unsigned int tail; /* 0x52 0x2 */ | |
| }; /* 0x50 0x4 */ | |
| }; /* 0x50 0x4 */ | |
| } raw_lock; /* 0x50 0x4 */ | |
| } rlock; /* 0x50 0x4 */ | |
| }; /* 0x50 0x4 */ | |
| } wait_lock; /* 0x50 0x4 */ | |
| struct optimistic_spin_queue { | |
| /* typedef atomic_t */ struct { | |
| int counter; /* 0x54 0x4 */ | |
| } tail; /* 0x54 0x4 */ | |
| } osq; /* 0x54 0x4 */ | |
| struct list_head { | |
| struct list_head * next; /* 0x58 0x8 */ | |
| struct list_head * prev; /* 0x60 0x8 */ | |
| } wait_list; /* 0x58 0x10 */ | |
| } f_pos_lock; /* 0x48 0x20 */ | |
| /* typedef loff_t -> __kernel_loff_t */ long long int f_pos; /* 0x68 0x8 */ | |
| struct fown_struct { | |
| /* typedef rwlock_t */ struct { | |
| /* typedef arch_rwlock_t */ struct qrwlock { | |
| union { | |
| /* typedef atomic_t */ struct { | |
| int counter; /* 0x70 0x4 */ | |
| } cnts; /* 0x70 0x4 */ | |
| struct { | |
| /* typedef u8 -> __u8 */ unsigned char wlocked; /* 0x70 0x1 */ | |
| /* typedef u8 -> __u8 */ unsigned char __lstate[3]; /* 0x71 0x3 */ | |
| }; /* 0x70 0x4 */ | |
| }; /* 0x70 0x4 */ | |
| /* typedef arch_spinlock_t */ struct qspinlock { | |
| union { | |
| /* typedef atomic_t */ struct { | |
| int counter; /* 0x74 0x4 */ | |
| } val; /* 0x74 0x4 */ | |
| struct { | |
| /* typedef u8 -> __u8 */ unsigned char locked; /* 0x74 0x1 */ | |
| /* typedef u8 -> __u8 */ unsigned char pending; /* 0x75 0x1 */ | |
| }; /* 0x74 0x2 */ | |
| struct { | |
| /* typedef u16 -> __u16 */ short unsigned int locked_pending; /* 0x74 0x2 */ | |
| /* typedef u16 -> __u16 */ short unsigned int tail; /* 0x76 0x2 */ | |
| }; /* 0x74 0x4 */ | |
| }; /* 0x74 0x4 */ | |
| } wait_lock; /* 0x74 0x4 */ | |
| } raw_lock; /* 0x70 0x8 */ | |
| } lock; /* 0x70 0x8 */ | |
| struct pid * pid; /* 0x78 0x8 */ | |
| /* --- cacheline 2 boundary (128 bytes) --- */ | |
| enum pid_type pid_type; /* 0x80 0x4 */ | |
| /* typedef kuid_t */ struct { | |
| /* typedef uid_t -> __kernel_uid32_t */ unsigned int val; /* 0x84 0x4 */ | |
| } uid; /* 0x84 0x4 */ | |
| /* typedef kuid_t */ struct { | |
| /* typedef uid_t -> __kernel_uid32_t */ unsigned int val; /* 0x88 0x4 */ | |
| } euid; /* 0x88 0x4 */ | |
| int signum; /* 0x8c 0x4 */ | |
| } f_owner; /* 0x70 0x20 */ | |
| const struct cred * f_cred; /* 0x90 0x8 */ | |
| struct file_ra_state { | |
| long unsigned int start; /* 0x98 0x8 */ | |
| unsigned int size; /* 0xa0 0x4 */ | |
| unsigned int async_size; /* 0xa4 0x4 */ | |
| unsigned int ra_pages; /* 0xa8 0x4 */ | |
| unsigned int mmap_miss; /* 0xac 0x4 */ | |
| /* typedef loff_t -> __kernel_loff_t */ long long int prev_pos; /* 0xb0 0x8 */ | |
| } f_ra; /* 0x98 0x20 */ | |
| /* typedef u64 -> __u64 */ long long unsigned int f_version; /* 0xb8 0x8 */ | |
| /* --- cacheline 3 boundary (192 bytes) --- */ | |
| void * f_security; /* 0xc0 0x8 */ | |
| void * private_data; /* 0xc8 0x8 */ | |
| struct list_head { | |
| struct list_head * next; /* 0xd0 0x8 */ | |
| struct list_head * prev; /* 0xd8 0x8 */ | |
| } f_ep_links; /* 0xd0 0x10 */ | |
| struct list_head { | |
| struct list_head * next; /* 0xe0 0x8 */ | |
| struct list_head * prev; /* 0xe8 0x8 */ | |
| } f_tfile_llink; /* 0xe0 0x10 */ | |
| struct address_space * f_mapping; /* 0xf0 0x8 */ | |
| /* typedef errseq_t -> u32 -> __u32 */ unsigned int f_wb_err; /* 0xf8 0x4 */ | |
| /* size: 256, cachelines: 4, members: 21 */ | |
| /* padding: 4 */ | |
| }; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment