From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756678AbbCCPi0 (ORCPT ); Tue, 3 Mar 2015 10:38:26 -0500 Received: from mailout3.w1.samsung.com ([210.118.77.13]:62143 "EHLO mailout3.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753394AbbCCPiZ (ORCPT ); Tue, 3 Mar 2015 10:38:25 -0500 X-AuditID: cbfec7f5-b7fc86d0000066b7-54-54f5d4d929d9 Message-id: <54F5D56C.6020803@samsung.com> Date: Tue, 03 Mar 2015 18:38:20 +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> In-reply-to: <20150303141650.GA30332@l.oracle.com> Content-type: text/plain; charset=utf-8 Content-transfer-encoding: 7bit X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrFLMWRmVeSWpSXmKPExsVy+t/xy7o3r3wNMejZr2fxqivJ4uL0VhaL 3ttLmC0ezXvEarFs8VNGi8u75rBZrF7bwGrx/OReZoub0y6wWCw/O4/N4vuWyUwO3B733/xl 8dh8cTWTx+Qbyxk9Dn+4wuLx8ektFo8VG04we2zb08XssX7LVRaPz5vkPN7Nf8sWwBXFZZOS mpNZllqkb5fAlfHh/UrGgtUcFU3vPrE3MN5g62Lk5JAQMJF4vf0iM4QtJnHh3nqgOBeHkMBS RolvTyZBOc1MEhf+/2AFqeIV0JJ4dfcEE4jNIqAqcebsJxYQm01AT+LfrO1gU0UFIiTmH3vN DFEvKPFj8j2wGhEBI4nOO5dZQIYyC6xglng5uxGsSFjAQuL/4zfsENumM0rMfPwKbBInUMfa /T+AtnEAdahLTJmSCxJmFpCX2LzmLfMERoFZSHbMQqiahaRqASPzKkbR1NLkguKk9FwjveLE 3OLSvHS95PzcTYyQ+Pm6g3HpMatDjAIcjEo8vCcOfg4RYk0sK67MPcQowcGsJMIrC4w+Id6U xMqq1KL8+KLSnNTiQ4xMHJxSDYz+Hb+VgrbP2fLzzguLna9YW0OTrt88brvGIVTghrlPzpPK DwuZ/U9bTkm1f81RFh2+Rcym7pOmVt+NF8G2q9qbXArXzFseN3dVx+k+Y3b5rY2eJ5+nOfz7 dPvYnb1/HWceDJr19LM1N/PSOxs630vt3y/mob5fnv3r/ncCpi0dpQbZWte9ZGSVWIozEg21 mIuKEwHcOBYGfQIAAA== Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. 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).