Loading
selftests/bpf: Fix tests after fields reorder in struct file
The change in struct file [1] moved f_ref to the 3rd cache line. It made *(u64 *)file dereference invalid from the verifier point of view, because btf_struct_walk() walks into f_lock field, which is 4-byte long. Fix the selftests to deference the file pointer as a 4-byte access. [1] commit e249056c ("fs: place f_ref to 3rd cache line in struct file to resolve false sharing") Reported-by:Jakub Kicinski <kuba@kernel.org> Signed-off-by:
Song Liu <song@kernel.org> Link: https://lore.kernel.org/r/20250327185528.1740787-1-song@kernel.org Signed-off-by:
Alexei Starovoitov <ast@kernel.org>