From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755008AbcI0K7W (ORCPT ); Tue, 27 Sep 2016 06:59:22 -0400 Received: from bombadil.infradead.org ([198.137.202.9]:34905 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753979AbcI0K7O (ORCPT ); Tue, 27 Sep 2016 06:59:14 -0400 Date: Tue, 27 Sep 2016 12:59:05 +0200 From: Peter Zijlstra To: Dmitry Vyukov Cc: Andrew Morton , Andrey Konovalov , Nicolai Stange , Andrey Ryabinin , Kees Cook , James Morse , LKML , Vegard Nossum , Quentin Casasnovas , Andrey Ryabinin , Thomas Gleixner , Ingo Molnar Subject: Re: [PATCH] kcov: properly check if we are in an interrupt Message-ID: <20160927105905.GI5016@twins.programming.kicks-ass.net> References: <1474642273-112248-1-git-send-email-andreyknvl@google.com> <20160926163226.35cc76eb1a06083440cbb86d@linux-foundation.org> <20160927073409.GN2794@worktop> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23.1 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Sep 27, 2016 at 09:50:41AM +0200, Dmitry Vyukov wrote: > On Tue, Sep 27, 2016 at 9:34 AM, Peter Zijlstra wrote: > > On Tue, Sep 27, 2016 at 08:21:32AM +0200, Dmitry Vyukov wrote: > >> > >> I suspect there is a bunch of places that use in_interrupt(), but mean > >> the same as KCOV wants -- am I in interrupt? and not am I in interrupt > >> context or in normal task context but inside local_bh_disable(). For > >> example, why does fput handles closure asynchronously if the task > >> called local_bh_disable? > > > > Agreed, but it would mean auditing all in_interrupt()/irq_count() users. > > > I don't think this means auditing all users. We are not making things > worse by introduction of a new predicate. > It would be nice to look at some uses in core code, but the only place > with observed harm is KCOV. > > Any naming suggestions? Other than really_in_interrupt or > in_interrupt_and_not_in_bh_disabled? Hence the suggestion to audit and fix instead of making a bigger mess :/