Re: [PATCH] i915: increase frame warning limit in intel_workaround when using KASAN or KCSAN

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 13 Jun 2024, flyingpenghao@xxxxxxxxx wrote:
> From: Peng Hao <flyingpeng@xxxxxxxxxxx>
>
> When building kernel with clang, which will typically
> have sanitizers enabled, there is a warning about a large stack frame.
>
> drivers/gpu/drm/i915/gt/intel_workarounds.c:3044:6: error: stack frame size (5176)
> exceeds limit (2048) in 'intel_engine_init_workarounds' [-Werror,-Wframe-larger-than]
> void intel_engine_init_workarounds(struct intel_engine_cs *engine)
>      ^
> 128/5176 (2.47%) spills, 5048/5176 (97.53%) variables
>
> so increase the limit for configurations that have KASAN or KCSAN enabled for not
> breaking the majority of builds.

We need to fix the issue instead of sweeping it under the carpet.

Also, please see MAINTAINERS for where to send i915 patches.


BR,
Jani.


>
> Signed-off-by: Peng Hao <flyingpeng@xxxxxxxxxxx>
> ---
>  drivers/gpu/drm/i915/Makefile | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/Makefile b/drivers/gpu/drm/i915/Makefile
> index fba73c38e235..884e2f010bdd 100644
> --- a/drivers/gpu/drm/i915/Makefile
> +++ b/drivers/gpu/drm/i915/Makefile
> @@ -36,7 +36,11 @@ subdir-ccflags-$(CONFIG_DRM_I915_WERROR) += -Werror
>  CFLAGS_i915_pci.o = -Wno-override-init
>  CFLAGS_display/intel_display_device.o = -Wno-override-init
>  CFLAGS_display/intel_fbdev.o = -Wno-override-init
> -
> +ifneq ($(CONFIG_FRAME_WARN),0)
> +ifeq ($(filter y,$(CONFIG_KASAN)$(CONFIG_KCSAN)),y)
> +CFLAGS_gt/intel_workarounds.o = -Wframe-larger-than=5272
> +endif
> +endif
>  # Support compiling the display code separately for both i915 and xe
>  # drivers. Define I915 when building i915.
>  subdir-ccflags-y += -DI915

-- 
Jani Nikula, Intel



[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux