From: Sedat Dilek <sedat.dilek@gmail.com>
To: Mark Rutland <mark.rutland@arm.com>
Cc: Matthias Kaehlcke <mka@chromium.org>,
Dmitry Vyukov <dvyukov@google.com>,
Greg Hackmann <ghackmann@google.com>,
Luis Lozano <llozano@google.com>,
Michael Davidson <md@google.com>,
Nick Desaulniers <ndesaulniers@google.com>,
Paul Lawrence <paullawrence@google.com>,
Sami Tolvanen <samitolvanen@google.com>,
kasan-dev <kasan-dev@googlegroups.com>,
Ingo Molnar <mingo@kernel.org>,
linux-mm@kvack.org, llvmlinux@lists.linuxfoundation.org,
sil2review@lists.osadl.org, Jan Beulich <JBeulich@suse.com>,
Peter Zijlstra <peterz@infradead.org>,
Kees Cook <keescook@chromium.org>,
Colin King <colin.king@canonical.com>
Subject: Re: [llvmlinux] clang fails on linux-next since commit 8bf705d13039
Date: Mon, 30 Jul 2018 11:40:49 +0200 [thread overview]
Message-ID: <CA+icZUUicAr5hBB9oGtuLhygP4pf39YV9hhrg7GpJQUibZu=ig@mail.gmail.com> (raw)
In-Reply-To: <20180730091934.omn2vj6eyh6kaecs@lakrids.cambridge.arm.com>
On Mon, Jul 30, 2018 at 11:19 AM, Mark Rutland <mark.rutland@arm.com> wrote:
> On Mon, Jul 30, 2018 at 11:09:54AM +0200, Sedat Dilek wrote:
>> On Mon, Jul 30, 2018 at 10:21 AM, Mark Rutland <mark.rutland@arm.com> wrote:
>> > On Sun, Jul 29, 2018 at 08:12:00PM +0200, Sedat Dilek wrote:
>> >> I was able to build a Linux v4.18-rc6 with tip.git#locking/core [1] on
>> >> top of it here on Debian/buster AMD64.
>> >>
>> >> The patch of interest is [2]...
>> >>
>> >> df79ed2c0643 locking/atomics: Simplify cmpxchg() instrumentation
>> >>
>> >> ...and some more locking/atomics[/x86] may be interesting.
>> >>
>> >> I had also to apply an asm-goto fix to reduce the number of warnings
>> >> when building with clang-7 (version
>> >> 7.0.0-svn337957-1~exp1+0~20180725200907.1908~1.gbpcccb1b (trunk)).
>
>> >> The kernel does ***not boot*** on bare metal.
>> >
>> > Ok. Does the prior commit boot?
>>
>> I cannot say as I was not able to compile with clang since the commit
>> 8bf705d13039 mentioned here in the subject.
>
>> Kees pointed me to issue #7 "__builtin_constant_p() does not work in
>> deep inline functions" which is the cause for not booting.
>> The issue is known as #7.
>>
>> My qemu-log.txt is attached for details if you want to look at.
>>
>> [1] https://github.com/ClangBuiltLinux/linux/issues/7
>>
>> >> More details see [4] and [5] for the clang-side.
>> >
>> > It's not clear to me how these relate to the patch in question. AFAICT,
>> > those are build-time errors, but you say that the kernel doesn't boot
>> > (which implies it built).
>> >
>> > Are [4,5] relevant to this commit, or to the (unrelated) issue [3]?
>> >
>> > My patch removes the switch, so this doesn't look like the same issue.
>>
>> ClangBuiltLinux issue #3 "clang validates extended assembly
>> constraints of dead code" is the problem on the clang-side.
>> Matthias and Jan commented on the thread [1] if you want to read.
>> You fixed the issue on the kernel-side, so that I could build a Linux
>> v4.18-rc6 with clang-7 (trunk).
>> This is a huge progress - really.
>>
>> [1] https://groups.google.com/forum/#!topic/kasan-dev/oMgCP37n1vw
>>
>> Is this a bit clearer, now?
>
> Yes; I had misunderstood your mail as reporting a regression resulting
> from my patch, rather than an improvement.
>
> IIUC, commit df79ed2c0643 ("locking/atomics: Simplify cmpxchg()
> instrumentation") happens to make the kernel compile with clang, when it
> would not previously (since commit 8bf705d13039).
>
> Given that you seem to understand the remaining issue, I take it that
> there is nothing that I need to do here.
>
> Thanks,
> Mark.
>
What are your plans to have...
4d2b25f630c7 locking/atomics: Instrument cmpxchg_double*()
f9881cc43b11 locking/atomics: Instrument xchg()
df79ed2c0643 locking/atomics: Simplify cmpxchg() instrumentation
00d5551cc4ee locking/atomics/x86: Reduce arch_cmpxchg64*() instrumentation
...for example in Linux 4.18 or 4.17.y?
Thanks,
- Sedat -
next prev parent reply other threads:[~2018-07-30 9:40 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-30 9:09 Sedat Dilek
2018-07-30 9:19 ` Mark Rutland
2018-07-30 9:40 ` Sedat Dilek [this message]
2018-07-30 9:46 ` Mark Rutland
2018-07-30 12:28 ` Sedat Dilek
2018-07-30 12:57 ` Mark Rutland
2018-07-30 16:35 ` Nick Desaulniers
2018-07-30 16:40 ` Sedat Dilek
2018-07-31 7:04 ` Sedat Dilek
2018-07-31 7:35 ` Sedat Dilek
2018-07-31 11:07 ` Sedat Dilek
2018-07-31 7:24 ` Sedat Dilek
-- strict thread matches above, loose matches on Subject: below --
2018-03-17 11:13 Lukas Bulwahn
2018-03-19 6:43 ` Dmitry Vyukov
2018-03-19 17:29 ` Matthias Kaehlcke
[not found] ` <99fbbbe3-df05-446b-9ce0-55787ea038f3@googlegroups.com>
2018-05-06 10:44 ` Dmitry Vyukov
2018-05-06 10:48 ` Sedat Dilek
2018-05-07 7:34 ` Dmitry Vyukov
2018-05-28 16:05 ` [llvmlinux] " Sedat Dilek
2018-05-29 6:49 ` Jan Beulich
2018-06-01 13:14 ` Sedat Dilek
2018-07-29 18:12 ` Sedat Dilek
2018-07-30 8:21 ` Mark Rutland
2018-07-30 9:29 ` Sedat Dilek
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CA+icZUUicAr5hBB9oGtuLhygP4pf39YV9hhrg7GpJQUibZu=ig@mail.gmail.com' \
--to=sedat.dilek@gmail.com \
--cc=JBeulich@suse.com \
--cc=colin.king@canonical.com \
--cc=dvyukov@google.com \
--cc=ghackmann@google.com \
--cc=kasan-dev@googlegroups.com \
--cc=keescook@chromium.org \
--cc=linux-mm@kvack.org \
--cc=llozano@google.com \
--cc=llvmlinux@lists.linuxfoundation.org \
--cc=mark.rutland@arm.com \
--cc=md@google.com \
--cc=mingo@kernel.org \
--cc=mka@chromium.org \
--cc=ndesaulniers@google.com \
--cc=paullawrence@google.com \
--cc=peterz@infradead.org \
--cc=samitolvanen@google.com \
--cc=sil2review@lists.osadl.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox