Re: [PATCH 5.19 0000/1157] 5.19.2-rc1 review
From: Naresh Kamboju
Date: Tue Aug 16 2022 - 07:24:37 EST
On Tue, 16 Aug 2022 at 13:57, Greg Kroah-Hartman
<gregkh@xxxxxxxxxxxxxxxxxxx> wrote:
>
> On Tue, Aug 16, 2022 at 01:08:26PM +0530, Naresh Kamboju wrote:
> > On Tue, 16 Aug 2022 at 00:58, Greg Kroah-Hartman
> > <gregkh@xxxxxxxxxxxxxxxxxxx> wrote:
> > >
> > > This is the start of the stable review cycle for the 5.19.2 release.
> > > There are 1157 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 Wed, 17 Aug 2022 18:01:29 +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/v5.x/stable-review/patch-5.19.2-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-5.19.y
> > > and the diffstat can be found below.
> > >
> > > thanks,
> > >
> > > greg k-h
> >
> > The arm64 clang-14 allmodconfig failed on stable-rc 5.19.
> > This build failure got fixed on the mainline tree two weeks ago.
> >
> > * arm64, build
> > - clang-12-allmodconfig
> > - clang-13-allmodconfig
> > - clang-14-allmodconfig
> > - clang-nightly-allmodconfig
> >
> >
> > make --silent --keep-going --jobs=8
> > O=/home/tuxbuild/.cache/tuxmake/builds/2/build LLVM=1 LLVM_IAS=1
> > ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- 'HOSTCC=sccache clang'
> > 'CC=sccache clang' allmodconfig
> > make --silent --keep-going --jobs=8
> > O=/home/tuxbuild/.cache/tuxmake/builds/2/build LLVM=1 LLVM_IAS=1
> > ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- 'HOSTCC=sccache clang'
> > 'CC=sccache clang'
> > sound/soc/intel/avs/path.c:815:18: error: stack frame size (2192)
> > exceeds limit (2048) in 'avs_path_create'
> > [-Werror,-Wframe-larger-than]
> > struct avs_path *avs_path_create(struct avs_dev *adev, u32 dma_id,
> > ^
> > 1 error generated.
> > make[5]: *** [/builds/linux/scripts/Makefile.build:249:
> > sound/soc/intel/avs/path.o] Error 1
> >
> > Reported-by: Linux Kernel Functional Testing <lkft@xxxxxxxxxx>
> >
> > Steps to reproduce:
> > -------------------------
> > # See https://docs.tuxmake.org/ for complete documentation.
> > # Original tuxmake command with fragments listed below.
> > # tuxmake --runtime podman --target-arch arm64 --toolchain clang-14
> > --kconfig allmodconfig LLVM=1 LLVM_IAS=1
> >
> > tuxmake --runtime podman --target-arch arm64 --toolchain clang-14
> > --kconfig https://builds.tuxbuild.com/2DPEiUmdALSZq7DeNthZFYoPLaN/config
> > LLVM=1 LLVM_IAS=1
>
> What is the commit on mainline that resolved this issue?
commit 1e744351bcb9c4cee81300de5a6097100d835386
Author: Amadeusz Sławiński <amadeuszx.slawinski@xxxxxxxxxxxxxxx>
Date: Fri Jul 22 13:19:59 2022 +0200
ASoC: Intel: avs: Use lookup table to create modules
As reported by Nathan, when building avs driver using clang with:
CONFIG_COMPILE_TEST=y
CONFIG_FORTIFY_SOURCE=y
CONFIG_KASAN=y
CONFIG_PCI=y
CONFIG_SOUND=y
CONFIG_SND=y
CONFIG_SND_SOC=y
CONFIG_SND_SOC_INTEL_AVS=y
there are reports of too big stack use, like:
sound/soc/intel/avs/path.c:815:18: error: stack frame size
(2176) exceeds limit (2048) in 'avs_path_create'
[-Werror,-Wframe-larger-than]
struct avs_path *avs_path_create(struct avs_dev *adev, u32 dma_id,
^
1 error generated.
This is apparently caused by inlining many calls to guid_equal which
inlines fortified memcpy, using 2 size_t variables.
Instead of hardcoding many calls to guid_equal, use lookup table with
one call, this improves stack usage.
Link: https://lore.kernel.org/alsa-devel/YtlzY9aYdbS4Y3+l@dev-arch.thelio-3990X/T/
Link: https://github.com/ClangBuiltLinux/linux/issues/1642
Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@xxxxxxxxxxxxxxx>
Reported-by: Nathan Chancellor <nathan@xxxxxxxxxx>
Build-tested-by: Nathan Chancellor <nathan@xxxxxxxxxx>
Reviewed-by: Cezary Rojewski <cezary.rojewski@xxxxxxxxx>
Link: https://lore.kernel.org/r/20220722111959.2588597-1-amadeuszx.slawinski@xxxxxxxxxxxxxxx
Signed-off-by: Mark Brown <broonie@xxxxxxxxxx>
- Naresh