NetBpfLoad: don't print multiline log_buf on user builds

These tend to be huge (because they can contain the full bpf disassembly)
but not very worthwhile, because they often result in logs being rate
limitted, and thus we miss out on the useful information.

This is particularly true for user builds on non-Google devices
installing the production signed tethering apex mainline module.

We're better off seeing more of the other log lines...

Test: TreeHugger
Flag: EXEMPT mainline
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: Ie25a60c2e602772ab0de2050e7964f0202ff2685
This commit is contained in:
Maciej Żenczykowski 2025-07-15 14:57:23 -07:00
commit f125992b27

View file

@ -1284,7 +1284,7 @@ static int loadCodeSections(const char* elfPath, vector<codeSection>& cs, const
if (!fd.ok()) {
// kernel NULL terminates log_buf, so this checks for non-empty string
if (log_buf[0]) {
if (log_buf[0] && !isUser()) {
vector<string> lines = Split(log_buf, "\n");
ALOGW("BPF_PROG_LOAD - BEGIN log_buf contents:");