linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Cooper <Andrew.Cooper3@citrix.com>
To: Joe Damato <jdamato@fastly.com>, "x86@kernel.org" <x86@kernel.org>
Cc: "jpoimboe@redhat.com" <jpoimboe@redhat.com>,
	"peterz@infradead.org" <peterz@infradead.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"jiangshanlai@gmail.com" <jiangshanlai@gmail.com>,
	"bp@suse.de" <bp@suse.de>,
	"brgerst@gmail.com" <brgerst@gmail.com>,
	Andrew Cooper <Andrew.Cooper3@citrix.com>
Subject: Re: 5.19-rc1 x86 build failure
Date: Tue, 7 Jun 2022 12:42:33 +0000	[thread overview]
Message-ID: <74fdda90-f015-5cb9-a2d2-137baf090c59@citrix.com> (raw)
In-Reply-To: <CALALjgwSm07Cnbm6WaK74ZSs4wJ7hs4B3wLOe7h4Y-7sJ5cUWg@mail.gmail.com>

On 07/06/2022 13:19, Joe Damato wrote:
> Greetings:
>
> My apologies if this is the incorrect place to report this, but I got a
> build error when trying to compile the net-next 5.19-rc1 tree.
>
> git bisect says that commit a1e2c031ec394 ("x86/mm: Simplify
> RESERVE_BRK()") is responsible for the build issue I am hitting.
>
> I am performing this build on an x86_64 system with GNU C11 (Ubuntu
> 5.4.0-6ubuntu1~16.04.12) version 5.4.0 20160609 (x86_64-linux-gnu).
>
> The assembler outputs a cryptic error message:
>
> /tmp/ccnGOKZ5.s: Assembler messages:
> /tmp/ccnGOKZ5.s:98: Error: missing ')'
> /tmp/ccnGOKZ5.s:98: Error: missing ')'
> /tmp/ccnGOKZ5.s:98: Error: missing ')'
> /tmp/ccnGOKZ5.s:98: Error: junk at end of line, first unrecognized
> character is `U'
> /tmp/ccnGOKZ5.s:99: Error: missing ')'
> /tmp/ccnGOKZ5.s:99: Error: missing ')'
> /tmp/ccnGOKZ5.s:99: Error: missing ')'
> /tmp/ccnGOKZ5.s:99: Error: junk at end of line, first unrecognized
> character is `U'
>
> I've asked GCC to generate the assembly and output so I can see more
> specifically where this issue is (via "-fverbose-asm -Wa,-adhln=output"):
>
>   96                            .pushsection .brk_reservation,"aw",@nobits
>   97                            .brk.early_pgt_alloc:
>   98 ???? 00000000              .skip ((2 * 3) * ((1UL) << 12))
> ****  Error: missing ')'
> ****  Error: missing ')'
> ****  Error: missing ')'
> ****  Error: junk at end of line, first unrecognized character is `U'
>   98      0000
>  100                            .popsection
>
> This comes from arch/x86/mm/init.c, which has the following code:
>
> RESERVE_BRK(early_pgt_alloc, INIT_PGT_BUF_SIZE);
>
> wherein INIT_PGT_BUF_SIZE (via PAGE_SIZE) has a "1UL" which makes the
> assembler unhappy.
>
> I don't really know what the correct way to fix this is; it seems that the
> macro _AC should handle this if ASSEMBLY is defined, IIUC, but that does
> not seem to be the case at this point in init.c.
>
> Perhaps I am doing something incorrect during the build process causing
> this to happen?

The problem is that _AC() is evaluated in C context (so gains the UL/ULL
suffix), and the C'd string is fed directly into the assembler (where
older binutils doesn't tolerate the suffix).

Short of having a _PAGE_SIZE which is an explicitly non-AC()'d constant,
I'm not sure what to suggest.  Ideally, you'd want to temporarily define
__ASSEMBLY__ around the expansion of __stringify(), but I don't think
that's possible as RESERVE_BRK() is a macro itself.

~Andrew

  reply	other threads:[~2022-06-07 12:43 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-07 12:19 5.19-rc1 x86 build failure Joe Damato
2022-06-07 12:42 ` Andrew Cooper [this message]
2022-06-08  0:59   ` Josh Poimboeuf
2022-06-08  9:10     ` Joe Damato
2022-06-08  9:24     ` Andrew Cooper
2022-06-08 15:00       ` Josh Poimboeuf

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=74fdda90-f015-5cb9-a2d2-137baf090c59@citrix.com \
    --to=andrew.cooper3@citrix.com \
    --cc=bp@suse.de \
    --cc=brgerst@gmail.com \
    --cc=jdamato@fastly.com \
    --cc=jiangshanlai@gmail.com \
    --cc=jpoimboe@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=peterz@infradead.org \
    --cc=x86@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 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).