mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-26 12:43:36 +01:00
b2cd040e05
Lorenz Bauer reported an issue in bpf mailing list ([1]) where for FIELD_EXISTS relocation, if the object is an array subscript, the patched immediate is the object offset from the base address, instead of 1. Currently in BPF AbstractMemberAccess pass, the final offset from the base address is the patched offset except FIELD_EXISTS which is 1 unconditionally. In this particular case, the last data structure access is not a field (struct/union offset) so it didn't hit the place to set patched immediate to be 1. This patch fixed the issue by checking the relocation type. If the type is FIELD_EXISTS, just set to 1. Tested by modifying some bpf selftests, libbpf is okay with such types with FIELD_EXISTS relocation. [1] https://lore.kernel.org/bpf/CACAyw99n-cMEtVst7aK-3BfHb99GMEChmRLCvhrjsRpHhPrtvA@mail.gmail.com/ Differential Revision: https://reviews.llvm.org/D102036 |
||
---|---|---|
.. | ||
AsmParser | ||
Disassembler | ||
MCTargetDesc | ||
TargetInfo | ||
BPF.h | ||
BPF.td | ||
BPFAbstractMemberAccess.cpp | ||
BPFAdjustOpt.cpp | ||
BPFAsmPrinter.cpp | ||
BPFCallingConv.td | ||
BPFCheckAndAdjustIR.cpp | ||
BPFCORE.h | ||
BPFFrameLowering.cpp | ||
BPFFrameLowering.h | ||
BPFInstrFormats.td | ||
BPFInstrInfo.cpp | ||
BPFInstrInfo.h | ||
BPFInstrInfo.td | ||
BPFISelDAGToDAG.cpp | ||
BPFISelLowering.cpp | ||
BPFISelLowering.h | ||
BPFMCInstLower.cpp | ||
BPFMCInstLower.h | ||
BPFMIChecking.cpp | ||
BPFMIPeephole.cpp | ||
BPFMISimplifyPatchable.cpp | ||
BPFPreserveDIType.cpp | ||
BPFRegisterInfo.cpp | ||
BPFRegisterInfo.h | ||
BPFRegisterInfo.td | ||
BPFSelectionDAGInfo.cpp | ||
BPFSelectionDAGInfo.h | ||
BPFSubtarget.cpp | ||
BPFSubtarget.h | ||
BPFTargetMachine.cpp | ||
BPFTargetMachine.h | ||
BPFTargetTransformInfo.h | ||
BTF.def | ||
BTF.h | ||
BTFDebug.cpp | ||
BTFDebug.h | ||
CMakeLists.txt |