public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: Nick Terrell <terrelln@fb.com>
To: Helge Deller <deller@gmx.de>
Cc: "Geert Uytterhoeven" <geert@linux-m68k.org>,
	"Linux Kernel Mailing List" <linux-kernel@vger.kernel.org>,
	"Rob Clark" <robdclark@gmail.com>,
	"James E.J. Bottomley" <James.Bottomley@hansenpartnership.com>,
	"Anton Altaparmakov" <anton@tuxera.com>,
	"Thomas Bogendoerfer" <tsbogend@alpha.franken.de>,
	"Sergio Paracuellos" <sergio.paracuellos@gmail.com>,
	"Herbert Xu" <herbert@gondor.apana.org.au>,
	"Joey Gouly" <joey.gouly@arm.com>,
	"Stan Skowronek" <stan@corellium.com>,
	"Hector Martin" <marcan@marcan.st>,
	"Andrey Ryabinin" <ryabinin.a.a@gmail.com>,
	"André Almeida" <andrealmeid@collabora.com>,
	"Peter Zijlstra" <peterz@infradead.org>,
	"Linux ARM" <linux-arm-kernel@lists.infradead.org>,
	"open list:GPIO SUBSYSTEM" <linux-gpio@vger.kernel.org>,
	"Parisc List" <linux-parisc@vger.kernel.org>,
	linux-arm-msm <linux-arm-msm@vger.kernel.org>,
	"DRI Development" <dri-devel@lists.freedesktop.org>,
	"linux-ntfs-dev@lists.sourceforge.net"
	<linux-ntfs-dev@lists.sourceforge.net>,
	linuxppc-dev <linuxppc-dev@lists.ozlabs.org>,
	"open list:BROADCOM NVRAM DRIVER" <linux-mips@vger.kernel.org>,
	linux-pci <linux-pci@vger.kernel.org>,
	"Linux Crypto Mailing List" <linux-crypto@vger.kernel.org>,
	kasan-dev <kasan-dev@googlegroups.com>
Subject: Re: Build regressions/improvements in v5.16-rc1
Date: Tue, 16 Nov 2021 21:27:43 +0000	[thread overview]
Message-ID: <241006B3-699F-44FD-AF85-0133971BCD85@fb.com> (raw)
In-Reply-To: <587BB1D2-A46B-4E93-A3EA-91325288CD6A@fb.com>



> On Nov 16, 2021, at 1:08 PM, Nick Terrell <terrelln@fb.com> wrote:
> 
> 
> 
>> On Nov 15, 2021, at 8:44 AM, Helge Deller <deller@gmx.de> wrote:
>> 
>> On 11/15/21 17:12, Geert Uytterhoeven wrote:
>>> On Mon, Nov 15, 2021 at 4:54 PM Geert Uytterhoeven <geert@linux-m68k.org> wrote:
>>>> Below is the list of build error/warning regressions/improvements in
>>>> v5.16-rc1[1] compared to v5.15[2].
>>>> 
>>>> Summarized:
>>>> - build errors: +20/-13
>>>> - build warnings: +3/-28
>>>> 
>>>> Happy fixing! ;-)
>>>> 
>>>> Thanks to the linux-next team for providing the build service.
>>>> 
>>>> [1] http://kisskb.ellerman.id.au/kisskb/branch/linus/head/fa55b7dcdc43c1aa1ba12bca9d2dd4318c2a0dbf/  (all 90 configs)
>>>> [2] http://kisskb.ellerman.id.au/kisskb/branch/linus/head/8bb7eca972ad531c9b149c0a51ab43a417385813/  (all 90 configs)
>>>> 
>>>> 
>>>> *** ERRORS ***
>>>> 
>>>> 20 error regressions:
>>>> + /kisskb/src/arch/parisc/include/asm/jump_label.h: error: expected ':' before '__stringify':  => 33:4, 18:4
>>>> + /kisskb/src/arch/parisc/include/asm/jump_label.h: error: label 'l_yes' defined but not used [-Werror=unused-label]:  => 38:1, 23:1
>>> 
>>>   due to static_branch_likely() in crypto/api.c
>>> 
>>> parisc-allmodconfig
>> 
>> fixed now in the parisc for-next git tree.
>> 
>> 
>>>> + /kisskb/src/drivers/gpu/drm/msm/msm_drv.h: error: "COND" redefined [-Werror]:  => 531
>>>> + /kisskb/src/lib/zstd/compress/zstd_double_fast.c: error: the frame size of 3252 bytes is larger than 1536 bytes [-Werror=frame-larger-than=]:  => 47:1
>>>> + /kisskb/src/lib/zstd/compress/zstd_double_fast.c: error: the frame size of 3360 bytes is larger than 1536 bytes [-Werror=frame-larger-than=]:  => 499:1
>>>> + /kisskb/src/lib/zstd/compress/zstd_double_fast.c: error: the frame size of 5344 bytes is larger than 1536 bytes [-Werror=frame-larger-than=]:  => 334:1
>>>> + /kisskb/src/lib/zstd/compress/zstd_double_fast.c: error: the frame size of 5380 bytes is larger than 1536 bytes [-Werror=frame-larger-than=]:  => 354:1
>>>> + /kisskb/src/lib/zstd/compress/zstd_fast.c: error: the frame size of 1824 bytes is larger than 1536 bytes [-Werror=frame-larger-than=]:  => 372:1
>>>> + /kisskb/src/lib/zstd/compress/zstd_fast.c: error: the frame size of 2224 bytes is larger than 1536 bytes [-Werror=frame-larger-than=]:  => 204:1
>>>> + /kisskb/src/lib/zstd/compress/zstd_fast.c: error: the frame size of 3800 bytes is larger than 1536 bytes [-Werror=frame-larger-than=]:  => 476:1
>>> 
>>> parisc-allmodconfig
>> 
>> parisc needs much bigger frame sizes, so I'm not astonished here.
>> During the v5.15 cycl I increased it to 1536 (from 1280), so I'm simply tempted to
>> increase it this time to 4096, unless someone has a better idea....
> 
> I am working on a patch set to reduce the frame allocations some, but it doesn’t
> get every function below 1536 on parisc with UBSAN. But, in addition to parisc
> needing bigger frame sizes, it seems the gcc-8-hppa-linux-gnu compiler is doing a
> horrendously bad job, especially with -fsanitize=shift enabled.
> 
> As an example, one of the functions warned ZSTD_fillDoubleHashTable() [0] takes
> 3252 bytes of stack with -fsanitize=shift enabled (as shown in the first warning on line
> 47 above). It is a trivial function, and there is no reason it should take any more than
> a few bytes of stack allocation. On x86-64 it takes 48 bytes with -fsanitize=shift. On
> gcc-10-hppa-linux-gnu this function only takes 380 bytes of stack space with
> -fsanitize=shift. So it seems like whatever issue is present in gcc-8 they fixed in gcc-10.
> 
> On gcc-10-hppa-linux-gnu, after my patch set, I don’t see any -Wframe-larger-than=1536
> errors. So, you could either increase it to 4096 bytes, or switch to gcc-10 for the parisc
> test.
> 
> I’ll reply in more detail later today when I put up my patch set to reduce the stack usage.

Zstd has been compiled with -O3 since before this update, and I’ve left it in. However, if
I remove -O3 (which reverts to the default of -O2), the stack space reductions disappear
on parisc. So it seems like gcc-hppa-linux-gnu doesn’t handle -O3 well.

I’ve done some preliminary performance measurements, and -O3 doesn’t seem to be
necessary good performance anymore. So I should be able to remove it. I’ll measure a
bit more carefully, then put a patch up.

> Best,
> Nick Terrell
> 
> [0] https://github.com/torvalds/linux/blob/8ab774587903771821b59471cc723bba6d893942/lib/zstd/compress/zstd_double_fast.c#L15-L47
> 
>>>> + /kisskb/src/fs/ntfs/aops.c: error: the frame size of 2240 bytes is larger than 2048 bytes [-Werror=frame-larger-than=]:  => 1311:1
>>>> + /kisskb/src/fs/ntfs/aops.c: error: the frame size of 2304 bytes is larger than 2048 bytes [-Werror=frame-larger-than=]:  => 1311:1
>>>> + /kisskb/src/fs/ntfs/aops.c: error: the frame size of 2320 bytes is larger than 2048 bytes [-Werror=frame-larger-than=]:  => 1311:1
>>> 
>>> powerpc-allmodconfig
>>> 
>>>> + /kisskb/src/include/linux/compiler_types.h: error: call to '__compiletime_assert_366' declared with attribute error: FIELD_PREP: value too large for the field:  => 335:38
>>> 
>>>   in drivers/pinctrl/pinctrl-apple-gpio.c
>>> 
>>> arm64-allmodconfig (gcc8)
>>> 
>>>> + /kisskb/src/include/linux/fortify-string.h: error: call to '__read_overflow' declared with attribute error: detected read beyond size of object (1st parameter):  => 263:25, 277:17
>>> 
>>>   in lib/test_kasan.c
>>> 
>>> s390-all{mod,yes}config
>>> arm64-allmodconfig (gcc11)
>>> 
>>>> + error: modpost: "mips_cm_is64" [drivers/pci/controller/pcie-mt7621.ko] undefined!:  => N/A
>>>> + error: modpost: "mips_cm_lock_other" [drivers/pci/controller/pcie-mt7621.ko] undefined!:  => N/A
>>>> + error: modpost: "mips_cm_unlock_other" [drivers/pci/controller/pcie-mt7621.ko] undefined!:  => N/A
>>>> + error: modpost: "mips_cpc_base" [drivers/pci/controller/pcie-mt7621.ko] undefined!:  => N/A
>>>> + error: modpost: "mips_gcr_base" [drivers/pci/controller/pcie-mt7621.ko] undefined!:  => N/A
>>> 
>>> mips-allmodconfig
>>> 
>>>> 3 warning regressions:
>>>> + <stdin>: warning: #warning syscall futex_waitv not implemented [-Wcpp]:  => 1559:2
>>> 
>>> powerpc, m68k, mips, s390, parisc (and probably more)
>> 
>> Will someone update all of them at once?
>> 
>> 
>> 
>> 
>> Helge
>> 
>> 
>>>> + arch/m68k/configs/multi_defconfig: warning: symbol value 'm' invalid for MCTP:  => 322
>>>> + arch/m68k/configs/sun3_defconfig: warning: symbol value 'm' invalid for MCTP:  => 295
>>> 
>>> Yeah, that happens when symbols are changed from tristate to bool...
>>> Will be fixed in 5.17-rc1, with the next defconfig refresh.
>>> 
>>> Gr{oetje,eeting}s,
>>> 
>>>                       Geert
>>> 
>>> --
>>> Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
>>> 
>>> In personal conversations with technical people, I call myself a hacker. But
>>> when I'm talking to journalists I just say "programmer" or something like that.
>>>                               -- Linus Torvalds

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

  reply	other threads:[~2021-11-16 21:30 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20211115155105.3797527-1-geert@linux-m68k.org>
2021-11-15 16:12 ` Build regressions/improvements in v5.16-rc1 Geert Uytterhoeven
2021-11-15 16:44   ` Marco Elver
2021-11-16  0:31     ` Kees Cook
2021-11-16  0:35     ` Kees Cook
2021-11-15 16:44   ` Helge Deller
2021-11-16 21:08     ` Nick Terrell
2021-11-16 21:27       ` Nick Terrell [this message]
2021-11-17  1:59     ` Nick Terrell
2021-11-17  2:05       ` Randy Dunlap
2021-11-17  2:19         ` Nick Terrell
2021-11-17  8:24           ` Geert Uytterhoeven
2021-11-17 11:22           ` Helge Deller
2021-11-17 19:39             ` Nick Terrell
2021-11-16  9:15   ` Thomas Bogendoerfer

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=241006B3-699F-44FD-AF85-0133971BCD85@fb.com \
    --to=terrelln@fb.com \
    --cc=James.Bottomley@hansenpartnership.com \
    --cc=andrealmeid@collabora.com \
    --cc=anton@tuxera.com \
    --cc=deller@gmx.de \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=geert@linux-m68k.org \
    --cc=herbert@gondor.apana.org.au \
    --cc=joey.gouly@arm.com \
    --cc=kasan-dev@googlegroups.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@vger.kernel.org \
    --cc=linux-ntfs-dev@lists.sourceforge.net \
    --cc=linux-parisc@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=marcan@marcan.st \
    --cc=peterz@infradead.org \
    --cc=robdclark@gmail.com \
    --cc=ryabinin.a.a@gmail.com \
    --cc=sergio.paracuellos@gmail.com \
    --cc=stan@corellium.com \
    --cc=tsbogend@alpha.franken.de \
    /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