lkml.org 
[lkml]   [2015]   [Sep]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [llvmlinux] percpu | bitmap issue? (Cannot boot on bare metal due to a kernel NULL pointer dereference)
From
On Wed, Sep 9, 2015 at 2:54 PM, Peter Zijlstra <peterz@infradead.org> wrote:
> On Wed, Sep 09, 2015 at 12:05:50PM +0200, Sedat Dilek wrote:
>> I can boot into a CLANG v3.7 compiled Linux-kernel when lib/bitmap is
>> compiled with GCC (here: v4.9).
>>
>> CONFIG_OPTIMIZE_INLINING has no effect on this.
>>
>> Attached are the single llvmlinux patch for AMD64 (x86_64), my
>> kernel-config and 2 objdumps with bitmap.o file alltogether.
>
> I suggest you go tell the LLVM people their compiler is broken.

It looks like an inline-optimization bug in CLANG when the compiler's
optimization-level is higher than -O2.

Level -O0 and -O1 are OK - I can boot in such Linux-kernel v4.2.

With Level -Oz when CONFIG_CC_OPTIMIZE_FOR_SIZE=y (equivalent to GCC's
-Os) the objdump looked sane but I cannot boot on bare metal.
Re-compiling lib/bitmap with -O0 or -O1 is fine again.

- Sedat -

[1] http://lists.linuxfoundation.org/pipermail/llvmlinux/2015-September/001355.html


\
 
 \ /
  Last update: 2015-09-12 23:41    [W:0.054 / U:37.624 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site