[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <YmpPKRB6FS/5pKjK@kroah.com>
Date: Thu, 28 Apr 2022 10:24:09 +0200
From: Greg KH <gregkh@...uxfoundation.org>
To: Arnd Bergmann <arnd@...db.de>
Cc: Sai Prakash Ranjan <quic_saipraka@...cinc.com>,
Catalin Marinas <catalin.marinas@....com>,
Steven Rostedt <rostedt@...dmis.org>,
Linux ARM <linux-arm-kernel@...ts.infradead.org>,
linux-arm-msm <linux-arm-msm@...r.kernel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Marc Zyngier <maz@...nel.org>, quic_psodagud@...cinc.com,
quic_tsoni@...cinc.com, Will Deacon <will@...nel.org>
Subject: Re: [PATCHv11 6/6] asm-generic/io: Add logging support for MMIO
accessors
On Thu, Apr 28, 2022 at 10:18:36AM +0200, Arnd Bergmann wrote:
> On Thu, Apr 28, 2022 at 9:35 AM Greg KH <gregkh@...uxfoundation.org> wrote:
> >
> > On Thu, Apr 28, 2022 at 12:59:13PM +0530, Sai Prakash Ranjan wrote:
> > > On 4/28/2022 11:21 AM, Greg KH wrote:
> > > > On Thu, Apr 28, 2022 at 09:00:13AM +0530, Sai Prakash Ranjan wrote:
> >
> > > -D__NO_FORTIFY, -D__DISABLE_EXPORTS, -DDISABLE_BRANCH_PROFILING".
> >
> > Those are compiler flags that affect gcc, not kernel code functionality.
>
> It's normal for invasive instrumentation to need flags to disable them. If you
> look at mm/kasan/Makefile, you see
>
> KASAN_SANITIZE := n
> UBSAN_SANITIZE := n
> KCOV_INSTRUMENT := n
> CC_FLAGS_KASAN_RUNTIME += -DDISABLE_BRANCH_PROFILING
> CFLAGS_REMOVE_common.o = $(CC_FLAGS_FTRACE)
>
> all of which disable one of the instrumentation options, either per file
> or per directory, in order to break recursion.
That's not for logging stuff (which seems to change the functionality of
the driver), it's for system-wide profiling/code-coverage/checking/etc
type of stuff.
Let's keep a #define at the top of the driver for the drivers that
absolutely need this feature disabled as it is much easier to track that
and to see how it affects things. If you put it in a Makefile,
reviewers will miss it and wonder what is going on.
thanks,
greg k-h
Powered by blists - more mailing lists