Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932278AbbEZOMu (ORCPT ); Tue, 26 May 2015 10:12:50 -0400 Received: from mailout3.w1.samsung.com ([210.118.77.13]:35353 "EHLO mailout3.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754979AbbEZOMo (ORCPT ); Tue, 26 May 2015 10:12:44 -0400 X-AuditID: cbfec7f4-f79c56d0000012ee-1a-55647f596367 Message-id: <55647F57.8010008@samsung.com> Date: Tue, 26 May 2015 17:12:39 +0300 From: Andrey Ryabinin User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-version: 1.0 To: Linus Walleij Cc: "linux-kernel@vger.kernel.org" , Dmitry Vyukov , Alexander Potapenko , David Keitel , Arnd Bergmann , Andrew Morton , Catalin Marinas , Will Deacon , "linux-arm-kernel@lists.infradead.org" , linux-mm@kvack.org Subject: Re: [PATCH v2 5/5] arm64: add KASan support References: <1431698344-28054-1-git-send-email-a.ryabinin@samsung.com> <1431698344-28054-6-git-send-email-a.ryabinin@samsung.com> In-reply-to: Content-type: text/plain; charset=utf-8 Content-transfer-encoding: 7bit X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFmpikeLIzCtJLcpLzFFi42I5/e/4Nd3I+pRQg2lbZS3mrF/DZvF30jF2 i/fLehgtdl96xmwx4WEbu0X7x73MFlP+LGey2PT4GqvF5V1z2CzurfnPavHy4wkWB26PNfPW MHr8/jWJ0eNyXy+Tx4JNpR6bPk1i97hzbQ+bx4kZv1k8Ni+p9/i8SS6AM4rLJiU1J7MstUjf LoEro+PvCvaC9/wVN5YtYWpg7OHtYuTkkBAwkVj0aQoThC0mceHeerYuRi4OIYGljBJXVqxj gnC+M0osffKdHaSKV0BL4uXzB4wgNouAqkTfsa9g3WwCehL/Zm1nA7FFBSIk3l4+yQRRLyjx Y/I9FhBbREBHonvbT1aQocwCe5gldn7vZwVJCAOd8WT5EnaIbacYJVqfzwFLcAoES/w53gc0 iQOoQ11iypRckDCzgLzE5jVvmScwCsxCsmMWQtUsJFULGJlXMYqmliYXFCel5xrqFSfmFpfm pesl5+duYoTEzJcdjIuPWR1iFOBgVOLhtTicHCrEmlhWXJl7iFGCg1lJhHdxdUqoEG9KYmVV alF+fFFpTmrxIUZpDhYlcd65u96HCAmkJ5akZqemFqQWwWSZODilGhhTn+sl7Z79zLk3cCW/ /yvJT2/9DJPvlqSwH201uH7uvrXs991PWL8a1sz6YP0ux3qByq/5daK7k9au4bnAp++26cPB mRH21fef+OzjfbCYZYVoX3fv3H1a3+/tmPQ+zMNUKq0gee4xicBEs5f/WhjFfe/JPzcOWXX8 fWPDL++l68/xR/FLPjdRYinOSDTUYi4qTgQA/3Km55UCAAA= Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2225 Lines: 56 On 05/26/2015 04:35 PM, Linus Walleij wrote: > On Fri, May 15, 2015 at 3:59 PM, Andrey Ryabinin wrote: > > And then at boot I just get this: > > kasan test: kmalloc_oob_right out-of-bounds to right > kasan test: kmalloc_oob_left out-of-bounds to left > kasan test: kmalloc_node_oob_right kmalloc_node(): out-of-bounds to right > kasan test: kmalloc_large_oob_rigth kmalloc large allocation: > out-of-bounds to right > kasan test: kmalloc_oob_krealloc_more out-of-bounds after krealloc more > kasan test: kmalloc_oob_krealloc_less out-of-bounds after krealloc less > kasan test: kmalloc_oob_16 kmalloc out-of-bounds for 16-bytes access > kasan test: kmalloc_oob_in_memset out-of-bounds in memset > kasan test: kmalloc_uaf use-after-free > kasan test: kmalloc_uaf_memset use-after-free in memset > kasan test: kmalloc_uaf2 use-after-free after another kmalloc > kasan test: kmem_cache_oob out-of-bounds in kmem_cache_alloc > kasan test: kasan_stack_oob out-of-bounds on stack > kasan test: kasan_global_oob out-of-bounds global variable > > W00t no nice KASan warnings (which is what I expect). > > This is my compiler by the way: > $ arm-linux-gnueabihf-gcc --version > arm-linux-gnueabihf-gcc (crosstool-NG linaro-1.13.1-4.9-2014.09 - > Linaro GCC 4.9-2014.09) 4.9.2 20140904 (prerelease) > > I did the same exercise on the foundation model (FVP) and I guess > that is what you developed the patch set on because there I got > nice KASan dumps: > That's not kasan dumps. That is slub debug output. KASan warnings starts with "BUG: KASan: use after free/out of bounds access " line. > I wonder were the problem lies, any hints where to start looking > to fix this? > I suspect that your compiler lack -fsantize=kernel-address support. It seems that GCC 4.9.2 doesn't supports -fsanitize=address/kernel-address on aarch64. I tested this patchset on Cavium Thunder-x and on FVP also and didn't observe any problems. > Yours, > Linus Walleij > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/