Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754552AbdC3Jqf (ORCPT ); Thu, 30 Mar 2017 05:46:35 -0400 Received: from mx2.suse.de ([195.135.220.15]:39018 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752667AbdC3Jqa (ORCPT ); Thu, 30 Mar 2017 05:46:30 -0400 From: Jiri Slaby To: zhenyuw@linux.intel.com Cc: linux-kernel@vger.kernel.org, Jiri Slaby , Martin Liska , Zhi Wang , Daniel Vetter , Jani Nikula , David Airlie , intel-gvt-dev@lists.freedesktop.org, intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org Subject: [PATCH] drm/i915: disable KASAN for handlers Date: Thu, 30 Mar 2017 11:46:27 +0200 Message-Id: <20170330094627.29460-1-jslaby@suse.cz> X-Mailer: git-send-email 2.12.2 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1718 Lines: 38 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 Cc: Martin Liska Cc: Zhenyu Wang Cc: Zhi Wang Cc: Daniel Vetter Cc: Jani Nikula Cc: David Airlie 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