lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAKwvOd=kqfAZoywsOFbvvzUJD+zVgFgmDAAcb7h0U8LGzfG33A@mail.gmail.com>
Date:   Wed, 13 Jul 2022 09:01:58 -0700
From:   Nick Desaulniers <ndesaulniers@...gle.com>
To:     Nathan Chancellor <nathan@...nel.org>
Cc:     Josh Poimboeuf <jpoimboe@...nel.org>,
        Peter Zijlstra <peterz@...radead.org>,
        linux-kernel@...r.kernel.org, llvm@...ts.linux.dev
Subject: Re: objtool "'naked' return found in RETHUNK build" with clang + CONFIG_K{A,C}SAN=y

On Wed, Jul 13, 2022 at 8:48 AM Nathan Chancellor <nathan@...nel.org> wrote:
>
> Hi Josh and Peter,
>
> After commit 9bb2ec608a20 ("objtool: Update Retpoline validation") and
> commit f43b9876e857 ("x86/retbleed: Add fine grained Kconfig knobs"), I
> see a spew of objtool warnings when building certain configurations with
> clang. Examples below, they appear to trigger in every single file.
>
> With x86_64_defconfig + CONFIG_KASAN=y:
>
> arch/x86/ia32/audit.o: warning: objtool: asan.module_ctor+0x11: 'naked' return found in RETHUNK build
> arch/x86/ia32/audit.o: warning: objtool: asan.module_dtor+0x11: 'naked' return found in RETHUNK build
> init/version.o: warning: objtool: asan.module_ctor+0x11: 'naked' return found in RETHUNK build
> init/version.o: warning: objtool: asan.module_dtor+0x11: 'naked' return found in RETHUNK build
> arch/x86/kernel/cpu/rdrand.o: warning: objtool: asan.module_ctor+0x11: 'naked' return found in RETHUNK build
> arch/x86/kernel/cpu/rdrand.o: warning: objtool: asan.module_dtor+0x11: 'naked' return found in RETHUNK build
> arch/x86/kernel/fpu/bugs.o: warning: objtool: asan.module_ctor+0x11: 'naked' return found in RETHUNK build
> arch/x86/kernel/fpu/bugs.o: warning: objtool: asan.module_dtor+0x11: 'naked' return found in RETHUNK build
> arch/x86/kernel/platform-quirks.o: warning: objtool: asan.module_ctor+0x0: 'naked' return found in RETHUNK build
> init/calibrate.o: warning: objtool: asan.module_ctor+0x11: 'naked' return found in RETHUNK build
> init/calibrate.o: warning: objtool: asan.module_dtor+0x11: 'naked' return found in RETHUNK build
>
> With x86_64_defconfig + CONFIG_KCSAN=y:
>
> arch/x86/ia32/audit.o: warning: objtool: tsan.module_ctor+0x5: 'naked' return found in RETHUNK build
> init/calibrate.o: warning: objtool: tsan.module_ctor+0x5: 'naked' return found in RETHUNK build
> init/version.o: warning: objtool: tsan.module_ctor+0x5: 'naked' return found in RETHUNK build
> arch/x86/kernel/fpu/bugs.o: warning: objtool: tsan.module_ctor+0x5: 'naked' return found in RETHUNK build
> arch/x86/kernel/cpu/rdrand.o: warning: objtool: tsan.module_ctor+0x5: 'naked' return found in RETHUNK build
> arch/x86/events/probe.o: warning: objtool: tsan.module_ctor+0x5: 'naked' return found in RETHUNK build
> arch/x86/kernel/apic/ipi.o: warning: objtool: tsan.module_ctor+0x5: 'naked' return found in RETHUNK build

Thanks for the report. I wonder if this might be a compiler bug; it
seems like the {a|t}san.module_{c|d}tor functions are being emitted
with ret instructions?

If you have one of these builds lying around still, can you provide:

$ llvm-objdump -dr --disassemble-symbols=tsan.module_ctor
arch/x86/kernel/fpu/bugs.o

(I'm about to head into a bunch of meetings now, but can check more
this afternoon; see you at Noon)

If Peter and Josh are bored, feel free to stop by
https://meet.google.com/yjf-jyqk-iaz
at Noon PDT / 19:00 UTV today.

>
> If there is any additional information I can provide or patches I can
> test, I am happy to do so!
>
> Cheers,
> Nathan
>


-- 
Thanks,
~Nick Desaulniers

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ