Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932801AbdCGQal (ORCPT ); Tue, 7 Mar 2017 11:30:41 -0500 Received: from mail-wr0-f196.google.com ([209.85.128.196]:33145 "EHLO mail-wr0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755419AbdCGQaU (ORCPT ); Tue, 7 Mar 2017 11:30:20 -0500 To: aryabinin@virtuozzo.com Cc: glider@google.com, Dmitry Vyukov , LKML From: Nikolay Borisov Subject: kasan behavior when built with unsupported compiler Message-ID: <1eb0b1ba-3847-9bdc-8f4a-adcd34de3486@gmail.com> Date: Tue, 7 Mar 2017 17:35:42 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 938 Lines: 26 Hello, I've been chasing a particular UAF as reported by kasan (https://www.spinics.net/lists/kernel/msg2458136.html). However, one thing which I took notice of rather lately is that I was building my kernel with gcc 4.7.4 which is not supported by kasan as indicated by the following string: scripts/Makefile.kasan:19: Cannot use CONFIG_KASAN: -fsanitize=kernel-address is not supported by compiler Nevertheless, the kernel compiles and when I boot it I see the kasan splats as per the referenced thread. If, however, I build the kernel with a newer compiler version 5.4.0 kasan no longer complains. At this point I'm wondering whether the splats can be due to old compiler being used e.g. false positives or are they genuine splats and gcc 5 somehow obfuscates them ? Clearly despite the warning about not being able to use CONFIG_KASAN it is still working since I'm seeing the splats. Is this valid behavior ? Regards, Nikolay