All of lore.kernel.org
 help / color / mirror / Atom feed
From: Catalin Marinas <catalin.marinas@arm.com>
To: Sami Tolvanen <samitolvanen@google.com>
Cc: Nathan Chancellor <nathan@kernel.org>,
	Will Deacon <will@kernel.org>,
	Nick Desaulniers <ndesaulniers@google.com>,
	Jian Cai <jiancai@google.com>,
	linux-arm-kernel <linux-arm-kernel@lists.infradead.org>,
	LKML <linux-kernel@vger.kernel.org>,
	clang-built-linux <clang-built-linux@googlegroups.com>,
	"# 3.4.x" <stable@vger.kernel.org>
Subject: Re: [PATCH] arm64: alternatives: Move length validation in alternative_{insn,endif}
Date: Thu, 15 Apr 2021 17:57:48 +0100	[thread overview]
Message-ID: <20210415165748.GG1015@arm.com> (raw)
In-Reply-To: <CABCJKufDUgPSRQi1ZQRk=upNtziKDJ8rTBHgq2oQpPWS=utrvg@mail.gmail.com>

On Thu, Apr 15, 2021 at 08:50:25AM -0700, Sami Tolvanen wrote:
> On Thu, Apr 15, 2021 at 7:02 AM Catalin Marinas <catalin.marinas@arm.com> wrote:
> >
> > On Thu, Apr 15, 2021 at 06:25:57AM -0700, Nathan Chancellor wrote:
> > > On Thu, Apr 15, 2021 at 10:17:43AM +0100, Catalin Marinas wrote:
> > > > On Tue, Apr 13, 2021 at 05:08:04PM -0700, Nathan Chancellor wrote:
> > > > > After commit 2decad92f473 ("arm64: mte: Ensure TIF_MTE_ASYNC_FAULT is
> > > > > set atomically"), LLVM's integrated assembler fails to build entry.S:
> > > > >
> > > > > <instantiation>:5:7: error: expected assembly-time absolute expression
> > > > >  .org . - (664b-663b) + (662b-661b)
> > > > >       ^
> > > > > <instantiation>:6:7: error: expected assembly-time absolute expression
> > > > >  .org . - (662b-661b) + (664b-663b)
> > > > >       ^
> > > >
> > > > I tried the latest Linus' tree and linux-next (defconfig) with this
> > > > commit in and I can't get your build error. I used both clang-10 from
> > > > Debian stable and clang-11 from Debian sid. So, which clang version did
> > > > you use or which kernel config options?
> > >
> > > Interesting, this reproduces for me with LLVM 12 or newer with just
> > > defconfig.
> >
> > It fails for me as well with clang-12. Do you happen to know why it
> > works fine with previous clang versions?
> 
> It looks like CONFIG_ARM64_AS_HAS_MTE is not set when we use the
> integrated assembler with LLVM 11, and the code that breaks later
> versions is gated behind CONFIG_ARM64_MTE.

That explains it, thanks.

-- 
Catalin

WARNING: multiple messages have this Message-ID (diff)
From: Catalin Marinas <catalin.marinas@arm.com>
To: Sami Tolvanen <samitolvanen@google.com>
Cc: Nathan Chancellor <nathan@kernel.org>,
	Will Deacon <will@kernel.org>,
	Nick Desaulniers <ndesaulniers@google.com>,
	Jian Cai <jiancai@google.com>,
	linux-arm-kernel <linux-arm-kernel@lists.infradead.org>,
	LKML <linux-kernel@vger.kernel.org>,
	clang-built-linux <clang-built-linux@googlegroups.com>,
	"# 3.4.x" <stable@vger.kernel.org>
Subject: Re: [PATCH] arm64: alternatives: Move length validation in alternative_{insn,endif}
Date: Thu, 15 Apr 2021 17:57:48 +0100	[thread overview]
Message-ID: <20210415165748.GG1015@arm.com> (raw)
In-Reply-To: <CABCJKufDUgPSRQi1ZQRk=upNtziKDJ8rTBHgq2oQpPWS=utrvg@mail.gmail.com>

On Thu, Apr 15, 2021 at 08:50:25AM -0700, Sami Tolvanen wrote:
> On Thu, Apr 15, 2021 at 7:02 AM Catalin Marinas <catalin.marinas@arm.com> wrote:
> >
> > On Thu, Apr 15, 2021 at 06:25:57AM -0700, Nathan Chancellor wrote:
> > > On Thu, Apr 15, 2021 at 10:17:43AM +0100, Catalin Marinas wrote:
> > > > On Tue, Apr 13, 2021 at 05:08:04PM -0700, Nathan Chancellor wrote:
> > > > > After commit 2decad92f473 ("arm64: mte: Ensure TIF_MTE_ASYNC_FAULT is
> > > > > set atomically"), LLVM's integrated assembler fails to build entry.S:
> > > > >
> > > > > <instantiation>:5:7: error: expected assembly-time absolute expression
> > > > >  .org . - (664b-663b) + (662b-661b)
> > > > >       ^
> > > > > <instantiation>:6:7: error: expected assembly-time absolute expression
> > > > >  .org . - (662b-661b) + (664b-663b)
> > > > >       ^
> > > >
> > > > I tried the latest Linus' tree and linux-next (defconfig) with this
> > > > commit in and I can't get your build error. I used both clang-10 from
> > > > Debian stable and clang-11 from Debian sid. So, which clang version did
> > > > you use or which kernel config options?
> > >
> > > Interesting, this reproduces for me with LLVM 12 or newer with just
> > > defconfig.
> >
> > It fails for me as well with clang-12. Do you happen to know why it
> > works fine with previous clang versions?
> 
> It looks like CONFIG_ARM64_AS_HAS_MTE is not set when we use the
> integrated assembler with LLVM 11, and the code that breaks later
> versions is gated behind CONFIG_ARM64_MTE.

That explains it, thanks.

-- 
Catalin

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2021-04-15 16:57 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-14  0:08 [PATCH] arm64: alternatives: Move length validation in alternative_{insn,endif} Nathan Chancellor
2021-04-14  0:08 ` [PATCH] arm64: alternatives: Move length validation in alternative_{insn, endif} Nathan Chancellor
2021-04-14 17:46 ` [PATCH] arm64: alternatives: Move length validation in alternative_{insn,endif} Sami Tolvanen
2021-04-14 17:46   ` [PATCH] arm64: alternatives: Move length validation in alternative_{insn, endif} Sami Tolvanen
2021-04-14 19:22 ` [PATCH] arm64: alternatives: Move length validation in alternative_{insn,endif} Nick Desaulniers
2021-04-14 19:22   ` [PATCH] arm64: alternatives: Move length validation in alternative_{insn, endif} Nick Desaulniers
2021-04-15  9:17 ` [PATCH] arm64: alternatives: Move length validation in alternative_{insn,endif} Catalin Marinas
2021-04-15  9:17   ` Catalin Marinas
2021-04-15 13:25   ` Nathan Chancellor
2021-04-15 13:25     ` Nathan Chancellor
2021-04-15 14:02     ` Catalin Marinas
2021-04-15 14:02       ` Catalin Marinas
2021-04-15 15:50       ` Sami Tolvanen
2021-04-15 15:50         ` [PATCH] arm64: alternatives: Move length validation in alternative_{insn, endif} Sami Tolvanen
2021-04-15 16:57         ` Catalin Marinas [this message]
2021-04-15 16:57           ` [PATCH] arm64: alternatives: Move length validation in alternative_{insn,endif} Catalin Marinas
2021-04-15 17:48 ` [PATCH] arm64: alternatives: Move length validation in alternative_{insn, endif} Catalin Marinas
2021-04-15 17:48   ` Catalin Marinas

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=20210415165748.GG1015@arm.com \
    --to=catalin.marinas@arm.com \
    --cc=clang-built-linux@googlegroups.com \
    --cc=jiancai@google.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nathan@kernel.org \
    --cc=ndesaulniers@google.com \
    --cc=samitolvanen@google.com \
    --cc=stable@vger.kernel.org \
    --cc=will@kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.