All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nick Desaulniers <ndesaulniers@google.com>
To: Mauro Rossi <issor.oruam@gmail.com>
Cc: Arnd Bergmann <arnd@arndb.de>,
	Chih-Wei Huang <cwhuang@android-x86.org>,
	 clang-built-linux <llvm@lists.linux.dev>
Subject: Re: Android 11 clang toochain: kernel 5.18 build error with 32 bit target
Date: Mon, 25 Apr 2022 11:04:35 -0700	[thread overview]
Message-ID: <CAKwvOdmfHS8UwZhEL-tLMJSzCXQEZZZhEMpDXuJHtP5s9yePBw@mail.gmail.com> (raw)
In-Reply-To: <CAK8P3a0Lwtm86wYH+0yFtr=Luc6g3OLu_+vzZaJqxDxNHFmQDQ@mail.gmail.com>

On Mon, Apr 25, 2022 at 8:06 AM Arnd Bergmann <arnd@arndb.de> wrote:
>
> On Mon, Apr 25, 2022 at 3:27 PM Mauro Rossi <issor.oruam@gmail.com> wrote:
> >
> > Hello,
> >
> > while performing my periodic testing of android-x86 build with kernel rc cycle,
> > I found the following building error which seems caused by commit
> > 34737e2698 ("uaccess: add generic __{get,put}_kernel_nofault")
> >
> > Please provide and merge a fix while we're still in kernel 5.18 rc cycle
> >
> > I am available if you need testing of the fix
>
>
> Hi Mauro,
>
> > [x86 32bit target build error with shipped prebuilt toolchain clang 11.0.2]
>
> Thanks for the report! I'm fairly sure that others have tested this path
> with clang-11 on x86-32, so I wonder what is different on your machine.
>
> Is this a clang-11 from your distro (which one?) or from Android?
>
> > /home/utente/r-x86_kernel/kernel/mm/maccess.c:35:3: error: invalid
> > output size for constraint '=a'
> >                 copy_from_kernel_nofault_loop(dst, src, size, u64, Efault);
> >                 ^
> > /home/utente/r-x86_kernel/kernel/mm/maccess.c:17:3: note: expanded
> > from macro 'copy_from_kernel_nofault_loop'
> >                 __get_kernel_nofault(dst, src, type, err_label);
> >          \
> >                 ^
> > /home/utente/r-x86_kernel/kernel/arch/x86/include/asm/uaccess.h:509:18:
> > note: expanded from macro '__get_kernel_nofault'
> >         __get_user_size(*((type *)(dst)), (__force type __user *)(src), \
> >                         ^
> > /home/utente/r-x86_kernel/kernel/mm/maccess.c:35:3: error: invalid
> > output size for constraint '=a'
> > /home/utente/r-x86_kernel/kernel/mm/maccess.c:17:3: note: expanded
> > from macro 'copy_from_kernel_nofault_loop'
> >                 __get_kernel_nofault(dst, src, type, err_label);
> >          \
> >                 ^
> > /home/utente/r-x86_kernel/kernel/arch/x86/include/asm/uaccess.h:509:18:
> > note: expanded from macro '__get_kernel_nofault'
> >         __get_user_size(*((type *)(dst)), (__force type __user *)(src), \
> >                         ^
> > 2 errors generated.

(Plus llvm@ , Christoph and Geert to bcc)

Hi Mauro,
Thanks for testing and for the report. This is vaguely reminiscent of
some i386 assembler issue we fixed back in the kernel in the 5.9
release.
https://github.com/ClangBuiltLinux/linux/issues/194
So definitely surprising to see something similar in mainline; perhaps
config related, or something should be a feature check rather than a
version check.

To start with, do you mind sharing your .config file? If I can repro
with ToT LLVM, then this may be an issue to fix given such a .config.

Otherwise, I'll need to see what's different between upsteam llvm's
release/11.x branch, and that release of AOSP clang.

Orthogonally, I think the latest release of AOSP clang is 14.0.5. Any
reason you're still using 11.0.2?  I expect to drop support for 11
next.

>
> arch/x86/include/asm/uaccess.h:509 indicates that
> CONFIG_CC_HAS_ASM_GOTO_OUTPUT is not set, but I expected
> this to be available with clang-11 or higher. Can you confirm that this is
> disabled in your .config?
>
> Adding Nick to Cc, as he worked on that feature.
>
>        Arnd



-- 
Thanks,
~Nick Desaulniers

       reply	other threads:[~2022-04-25 18:04 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CAEQFVGb2aXVu7eys5PM=xZ7gtzdap_QyRrzi3WzY83ka=heOwQ@mail.gmail.com>
     [not found] ` <CAK8P3a0Lwtm86wYH+0yFtr=Luc6g3OLu_+vzZaJqxDxNHFmQDQ@mail.gmail.com>
2022-04-25 18:04   ` Nick Desaulniers [this message]
2022-04-25 19:13     ` Android 11 clang toochain: kernel 5.18 build error with 32 bit target Mauro Rossi
2022-04-26 12:21       ` Arnd Bergmann
2022-04-26 18:24         ` Nathan Chancellor
2022-04-26 19:23           ` Nick Desaulniers
2022-04-26 19:31             ` Nick Desaulniers
2022-04-26 19:46               ` Nick Desaulniers
2022-04-26 20:16       ` Mauro Rossi
2022-04-26 22:23         ` Mauro Rossi
2022-04-28 22:28           ` Mauro Rossi
2022-05-01 18:40             ` Mauro Rossi
2022-05-12  0:36               ` Nick Desaulniers

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=CAKwvOdmfHS8UwZhEL-tLMJSzCXQEZZZhEMpDXuJHtP5s9yePBw@mail.gmail.com \
    --to=ndesaulniers@google.com \
    --cc=arnd@arndb.de \
    --cc=cwhuang@android-x86.org \
    --cc=issor.oruam@gmail.com \
    --cc=llvm@lists.linux.dev \
    /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.