fixup! bpf: Update logging functions to work with BTF

* Upstream calls bpf_verifier_vlog() directly and calling
  bpf_verifier_log_write() here can sometimes break format args
  and cause kernel panics

Change-Id: I5f7dde9e83b8ef5a2bd1d2739bc08dd2ce69c41d
Signed-off-by: Ruchit <risen@pixelexperience.org>
Tim Zimmermann 12 months ago committed by Ruchit
parent bb22703c76
commit 20bb3d709c
  1. 2
      kernel/bpf/verifier.c
  2. 22
      scripts/module-lto.lds

@ -208,7 +208,7 @@ static __printf(1, 2) void verbose(const char *fmt, ...)
return;
va_start(args, fmt);
bpf_verifier_log_write(&verifier_log, fmt, args);
bpf_verifier_vlog(&verifier_log, fmt, args);
va_end(args);
}

@ -0,0 +1,22 @@
SECTIONS {
/DISCARD/ : {
*(.eh_frame)
}
.bss : {
*(.bss .bss.[0-9a-zA-Z_]*)
*(.bss..L*)
}
.data : {
*(.data .data.[0-9a-zA-Z_]*)
*(.data..L*)
}
.rodata : {
*(.rodata .rodata.[0-9a-zA-Z_]*)
*(.rodata..L*)
}
.text : ALIGN((1 << 12)) {
*(.text.__cfi_check)
*(.text .text.[0-9a-zA-Z_]* .text..L.cfi*)
}
}
Loading…
Cancel
Save