LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Sedat Dilek <sedat.dilek@gmail.com>
To: Dmitry Vyukov <dvyukov@google.com>
Cc: Matthias Kaehlcke <mka@chromium.org>,
	lkml <linux-kernel@vger.kernel.org>,
	Arnd Bergmann <arnd@arndb.de>,
	Nick Desaulniers <nick.desaulniers@gmail.com>
Subject: Re: Clang patch stacks for LTS kernels (v4.4 and v4.9) and status update
Date: Sun, 6 May 2018 09:58:04 +0200	[thread overview]
Message-ID: <CA+icZUWxSNC+KVgzXziDnHTXmqsCSo45Ya7GN=kjtweFGPEbuQ@mail.gmail.com> (raw)
In-Reply-To: <CACT4Y+b4caLPQ7rD3390ep3eGV5j+04upKjLmC7Ky5e1NYrzXA@mail.gmail.com>

On Sun, May 6, 2018 at 9:41 AM, Dmitry Vyukov <dvyukov@google.com> wrote:
> On Sun, May 6, 2018 at 8:35 AM, Sedat Dilek <sedat.dilek@gmail.com> wrote:
>> On Mon, Apr 23, 2018 at 7:42 PM, Matthias Kaehlcke <mka@chromium.org> wrote:
>> [...]
>>>> [ ASM-GOTO ]
>>>>
>>>> Foremore, I have seen you have a "refs/sandbox/mka/llvm/v4.14" Git branch.
>>>> Linux v4.14 is also an LTS release.
>>>
>>> Yes, there is also a follow up post:
>>> https://lkml.org/lkml/2017/11/22/943
>>>
>>>> After Linux v4.9 "asm-goto" support was added which is GCC specific.
>>>
>>> asm-goto was optional until a few weeks ago, when x86 maintainers
>>> decided to make it mandatory, and thus break clang builds for x86:
>>>
>>> https://lkml.org/lkml/2018/4/2/486
>>>
>>>> Is there a workaround to compile Linux-kernel with any CLANG
>>>> version?
>>>
>>> You could revert the patch that makes asm-goto mandatory.
>>>
>>>> You happen to know the status in LLVM upstream?
>>>
>>> I know people are actively working on this, but don't know an ETA.
>>>
>>
>> [ CC Dimitry ]
>>
>> Sorry for the late response.
>> This weekend I had some time to play with clang-7 and Linux-4.17-rcN.
>>
>> I tried with Linux v4.17-rc3-261-gc1c07416cdd4 and reverted the
>> mandatory patch [1].
>>
>> commit e501ce957a786ecd076ea0cfb10b114e6e4d0f40
>> "x86: Force asm-goto"
>>
>> This needed a follow up [2]...
>>
>> commit d0266046ad54e0c964941364cd82a0d0478ce286
>> "x86: Remove FAST_FEATURE_TESTS"
>>
>> ...but breaks my build.
>>
>> That seems to be a known issue [3] and Dimitry bisected this to [4].
>> Is there a fix for this?
>>
>> I have attached my kernel-config and the broken build-log.
>>
>> Hope this helps.
>>
>> Regards,
>> - Sedat -
>>
>> [1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=e501ce957a786ecd076ea0cfb10b114e6e4d0f40
>> [2] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/arch/x86/include/asm/cpufeature.h?id=d0266046ad54e0c964941364cd82a0d0478ce286
>> [3] https://www.spinics.net/lists/linux-mm/msg147669.html
>> [4] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=8bf705d130396e69c04cd8e6e010244ad2ce71f4
>
>
> Hi Sedat,
>
> Sorry for the breakage.
>
> This was reported and discussed here:
> https://groups.google.com/forum/#!topic/kasan-dev/oMgCP37n1vw
> The plan is to make clang behave the same way as gcc wrt asm
> constraint checking. But I don't know what's the progress.

Hi Dimitry,

that's the thread I looked into and also looked into the involved
commits and appropriate files in the linux-source without knowing of
[1].

Just just for the records...
I used the kernel-config of Debian's
linux-image-4.17.0-rc3-amd64-unsigned (4.17~rc3-1~exp1) as a base with
this modification:

$ cd /path/to/linux-source
$ LINUX_CONFIG="./.config"
$ scripts/config --file $LINUX_CONFIG --disable X86_X32

...and...

# CONFIG_KASAN is not set

...if this matters.

Kind regards,
- Sedat -

[1] https://bugs.llvm.org/show_bug.cgi?id=33587
[2] https://packages.debian.org/experimental/linux-image-4.17.0-rc3-amd64-unsigned

  reply	other threads:[~2018-05-06  7:58 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-23 13:56 Sedat Dilek
2018-04-23 17:42 ` Matthias Kaehlcke
2018-04-24 11:54   ` Sedat Dilek
2018-04-24 23:06     ` Matthias Kaehlcke
2018-05-06  7:42       ` Sedat Dilek
2018-05-06  8:16         ` Sedat Dilek
2018-05-07 17:49         ` Matthias Kaehlcke
2018-05-07 19:37           ` Sedat Dilek
2018-05-11 11:52           ` Sedat Dilek
2018-05-18 22:54             ` Nick Desaulniers
2018-05-22  7:11               ` Sedat Dilek
2018-05-22  7:39               ` Sedat Dilek
2018-05-22  8:04                 ` Sedat Dilek
2018-05-22  8:49                   ` Sedat Dilek
2018-05-22 10:16                     ` Sedat Dilek
2018-05-22 12:05                       ` Sedat Dilek
2018-05-22 12:17                         ` Sedat Dilek
2018-05-22 14:55                           ` Sedat Dilek
2018-05-06  6:35   ` Sedat Dilek
2018-05-06  7:41     ` Dmitry Vyukov
2018-05-06  7:58       ` Sedat Dilek [this message]
  -- strict thread matches above, loose matches on Subject: below --
2017-08-22 23:13 Matthias Kaehlcke

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+icZUWxSNC+KVgzXziDnHTXmqsCSo45Ya7GN=kjtweFGPEbuQ@mail.gmail.com' \
    --to=sedat.dilek@gmail.com \
    --cc=arnd@arndb.de \
    --cc=dvyukov@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mka@chromium.org \
    --cc=nick.desaulniers@gmail.com \
    --subject='Re: Clang patch stacks for LTS kernels (v4.4 and v4.9) and status update' \
    /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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).