Building the Linux kernel with Clang and LLVM
 help / color / mirror / Atom feed
* Re: [PATCH 6.1 000/127] 6.1.45-rc1 review
       [not found] <20230809103636.615294317@linuxfoundation.org>
@ 2023-08-11  3:22 ` Naresh Kamboju
  2023-08-11  3:36   ` Nathan Chancellor
  2023-08-11  3:41   ` Guenter Roeck
  0 siblings, 2 replies; 6+ messages in thread
From: Naresh Kamboju @ 2023-08-11  3:22 UTC (permalink / raw)
  To: Greg Kroah-Hartman, clang-built-linux
  Cc: stable, patches, linux-kernel, torvalds, akpm, linux, shuah,
	patches, lkft-triage, pavel, jonathanh, f.fainelli,
	sudipm.mukherjee, srw, rwarsow, conor, Nathan Chancellor,
	Nick Desaulniers, Sven Volkinsfeld, Daniel Kolesa

On Wed, 9 Aug 2023 at 16:21, Greg Kroah-Hartman
<gregkh@linuxfoundation.org> wrote:
>
> This is the start of the stable review cycle for the 6.1.45 release.
> There are 127 patches in this series, all will be posted as a response
> to this one.  If anyone has any issues with these being applied, please
> let me know.
>
> Responses should be made by Fri, 11 Aug 2023 10:36:10 +0000.
> Anything received after that time might be too late.
>
> The whole patch series can be found in one patch at:
>         https://www.kernel.org/pub/linux/kernel/v6.x/stable-review/patch-6.1.45-rc1.gz
> or in the git tree and branch at:
>         git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-6.1.y
> and the diffstat can be found below.
>
> thanks,
>
> greg k-h


While building Linux stable rc 6.1 x86_64 with clang-17 failed due to
following warnings / errors.

Regressions found on x86_64:

  - build/clang-nightly-lkftconfig-kselftest
  - build/clang-nightly-x86_64_defconfig
  - build/clang-nightly-lkftconfig
  - build/clang-lkftconfig
  - build/clang-nightly-allmodconfig


Build errors:
-----
ld.lld: error: ./arch/x86/kernel/vmlinux.lds:193: at least one side of
the expression must be absolute
make[2]: *** [scripts/Makefile.vmlinux:34: vmlinux] Error 1


  Reported-by: Linux Kernel Functional Testing <lkft@linaro.org>

upstream report:
-----
    - https://lore.kernel.org/llvm/CA+G9fYsdUeNu-gwbs0+T6XHi4hYYk=Y9725-wFhZ7gJMspLDRA@mail.gmail.com/

Proposed fix patch:
-----
  [PATCH] x86/srso: fix build breakage for LD=ld.lld
  - https://lore.kernel.org/lkml/20230809-gds-v1-1-eaac90b0cbcc@google.com/T/

This patch is yet to be backported and CC to stable.

  --
Linaro LKFT
https://lkft.linaro.org

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 6.1 000/127] 6.1.45-rc1 review
  2023-08-11  3:22 ` [PATCH 6.1 000/127] 6.1.45-rc1 review Naresh Kamboju
@ 2023-08-11  3:36   ` Nathan Chancellor
  2023-08-11  3:41   ` Guenter Roeck
  1 sibling, 0 replies; 6+ messages in thread
From: Nathan Chancellor @ 2023-08-11  3:36 UTC (permalink / raw)
  To: Naresh Kamboju
  Cc: Greg Kroah-Hartman, clang-built-linux, stable, patches,
	linux-kernel, torvalds, akpm, linux, shuah, patches, lkft-triage,
	pavel, jonathanh, f.fainelli, sudipm.mukherjee, srw, rwarsow,
	conor, Nick Desaulniers, Sven Volkinsfeld, Daniel Kolesa

On Fri, Aug 11, 2023 at 08:52:01AM +0530, Naresh Kamboju wrote:
> Build errors:
> -----
> ld.lld: error: ./arch/x86/kernel/vmlinux.lds:193: at least one side of
> the expression must be absolute
> make[2]: *** [scripts/Makefile.vmlinux:34: vmlinux] Error 1
> 
> 
>   Reported-by: Linux Kernel Functional Testing <lkft@linaro.org>
> 
> upstream report:
> -----
>     - https://lore.kernel.org/llvm/CA+G9fYsdUeNu-gwbs0+T6XHi4hYYk=Y9725-wFhZ7gJMspLDRA@mail.gmail.com/
> 
> Proposed fix patch:
> -----
>   [PATCH] x86/srso: fix build breakage for LD=ld.lld
>   - https://lore.kernel.org/lkml/20230809-gds-v1-1-eaac90b0cbcc@google.com/T/
> 
> This patch is yet to be backported and CC to stable.

It's now in -tip, I would expect it to make -rc6:

https://git.kernel.org/tip/cbe8ded48b939b9d55d2c5589ab56caa7b530709

It should have had 'Cc: stable@vger.kernel.org' but I hope the Fixes:
tag alone will ensure it gets picked up once it hits mainline,
especially since there are other fixes that will come in that pull.

Cheers,
Nathan

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 6.1 000/127] 6.1.45-rc1 review
  2023-08-11  3:22 ` [PATCH 6.1 000/127] 6.1.45-rc1 review Naresh Kamboju
  2023-08-11  3:36   ` Nathan Chancellor
@ 2023-08-11  3:41   ` Guenter Roeck
  2023-08-11  4:13     ` Nathan Chancellor
  1 sibling, 1 reply; 6+ messages in thread
From: Guenter Roeck @ 2023-08-11  3:41 UTC (permalink / raw)
  To: Naresh Kamboju, Greg Kroah-Hartman, clang-built-linux
  Cc: stable, patches, linux-kernel, torvalds, akpm, shuah, patches,
	lkft-triage, pavel, jonathanh, f.fainelli, sudipm.mukherjee, srw,
	rwarsow, conor, Nathan Chancellor, Nick Desaulniers,
	Sven Volkinsfeld, Daniel Kolesa

On 8/10/23 20:22, Naresh Kamboju wrote:
> On Wed, 9 Aug 2023 at 16:21, Greg Kroah-Hartman
> <gregkh@linuxfoundation.org> wrote:
>>
>> This is the start of the stable review cycle for the 6.1.45 release.
>> There are 127 patches in this series, all will be posted as a response
>> to this one.  If anyone has any issues with these being applied, please
>> let me know.
>>
>> Responses should be made by Fri, 11 Aug 2023 10:36:10 +0000.
>> Anything received after that time might be too late.
>>
>> The whole patch series can be found in one patch at:
>>          https://www.kernel.org/pub/linux/kernel/v6.x/stable-review/patch-6.1.45-rc1.gz
>> or in the git tree and branch at:
>>          git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-6.1.y
>> and the diffstat can be found below.
>>
>> thanks,
>>
>> greg k-h
> 
> 
> While building Linux stable rc 6.1 x86_64 with clang-17 failed due to
> following warnings / errors.
> 
> Regressions found on x86_64:
> 
>    - build/clang-nightly-lkftconfig-kselftest
>    - build/clang-nightly-x86_64_defconfig
>    - build/clang-nightly-lkftconfig
>    - build/clang-lkftconfig
>    - build/clang-nightly-allmodconfig
> 
> 
> Build errors:
> -----
> ld.lld: error: ./arch/x86/kernel/vmlinux.lds:193: at least one side of
> the expression must be absolute
> make[2]: *** [scripts/Makefile.vmlinux:34: vmlinux] Error 1
> 

We see that with v5.10.y, v5.15.y, and v6.1.y when building ChromeOS images with
clang/lld. There are additional problems with LTO and the built-in assembler. See
https://www.linuxquestions.org/questions/slackware-14/error-building-kernel-6-1-44-on-current-with-clang-4175727865/
for a summary.

As far as I can see none of those problems has been fixed in the upstream kernel.

Guenter

> 
>    Reported-by: Linux Kernel Functional Testing <lkft@linaro.org>
> 
> upstream report:
> -----
>      - https://lore.kernel.org/llvm/CA+G9fYsdUeNu-gwbs0+T6XHi4hYYk=Y9725-wFhZ7gJMspLDRA@mail.gmail.com/
> 
> Proposed fix patch:
> -----
>    [PATCH] x86/srso: fix build breakage for LD=ld.lld
>    - https://lore.kernel.org/lkml/20230809-gds-v1-1-eaac90b0cbcc@google.com/T/
> 
> This patch is yet to be backported and CC to stable.
> 
>    --
> Linaro LKFT
> https://lkft.linaro.org


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 6.1 000/127] 6.1.45-rc1 review
  2023-08-11  3:41   ` Guenter Roeck
@ 2023-08-11  4:13     ` Nathan Chancellor
  2023-08-13 11:02       ` Borislav Petkov
  0 siblings, 1 reply; 6+ messages in thread
From: Nathan Chancellor @ 2023-08-11  4:13 UTC (permalink / raw)
  To: Guenter Roeck
  Cc: Naresh Kamboju, Greg Kroah-Hartman, clang-built-linux, stable,
	patches, linux-kernel, torvalds, akpm, shuah, patches,
	lkft-triage, pavel, jonathanh, f.fainelli, sudipm.mukherjee, srw,
	rwarsow, conor, Nick Desaulniers, Sven Volkinsfeld, Daniel Kolesa,
	Borislav Petkov, x86

On Thu, Aug 10, 2023 at 08:41:42PM -0700, Guenter Roeck wrote:
> On 8/10/23 20:22, Naresh Kamboju wrote:
> > Build errors:
> > -----
> > ld.lld: error: ./arch/x86/kernel/vmlinux.lds:193: at least one side of
> > the expression must be absolute
> > make[2]: *** [scripts/Makefile.vmlinux:34: vmlinux] Error 1
> > 
> 
> We see that with v5.10.y, v5.15.y, and v6.1.y when building ChromeOS images with
> clang/lld. There are additional problems with LTO and the built-in assembler. See
> https://www.linuxquestions.org/questions/slackware-14/error-building-kernel-6-1-44-on-current-with-clang-4175727865/
> for a summary.

Yup, we have issues open for all of those:

https://github.com/ClangBuiltLinux/linux/issues/1907
https://github.com/ClangBuiltLinux/linux/issues/1909
https://github.com/ClangBuiltLinux/linux/issues/1911

1907 is fixed in -tip and I am sure it will make -rc6 [1].

1909 is fixed with [2] but it is sitting in x86/core (i.e., slated for
next merge window). I am guessing at the time it was picked up, it was
not fixing a noticeable issue, which is obviously not the case now. Nick
reached out to the -tip folks on IRC to inquire about getting that
applied to a branch that is going to Linus soon, as it is more of a
process issue since it has conflicts with SRSO and an separate issue
that was pointed out post-acceptance (which I addressed and pushed to
[3] for testing). I never saw a response there (which is understandable,
it is a busy time...) so looping the -tip folks in now, just to make
sure it does not get lost (apologies if this is noise).

1911 is still being investigated (some additional eyes on it would not
hurt).

[1]: https://git.kernel.org/tip/cbe8ded48b939b9d55d2c5589ab56caa7b530709
[2]: https://git.kernel.org/tip/973ab2d61f33dc85212c486e624af348c4eeb5c9
[3]: https://github.com/ClangBuiltLinux/linux/commit/150c42407f87463c27a2459e06845965291d9973

> As far as I can see none of those problems has been fixed in the upstream kernel.

Indeed, embargos are fun... :)

Cheers,
Nathan

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 6.1 000/127] 6.1.45-rc1 review
  2023-08-11  4:13     ` Nathan Chancellor
@ 2023-08-13 11:02       ` Borislav Petkov
  2023-08-14 16:52         ` Nathan Chancellor
  0 siblings, 1 reply; 6+ messages in thread
From: Borislav Petkov @ 2023-08-13 11:02 UTC (permalink / raw)
  To: Nathan Chancellor
  Cc: Guenter Roeck, Naresh Kamboju, Greg Kroah-Hartman,
	clang-built-linux, stable, patches, linux-kernel, torvalds, akpm,
	shuah, patches, lkft-triage, pavel, jonathanh, f.fainelli,
	sudipm.mukherjee, srw, rwarsow, conor, Nick Desaulniers,
	Sven Volkinsfeld, Daniel Kolesa, x86

On Thu, Aug 10, 2023 at 09:13:39PM -0700, Nathan Chancellor wrote:
> 1911 is still being investigated (some additional eyes on it would not
> hurt).

I'm hoping that we can take this one:

https://lore.kernel.org/r/20230809072200.543939260@infradead.org

which should resolve this issue, right?

-- 
Regards/Gruss,
    Boris.

https://people.kernel.org/tglx/notes-about-netiquette

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 6.1 000/127] 6.1.45-rc1 review
  2023-08-13 11:02       ` Borislav Petkov
@ 2023-08-14 16:52         ` Nathan Chancellor
  0 siblings, 0 replies; 6+ messages in thread
From: Nathan Chancellor @ 2023-08-14 16:52 UTC (permalink / raw)
  To: Borislav Petkov
  Cc: Guenter Roeck, Naresh Kamboju, Greg Kroah-Hartman,
	clang-built-linux, stable, patches, linux-kernel, torvalds, akpm,
	shuah, patches, lkft-triage, pavel, jonathanh, f.fainelli,
	sudipm.mukherjee, srw, rwarsow, conor, Nick Desaulniers,
	Sven Volkinsfeld, Daniel Kolesa, x86

On Sun, Aug 13, 2023 at 01:02:54PM +0200, Borislav Petkov wrote:
> On Thu, Aug 10, 2023 at 09:13:39PM -0700, Nathan Chancellor wrote:
> > 1911 is still being investigated (some additional eyes on it would not
> > hurt).
> 
> I'm hoping that we can take this one:
> 
> https://lore.kernel.org/r/20230809072200.543939260@infradead.org
> 
> which should resolve this issue, right?

Yes, it does, as least for mainline and 6.4. The backport to 6.1 seems
hairy (due to a lack of call depth tracking me thinks). It may be worth
taking Nick's change there for simplicity's sake but I'll let y'all make
that decision.

Cheers,
Nathan

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2023-08-14 16:52 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20230809103636.615294317@linuxfoundation.org>
2023-08-11  3:22 ` [PATCH 6.1 000/127] 6.1.45-rc1 review Naresh Kamboju
2023-08-11  3:36   ` Nathan Chancellor
2023-08-11  3:41   ` Guenter Roeck
2023-08-11  4:13     ` Nathan Chancellor
2023-08-13 11:02       ` Borislav Petkov
2023-08-14 16:52         ` Nathan Chancellor

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox