mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Nathan Chancellor <nathan@kernel.org>
To: Masahiro Yamada <masahiroy@kernel.org>
Cc: Richard Weinberger <richard@nod.at>,
	Anton Ivanov <anton.ivanov@cambridgegreys.com>,
	Johannes Berg <johannes@sipsolutions.net>,
	Nick Desaulniers <ndesaulniers@google.com>,
	David Gow <davidgow@google.com>,
	linux-um@lists.infradead.org,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	llvm@lists.linux.dev
Subject: Re: [PATCH] um: Fix filtering '-mno-global-merge'
Date: Sat, 26 Mar 2022 13:00:08 -0700	[thread overview]
Message-ID: <Yj9wyNwZWkilNbJM@dev-arch.thelio-3990X> (raw)
In-Reply-To: <CAK7LNAT8TcDy=iKaWZ7_+MbT84vOVEBzHxJY8Bx54Ju5fur8-w@mail.gmail.com>

On Sat, Mar 26, 2022 at 12:29:55PM +0900, Masahiro Yamada wrote:
> On Wed, Mar 23, 2022 at 2:39 AM Nathan Chancellor <nathan@kernel.org> wrote:
> >
> > When booting a clang compiled UML kernel, the kernel panics when trying
> > to run init:
> >
> >   wait_stub_done : failed to wait for SIGTRAP, pid = 651294, n = 651294, errno = 0, status = 0xb7f
> >   Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b
> >
> > After the commit in Fixes, many flags from KBUILD_CFLAGS do not appear
> > in USER_CFLAGS, likely due to USER_CFLAGS initially being a recursive
> > variable ("VAR =") then being switched to a simple ("VAR :=") variable.
> > For example, diffing arch/x86/um/.ptrace_user.o.cmd shows flags such as
> > '-Os' and '-fno-delete-null-pointer-checks' getting dropped, which both
> > impact code generation.
> >
> > Rework the filtering to use filter-out instead of patsubst, which allows
> > all the patterns that USER_CFLAGS cares about to be excluded in one
> > command and ensures all flags from KBUILD_CFLAGS are transferred over to
> > USER_CFLAGS properly, which resolves the boot issue noted above.
> >
> > Fixes: 6580c5c18fb3 ("um: clang: Strip out -mno-global-merge from USER_CFLAGS")
> > Signed-off-by: Nathan Chancellor <nathan@kernel.org>
> 
> 
> 
> Can we remove -mno-global-merge entirely?
> 
> 
> 61163efae02040f66a95 was a very old commit,
> without enough explanation.
> 
> Shall we remove  -mno-global-merge, and do compile-tests.
> If we are hit by problems for arm/arm64, we can re-add it.

Yes, I think that was the conversation that we had on the commit that
this fixes:

https://lore.kernel.org/r/YiD7R2wRxoWxtVq7@dev-arch.thelio-3990X/

I can test that on my Raspberry Pi 3 and 4 on Monday, although I would
like for this patch to be picked up in the meantime so that it is
possible to test UML on -next with clang. We can remove
-mno-global-merge in a follow up change, if you do not have any
objections?

Cheers,
Nathano

  reply	other threads:[~2022-03-26 20:00 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-22 17:35 Nathan Chancellor
2022-03-22 23:57 ` David Gow
2022-03-26  3:29 ` Masahiro Yamada
2022-03-26 20:00   ` Nathan Chancellor [this message]
2022-04-01 13:10     ` Masahiro Yamada

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=Yj9wyNwZWkilNbJM@dev-arch.thelio-3990X \
    --to=nathan@kernel.org \
    --cc=anton.ivanov@cambridgegreys.com \
    --cc=davidgow@google.com \
    --cc=johannes@sipsolutions.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-um@lists.infradead.org \
    --cc=llvm@lists.linux.dev \
    --cc=masahiroy@kernel.org \
    --cc=ndesaulniers@google.com \
    --cc=richard@nod.at \
    /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

all inboxes | Powered by JetHome®