Add BTI note to fdt_static_dtb.o
- resolves "Branch Target exception" panic on FDT systems with static DTB
- also required by bti_report linker feature
Differential D55636
static dtb: add BTI note Authored by br on Tue, Mar 3, 8:15 PM. Tags None Referenced Files
Subscribers None
Details
Add BTI note to fdt_static_dtb.o
tested on cix cd8160 readelf --notes ../arm64.aarch64/sys/GENERIC/fdt_static_dtb.o
Displaying notes found in: .note.gnu.property
Owner Data size Description
GNU 0x00000010 NT_GNU_PROPERTY_TYPE_0 (property note)
Properties: aarch64 feature: BTI, PAC
Diff Detail
Event TimelineComment Actions How does it fix the Branch Target exception? The kernel doesn't care about the note, it's just there to ensure all source files are built with BTI enabled. Comment Actions I will check, but could something happen with landing pads in the beginning of functions if one of the objects used for linkage has no BTI note? Comment Actions The change is correct. I think it is more likely that rebuilding the kernel with a consistent toolchain is the fix for the BTI exception. Comment Actions Same toolchain (latest), but without this change a few functions don't have landing pad: copyin/copyout and sched_idletd. Comment Actions I see, the issue is the generated ifunc trampolines only have BTI landing pads when the note is in all object files. |