From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756969AbbCCQDF (ORCPT ); Tue, 3 Mar 2015 11:03:05 -0500 Received: from userp1040.oracle.com ([156.151.31.81]:33029 "EHLO userp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756893AbbCCQDB (ORCPT ); Tue, 3 Mar 2015 11:03:01 -0500 Date: Tue, 3 Mar 2015 11:02:31 -0500 From: Konrad Rzeszutek Wilk To: Andrey Ryabinin Cc: "Luis R. Rodriguez" , Jeremy Fitzhardinge , Rusty Russell , "linux-kernel@vger.kernel.org" , Andy Lutomirski , Chris Wright , xen-devel@lists.xenproject.org, Boris Ostrovsky , virtualization@lists.linux-foundation.org, Alok Kataria Subject: Re: [Xen-devel] kasan_map_early_shadow() on Xen Message-ID: <20150303160231.GA3518@l.oracle.com> References: <54F5B3DA.70203@samsung.com> <20150303141650.GA30332@l.oracle.com> <54F5D56C.6020803@samsung.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <54F5D56C.6020803@samsung.com> User-Agent: Mutt/1.5.23 (2014-03-12) X-Source-IP: ucsinet22.oracle.com [156.151.31.94] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Mar 03, 2015 at 06:38:20PM +0300, Andrey Ryabinin wrote: > On 03/03/2015 05:16 PM, Konrad Rzeszutek Wilk wrote: > > On Tue, Mar 03, 2015 at 04:15:06PM +0300, Andrey Ryabinin wrote: > >> On 03/03/2015 12:40 PM, Luis R. Rodriguez wrote: > >>> Andrey, > >>> > >>> I believe that on Xen we should disable kasan, would like confirmation > >> > >> I guess Xen guests won't work with kasan because Xen guests doesn't setup shadow > >> (kasan_map_early_shadow() is not called in xen guests). > >> > >> Disabling kasan for Xen in Kconfig is undesirable because that will disable kasan > >> for allmodconfig and allyesconfig builds, but I don't see other option for now. > > > > Was there an bug reported for this? It would be good to CC the maintainers > > of Xen on that sort of thing. > > > > There was no report for this. I just looked at Xen code because of this Luis's mail > and I don't see how it could work with kasan. Ahh. > Fixing this might be not trivial. We need to setup shadow memory before any kasan instrumented > function will run. > This is like with -fstack-protector (you need to setup gdt before calling any stack protected function). If it is like that - then just using what had to be implemented for the stack protection as a template ought to pave most of the work?