Commit 534bbffa authored by Neill Kapron's avatar Neill Kapron Committed by Greg Kroah-Hartman
Browse files

ANDROID: bpf: do not fail to load if log is full



Upstream commit 973c7a0d ("bpf: fix precision backtracking
instruction iteration") slightly changes the logic in the verifier which
results in the verifier log growing. This results in the log being too
small when loading the filterPowerSupplyEvents BPF program in Android,
and therefore causing the program loading to fail. Because this
program is labeled 'critical', a load failure forces a boot loop.

This BPF program exists on the vendor partition, and therefore we must
maintain the GRF/ treble boundary and modify the kernel logic.

The kernel's bpf log logic is refactored in the 6.4 kernel and
acknowledges the shortcomings of the existing approach which causes the
program load to fail. Instead of backporting the significant changes,
this change simply ignores the fact that the log is full.

For more information see commit 12166409 ("bpf: Switch BPF verifier
log to be a rotating log by default")

Bug: 432207940
Bug: 433641053
Test: verify pixel 6 boots on a 5.10 kernel including commit 973c7a0d
Change-Id: I35c3d2074dd9b39e44bfdbaf66fa56ec917df0a6
Signed-off-by: default avatarNeill Kapron <nkapron@google.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@google.com>
parent 8d1ac3f3
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment