All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915: disable KASAN for handlers
@ 2017-03-30  9:46 ` Jiri Slaby
  0 siblings, 0 replies; 11+ messages in thread
From: Jiri Slaby @ 2017-03-30  9:46 UTC (permalink / raw)
  To: zhenyuw
  Cc: linux-kernel, Jiri Slaby, Martin Liska, Zhi Wang, Daniel Vetter,
	Jani Nikula, David Airlie, intel-gvt-dev, intel-gfx, dri-devel

Handlers are currently the only blocker to compile the kernel with gcc 7
and KASAN+use-after-scope enabled:
drivers/gpu/drm/i915/gvt/handlers.c:2200:1: error: the frame size of 43760 bytes is larger than 2048 bytes [-Werror=frame-larger-than=]
drivers/gpu/drm/i915/gvt/handlers.c:2402:1: error: the frame size of 9400 bytes is larger than 2048 bytes [-Werror=frame-larger-than=]
drivers/gpu/drm/i915/gvt/handlers.c:2628:1: error: the frame size of 11256 bytes is larger than 2048 bytes [-Werror=frame-larger-than=]

It is due to many expansions of MMIO_* macros in init_generic_mmio_info.
INTEL_GVT_MMIO_OFFSET generates for each such line a __reg and an
offset. There are too many for KASAN to keep up.

So disable KASAN for this file.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Martin Liska <mliska@suse.cz>
Cc: Zhenyu Wang <zhenyuw@linux.intel.com>
Cc: Zhi Wang <zhi.a.wang@intel.com>
Cc: Daniel Vetter <daniel.vetter@intel.com>
Cc: Jani Nikula <jani.nikula@linux.intel.com>
Cc: David Airlie <airlied@linux.ie>
Cc: intel-gvt-dev@lists.freedesktop.org
Cc: intel-gfx@lists.freedesktop.org
Cc: dri-devel@lists.freedesktop.org
---
 drivers/gpu/drm/i915/gvt/Makefile | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/gpu/drm/i915/gvt/Makefile b/drivers/gpu/drm/i915/gvt/Makefile
index b123c20e2097..942f1849d194 100644
--- a/drivers/gpu/drm/i915/gvt/Makefile
+++ b/drivers/gpu/drm/i915/gvt/Makefile
@@ -6,3 +6,5 @@ GVT_SOURCE := gvt.o aperture_gm.o handlers.o vgpu.o trace_points.o firmware.o \
 ccflags-y				+= -I$(src) -I$(src)/$(GVT_DIR) -Wall
 i915-y					+= $(addprefix $(GVT_DIR)/, $(GVT_SOURCE))
 obj-$(CONFIG_DRM_I915_GVT_KVMGT)	+= $(GVT_DIR)/kvmgt.o
+
+KASAN_SANITIZE_handlers.o := n
-- 
2.12.2

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

end of thread, other threads:[~2017-07-18  5:48 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-30  9:46 [PATCH] drm/i915: disable KASAN for handlers Jiri Slaby
2017-03-30  9:46 ` Jiri Slaby
2017-03-30 11:50 ` ✓ Fi.CI.BAT: success for " Patchwork
2017-03-31  7:21 ` [PATCH] " Zhenyu Wang
2017-03-31  7:21   ` Zhenyu Wang
2017-03-31 10:29   ` Jani Nikula
2017-03-31 10:29     ` Jani Nikula
2017-03-31 11:23     ` Arnd Bergmann
2017-03-31 11:23       ` Arnd Bergmann
2017-07-18  5:48       ` Jiri Slaby
2017-07-18  5:48         ` Jiri Slaby

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.