[llvm-bugs] [Bug 52390] clang -O2 BPF netd.o failed to boot on some Android devices

via llvm-bugs llvm-bugs at lists.llvm.org
Mon Nov 15 17:10:09 PST 2021


https://bugs.llvm.org/show_bug.cgi?id=52390

Chih-Hung Hsieh <chh at google.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |WONTFIX
             Status|NEW                         |RESOLVED

--- Comment #13 from Chih-Hung Hsieh <chh at google.com> ---
Yonghong,

Thanks for looking into the llvm code.

The root failure was found to be in older Android BPF verifier,
which does not track value ranges of variables on the stack.
New llvm output code now returns one variable in netd.c
directly from stack. The BPF verifier cannot be certain
that the return value is always 0 or 1, and aborted the
normal boot process.

Since we need to load new netd.o to existing Adroid devices,
so the solution now is to modify netd.c and make sure
that the return value is always 0 or 1.
There is no need to change clang/llvm for now.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20211116/e76e9830/attachment.html>


More information about the llvm-bugs mailing list