From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755037AbbJGQ1Y (ORCPT ); Wed, 7 Oct 2015 12:27:24 -0400 Received: from mga01.intel.com ([192.55.52.88]:30238 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754847AbbJGQ1W (ORCPT ); Wed, 7 Oct 2015 12:27:22 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.17,649,1437462000"; d="scan'208";a="575954601" Date: Wed, 7 Oct 2015 09:27:03 -0700 From: Andi Kleen To: Andrey Ryabinin Cc: Andy Lutomirski , Ingo Molnar , Dmitry Vyukov , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , "x86@kernel.org" , LKML , Andrey Konovalov , Kostya Serebryany , Alexander Potapenko , kasan-dev , Borislav Petkov , Denys Vlasenko , Sasha Levin , Wolfram Gloger , Linus Torvalds , Andrew Morton Subject: Re: [PATCH] x86/process: Silence KASAN warnings in get_wchan() Message-ID: <20151007162703.GL26924@tassilo.jf.intel.com> References: <1444040906-6788-1-git-send-email-aryabinin@virtuozzo.com> <20151005112341.GA1101@gmail.com> <56126316.3030901@virtuozzo.com> <20151005163906.GE26924@tassilo.jf.intel.com> <5612AC7A.9080502@virtuozzo.com> <20151006072655.GB10672@gmail.com> <5614DDD2.3080408@virtuozzo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5614DDD2.3080408@virtuozzo.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Oct 07, 2015 at 11:54:42AM +0300, Andrey Ryabinin wrote: > On 10/06/2015 09:11 PM, Andy Lutomirski wrote: > > > > But what's wrong with the GCC attribute mechanism? Surely GCC ought > > to be able to generate the code, at least in the simple cases, and the > > attribute already exists. The attribute and READ_ONCE_NOCHECK seem > > like the least messy in the C code. > > The problem with 'no_sanitize_address' attribute is incompatibility with inlining. > GCC can't inline function with that attribute into function without it. > And the contrary is also true - GCC can't inline function without attribute into function with such attribute. > > Failure to inline always_inline function leads to build failure. So just don't do that? Don't set the attribute on functions marked inline. Where do you see this anyways? -Andi