[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Yby5Rwr0jgAcK4th@kroah.com>
Date: Fri, 17 Dec 2021 17:22:31 +0100
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: Alexander Potapenko <glider@...gle.com>
Cc: Alexander Viro <viro@...iv.linux.org.uk>,
Andrew Morton <akpm@...ux-foundation.org>,
Andrey Konovalov <andreyknvl@...gle.com>,
Andy Lutomirski <luto@...nel.org>,
Arnd Bergmann <arnd@...db.de>, Borislav Petkov <bp@...en8.de>,
Christoph Hellwig <hch@....de>,
Christoph Lameter <cl@...ux.com>,
David Rientjes <rientjes@...gle.com>,
Dmitry Vyukov <dvyukov@...gle.com>,
Eric Dumazet <edumazet@...gle.com>,
Herbert Xu <herbert@...dor.apana.org.au>,
Ilya Leoshkevich <iii@...ux.ibm.com>,
Ingo Molnar <mingo@...hat.com>, Jens Axboe <axboe@...nel.dk>,
Joonsoo Kim <iamjoonsoo.kim@....com>,
Kees Cook <keescook@...omium.org>,
Marco Elver <elver@...gle.com>,
Matthew Wilcox <willy@...radead.org>,
"Michael S. Tsirkin" <mst@...hat.com>,
Pekka Enberg <penberg@...nel.org>,
Peter Zijlstra <peterz@...radead.org>,
Petr Mladek <pmladek@...e.com>,
Steven Rostedt <rostedt@...dmis.org>,
Thomas Gleixner <tglx@...utronix.de>,
Vasily Gorbik <gor@...ux.ibm.com>,
Vegard Nossum <vegard.nossum@...cle.com>,
Vlastimil Babka <vbabka@...e.cz>, linux-mm@...ck.org,
linux-arch@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 13/43] kmsan: add KMSAN runtime core
On Thu, Dec 16, 2021 at 11:33:56AM +0100, Alexander Potapenko wrote:
> On Tue, Dec 14, 2021 at 5:34 PM Greg Kroah-Hartman
> <gregkh@...uxfoundation.org> wrote:
> >
> > On Tue, Dec 14, 2021 at 05:20:20PM +0100, Alexander Potapenko wrote:
> > > This patch adds the core parts of KMSAN runtime and associated files:
> > >
> > > - include/linux/kmsan-checks.h: user API to poison/unpoison/check
> > > the kernel memory;
> > > - include/linux/kmsan.h: declarations of KMSAN hooks to be referenced
> > > outside of KMSAN runtime;
> > > - lib/Kconfig.kmsan: CONFIG_KMSAN and related declarations;
> > > - Makefile, mm/Makefile, mm/kmsan/Makefile: boilerplate Makefile code;
> > > - mm/kmsan/annotations.c: non-inlineable implementation of KMSAN_INIT();
> > > - mm/kmsan/core.c: core functions that operate with shadow and origin
> > > memory and perform checks, utility functions;
> > > - mm/kmsan/hooks.c: KMSAN hooks for kernel subsystems;
> > > - mm/kmsan/init.c: KMSAN initialization routines;
> > > - mm/kmsan/instrumentation.c: functions called by KMSAN instrumentation;
> > > - mm/kmsan/kmsan.h: internal KMSAN declarations;
> > > - mm/kmsan/shadow.c: routines that encapsulate metadata creation and
> > > addressing;
> > > - scripts/Makefile.kmsan: CFLAGS_KMSAN
> > > - scripts/Makefile.lib: KMSAN_SANITIZE and KMSAN_ENABLE_CHECKS macros
> >
> >
> > That's an odd way to write a changelog, don't you think?
>
> Agreed. I'll try to concentrate on the functionality instead. Sorry about that.
>
> > You need to describe what you are doing here and why you are doing it.
> > Not a list of file names, we can see that in the diffstat.
> >
> > Also, you don't mention you are doing USB stuff here at all. And why
> > are you doing it here? That should be added in a later patch.
>
> You are right, USB is a good example of a stand-alone feature that can
> be moved to a separate patch.
>
> > Break this up into smaller, logical, pieces that add the infrastructure
> > and build on it. Don't just chop your patches up on a logical-file
> > boundry, as you are adding stuff in this patch that you do not need for
> > many more later on, which means it was not needed here.
>
> Just to make sure I don't misunderstand - for example for "kmsan: mm:
> call KMSAN hooks from SLUB code", would it be better to pull the code
> in mm/kmsan/core.c implementing kmsan_slab_alloc() and
> kmsan_slab_free() into that patch?
Yes.
> I thought maintainers would prefer to have patches to their code
> separated from KMSAN code, but if it's not true, I can surely fix
> that.
As a maintainer, I want to know what the function call that you just
added to my subsystem to call does. Wouldn't you? Put it all in the
same patch.
Think about submitting a patch series as telling a story. You need to
show the progression forward of the feature so that everyone can
understand what is going on. To just throw tiny snippets at us is
impossible to follow along with what your goal is.
You want reviewers to be able to easily see if the things you describe
being done in the changelog actually are implemented in the diff.
Dividing stuff up by files does not show that at all.
thanks,
greg k-h
Powered by blists - more mailing lists