From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758621AbbCDOg1 (ORCPT ); Wed, 4 Mar 2015 09:36:27 -0500 Received: from mailout3.w1.samsung.com ([210.118.77.13]:44866 "EHLO mailout3.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758459AbbCDOgY (ORCPT ); Wed, 4 Mar 2015 09:36:24 -0500 X-AuditID: cbfec7f4-b7f126d000001e9a-f6-54f717d433dd Message-id: <54F71861.9050702@samsung.com> Date: Wed, 04 Mar 2015 17:36:17 +0300 From: Andrey Ryabinin User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-version: 1.0 To: Konrad Rzeszutek Wilk 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 References: <54F5B3DA.70203@samsung.com> <20150303141650.GA30332@l.oracle.com> <54F5D56C.6020803@samsung.com> <20150303160231.GA3518@l.oracle.com> In-reply-to: <20150303160231.GA3518@l.oracle.com> Content-type: text/plain; charset=windows-1252 Content-transfer-encoding: 7bit X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrJLMWRmVeSWpSXmKPExsVy+t/xq7pXxL+HGBw6rmXxqivJ4uL0VhaL 3ttLmC0ezXvEarFs8VNGi8u75rBZrF7bwGrx/OReZoub0y6wWCw/O4/N4vuWyUwO3B733/xl 8dh8cTWTx+Qbyxk9Dn+4wuLx8ektFo8VG04we2zb08XssX7LVRaPz5vkPN7Nf8sWwBXFZZOS mpNZllqkb5fAlXHgnHzBB+6K3yvOszUw7uTsYuTkkBAwkdgx+SczhC0mceHeerYuRi4OIYGl jBJ3jh+GcpqZJKb2rmIFqeIV0JI4/3IjWAeLgKrE5+abTCA2m4CexL9Z29lAbFGBCIn5x14z Q9QLSvyYfI8FxBYRMJLovHOZBWQos8AKZomXsxvBioQFLCT+P37DDrHtLqPE980rwLZxChhK LN7RDNTBAdShJ3H/ohZImFlAXmLzmrfMExgFZiHZMQuhahaSqgWMzKsYRVNLkwuKk9JzDfWK E3OLS/PS9ZLzczcxQqLnyw7GxcesDjEKcDAq8fAWJH0LEWJNLCuuzD3EKMHBrCTC+5zte4gQ b0piZVVqUX58UWlOavEhRiYOTqkGRiYmXnEmT5elfCHyGcGqm3bw5so0ftrtkH/oo+HG9SwL I9yyRYu5f/StOTI3XcX3yZr52586f9XUWti/jCHHoW+j960E6xSDigjVMzLzX0+18oni+Gp6 UuWj+Rm/z+GH81YnNaxuue3IV5ltYOIau8VowtuOpUGyrdESP1aueZg1wfKa759cJZbijERD Leai4kQA0mLk2nwCAAA= Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 03/03/2015 07:02 PM, Konrad Rzeszutek Wilk wrote: > 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? > Probably. I think I could make this work. However, I won't be able to work on this until the end of the next week.