lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87mvc13fk1.fsf@intel.com>
Date:   Fri, 31 Mar 2017 13:29:18 +0300
From:   Jani Nikula <jani.nikula@...ux.intel.com>
To:     Zhenyu Wang <zhenyuw@...ux.intel.com>, Jiri Slaby <jslaby@...e.cz>
Cc:     linux-kernel@...r.kernel.org, Martin Liska <mliska@...e.cz>,
        Zhi Wang <zhi.a.wang@...el.com>,
        Daniel Vetter <daniel.vetter@...el.com>,
        David Airlie <airlied@...ux.ie>,
        intel-gvt-dev@...ts.freedesktop.org,
        intel-gfx@...ts.freedesktop.org, dri-devel@...ts.freedesktop.org,
        Arnd Bergmann <arnd@...db.de>
Subject: Re: [PATCH] drm/i915: disable KASAN for handlers

On Fri, 31 Mar 2017, Zhenyu Wang <zhenyuw@...ux.intel.com> wrote:
> 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 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@...e.cz>
>> Cc: Martin Liska <mliska@...e.cz>
>> Cc: Zhenyu Wang <zhenyuw@...ux.intel.com>
>> Cc: Zhi Wang <zhi.a.wang@...el.com>
>> Cc: Daniel Vetter <daniel.vetter@...el.com>
>> Cc: Jani Nikula <jani.nikula@...ux.intel.com>
>> Cc: David Airlie <airlied@...ux.ie>
>> Cc: intel-gvt-dev@...ts.freedesktop.org
>> Cc: intel-gfx@...ts.freedesktop.org
>> Cc: dri-devel@...ts.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
>> 
>
> Applied this, we'd better cleanup legacy usage to current i915 mmio
> reg define. Thanks!

Hmmh, that was a bit fast, there was a related discussion going in [1].

BR,
Jani.


[1] http://mid.mail-archive.com/20170320215713.3086140-1-arnd@arndb.de




-- 
Jani Nikula, Intel Open Source Technology Center

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ