From patchwork Thu Mar 30 09:46:27 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiri Slaby X-Patchwork-Id: 9653421 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 356CC602C8 for ; Thu, 30 Mar 2017 09:46:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3346728556 for ; Thu, 30 Mar 2017 09:46:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 18A672857E; Thu, 30 Mar 2017 09:46:34 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=unavailable version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id D8FB828556 for ; Thu, 30 Mar 2017 09:46:33 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 05EB36E7EB; Thu, 30 Mar 2017 09:46:32 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by gabe.freedesktop.org (Postfix) with ESMTPS id 6A4646E7EB; Thu, 30 Mar 2017 09:46:30 +0000 (UTC) X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id C5F99AC22; Thu, 30 Mar 2017 09:46:28 +0000 (UTC) From: Jiri Slaby To: zhenyuw@linux.intel.com 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 Cc: intel-gvt-dev@lists.freedesktop.org, Jiri Slaby , intel-gfx@lists.freedesktop.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Daniel Vetter , Martin Liska , Zhi Wang X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP 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