Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754418AbdCaHXW (ORCPT ); Fri, 31 Mar 2017 03:23:22 -0400 Received: from mga09.intel.com ([134.134.136.24]:15886 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752385AbdCaHXV (ORCPT ); Fri, 31 Mar 2017 03:23:21 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.36,251,1486454400"; d="asc'?scan'208";a="242343909" Date: Fri, 31 Mar 2017 15:21:48 +0800 From: Zhenyu Wang To: Jiri Slaby Cc: linux-kernel@vger.kernel.org, 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: Re: [PATCH] drm/i915: disable KASAN for handlers Message-ID: <20170331072148.lbb7x6tj5egkpppm@zhen-hp.sh.intel.com> Reply-To: Zhenyu Wang References: <20170330094627.29460-1-jslaby@suse.cz> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="xx2k5uuyp3gmvnzw" Content-Disposition: inline In-Reply-To: <20170330094627.29460-1-jslaby@suse.cz> User-Agent: NeoMutt/20161126 (1.7.1) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2488 Lines: 71 --xx2k5uuyp3gmvnzw Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2017.03.30 11:46:27 +0200, Jiri Slaby wrote: > 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 4376= 0 bytes is larger than 2048 bytes [-Werror=3Dframe-larger-than=3D] > drivers/gpu/drm/i915/gvt/handlers.c:2402:1: error: the frame size of 9400= bytes is larger than 2048 bytes [-Werror=3Dframe-larger-than=3D] > drivers/gpu/drm/i915/gvt/handlers.c:2628:1: error: the frame size of 1125= 6 bytes is larger than 2048 bytes [-Werror=3Dframe-larger-than=3D] >=20 > 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. >=20 > So disable KASAN for this file. >=20 > 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(+) >=20 > 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 :=3D gvt.o aperture_gm.o handlers.o vgpu.o tra= ce_points.o firmware.o \ > ccflags-y +=3D -I$(src) -I$(src)/$(GVT_DIR) -Wall > i915-y +=3D $(addprefix $(GVT_DIR)/, $(GVT_SOURCE)) > obj-$(CONFIG_DRM_I915_GVT_KVMGT) +=3D $(GVT_DIR)/kvmgt.o > + > +KASAN_SANITIZE_handlers.o :=3D n > --=20 > 2.12.2 >=20 Applied this, we'd better cleanup legacy usage to current i915 mmio reg def= ine. Thanks! --=20 Open Source Technology Center, Intel ltd. $gpg --keyserver wwwkeys.pgp.net --recv-keys 4D781827 --xx2k5uuyp3gmvnzw Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iEYEARECAAYFAljeA4wACgkQsQQaM014GCcF3gCfeIUsCq59ggkogiHSh2uG3G4W TXYAnRsJd6zx7c0ylO/o7nWhFlgpFTpI =CGXo -----END PGP SIGNATURE----- --xx2k5uuyp3gmvnzw--