All of lore.kernel.org
 help / color / mirror / Atom feed
From: Will Deacon <will.deacon@arm.com>
To: Kees Cook <keescook@chromium.org>
Cc: Mark Rutland <mark.rutland@arm.com>,
	"linux-s390@vger.kernel.org" <linux-s390@vger.kernel.org>,
	linux-arch <linux-arch@vger.kernel.org>,
	Arnd Bergmann <arnd@arndb.de>,
	Catalin Marinas <catalin.marinas@arm.com>,
	"x86@kernel.org" <x86@kernel.org>,
	Heiko Carstens <heiko.carstens@de.ibm.com>,
	Russell King <linux@armlinux.org.uk>,
	LKML <linux-kernel@vger.kernel.org>,
	Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>,
	Martin Schwidefsky <schwidefsky@de.ibm.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Laura Abbott <labbott@redhat.com>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>
Subject: Re: [RFC][PATCH] treewide: Move set_memory_* functions away from cacheflush.h
Date: Wed, 8 Feb 2017 09:28:30 +0000	[thread overview]
Message-ID: <20170208092830.GB30215@arm.com> (raw)
In-Reply-To: <CAGXu5j+BGgs747D2cCW_is2z8QPA2crduE4SDDmu8tmxQ4Zh8A@mail.gmail.com>

On Tue, Feb 07, 2017 at 01:25:53PM -0800, Kees Cook wrote:
> On Tue, Feb 7, 2017 at 1:10 PM, Laura Abbott <labbott@redhat.com> wrote:
> > The set_memory_* APIs came out of a desire to have a better way to
> > change memory attributes. Many of these attributes were linked to cache
> > functionality so the prototypes were put in cacheflush.h. These days,
> > the APIs have grown and have a much wider use than just cache APIs. To
> > support this growth, split off set_memory_* and friends into a separate
> > header file to avoid growing cacheflush.h for APIs that have nothing to
> > do with caches.
> >
> > Signed-off-by: Laura Abbott <labbott@redhat.com>
> > ---
> > This came out of a comment Russell made while reviewing RODATA test cases
> > http://lists.infradead.org/pipermail/linux-arm-kernel/2017-January/480855.html
> > While the final result of that series was the rodata code was refactored into
> > its own header file, the set_memory_* APIs are still out of place.
> 
> Yeah, this is a nice clean up to start on.
> 
> > This is a simple attempt at moving all the API stubs to their own file.
> > Another idea I had was throwing set_memory_{x,nx,ro,rw} in an asm-generic
> > file since those are commonly used for module setting across all arches.
> 
> It seems like asm-generic would be cleaner, yes? Only a few archs have
> anything "special" happening in the resulting header files.

I'd also prefer the asm-generic approach if it makes the arch part a simple
addition to asm/Kbuild.

Will

WARNING: multiple messages have this Message-ID (diff)
From: Will Deacon <will.deacon@arm.com>
To: Kees Cook <keescook@chromium.org>
Cc: Laura Abbott <labbott@redhat.com>,
	Russell King <linux@armlinux.org.uk>,
	Catalin Marinas <catalin.marinas@arm.com>,
	Martin Schwidefsky <schwidefsky@de.ibm.com>,
	Heiko Carstens <heiko.carstens@de.ibm.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>,
	Mark Rutland <mark.rutland@arm.com>,
	Arnd Bergmann <arnd@arndb.de>, "x86@kernel.org" <x86@kernel.org>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>,
	LKML <linux-kernel@vger.kernel.org>,
	"linux-s390@vger.kernel.org" <linux-s390@vger.kernel.org>,
	linux-arch <linux-arch@vger.kernel.org>
Subject: Re: [RFC][PATCH] treewide: Move set_memory_* functions away from cacheflush.h
Date: Wed, 8 Feb 2017 09:28:30 +0000	[thread overview]
Message-ID: <20170208092830.GB30215@arm.com> (raw)
Message-ID: <20170208092830.11yup85-qNSgk3F1Ux9I6Gb4b7oIGHTQjo_rnU7srkU@z> (raw)
In-Reply-To: <CAGXu5j+BGgs747D2cCW_is2z8QPA2crduE4SDDmu8tmxQ4Zh8A@mail.gmail.com>

On Tue, Feb 07, 2017 at 01:25:53PM -0800, Kees Cook wrote:
> On Tue, Feb 7, 2017 at 1:10 PM, Laura Abbott <labbott@redhat.com> wrote:
> > The set_memory_* APIs came out of a desire to have a better way to
> > change memory attributes. Many of these attributes were linked to cache
> > functionality so the prototypes were put in cacheflush.h. These days,
> > the APIs have grown and have a much wider use than just cache APIs. To
> > support this growth, split off set_memory_* and friends into a separate
> > header file to avoid growing cacheflush.h for APIs that have nothing to
> > do with caches.
> >
> > Signed-off-by: Laura Abbott <labbott@redhat.com>
> > ---
> > This came out of a comment Russell made while reviewing RODATA test cases
> > http://lists.infradead.org/pipermail/linux-arm-kernel/2017-January/480855.html
> > While the final result of that series was the rodata code was refactored into
> > its own header file, the set_memory_* APIs are still out of place.
> 
> Yeah, this is a nice clean up to start on.
> 
> > This is a simple attempt at moving all the API stubs to their own file.
> > Another idea I had was throwing set_memory_{x,nx,ro,rw} in an asm-generic
> > file since those are commonly used for module setting across all arches.
> 
> It seems like asm-generic would be cleaner, yes? Only a few archs have
> anything "special" happening in the resulting header files.

I'd also prefer the asm-generic approach if it makes the arch part a simple
addition to asm/Kbuild.

Will

WARNING: multiple messages have this Message-ID (diff)
From: will.deacon@arm.com (Will Deacon)
To: linux-arm-kernel@lists.infradead.org
Subject: [RFC][PATCH] treewide: Move set_memory_* functions away from cacheflush.h
Date: Wed, 8 Feb 2017 09:28:30 +0000	[thread overview]
Message-ID: <20170208092830.GB30215@arm.com> (raw)
In-Reply-To: <CAGXu5j+BGgs747D2cCW_is2z8QPA2crduE4SDDmu8tmxQ4Zh8A@mail.gmail.com>

On Tue, Feb 07, 2017 at 01:25:53PM -0800, Kees Cook wrote:
> On Tue, Feb 7, 2017 at 1:10 PM, Laura Abbott <labbott@redhat.com> wrote:
> > The set_memory_* APIs came out of a desire to have a better way to
> > change memory attributes. Many of these attributes were linked to cache
> > functionality so the prototypes were put in cacheflush.h. These days,
> > the APIs have grown and have a much wider use than just cache APIs. To
> > support this growth, split off set_memory_* and friends into a separate
> > header file to avoid growing cacheflush.h for APIs that have nothing to
> > do with caches.
> >
> > Signed-off-by: Laura Abbott <labbott@redhat.com>
> > ---
> > This came out of a comment Russell made while reviewing RODATA test cases
> > http://lists.infradead.org/pipermail/linux-arm-kernel/2017-January/480855.html
> > While the final result of that series was the rodata code was refactored into
> > its own header file, the set_memory_* APIs are still out of place.
> 
> Yeah, this is a nice clean up to start on.
> 
> > This is a simple attempt at moving all the API stubs to their own file.
> > Another idea I had was throwing set_memory_{x,nx,ro,rw} in an asm-generic
> > file since those are commonly used for module setting across all arches.
> 
> It seems like asm-generic would be cleaner, yes? Only a few archs have
> anything "special" happening in the resulting header files.

I'd also prefer the asm-generic approach if it makes the arch part a simple
addition to asm/Kbuild.

Will

  reply	other threads:[~2017-02-08  9:28 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-07 21:10 [RFC][PATCH] treewide: Move set_memory_* functions away from cacheflush.h Laura Abbott
2017-02-07 21:10 ` Laura Abbott
2017-02-07 21:25 ` Kees Cook
2017-02-07 21:25   ` Kees Cook
2017-02-07 21:25   ` Kees Cook
2017-02-08  9:28   ` Will Deacon [this message]
2017-02-08  9:28     ` Will Deacon
2017-02-08  9:28     ` Will Deacon
2017-02-08  7:31 ` Ingo Molnar
2017-02-08  7:31   ` Ingo Molnar
2017-02-09  9:59 ` Heiko Carstens
2017-02-09  9:59   ` Heiko Carstens

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170208092830.GB30215@arm.com \
    --to=will.deacon@arm.com \
    --cc=arnd@arndb.de \
    --cc=catalin.marinas@arm.com \
    --cc=heiko.carstens@de.ibm.com \
    --cc=hpa@zytor.com \
    --cc=keescook@chromium.org \
    --cc=labbott@redhat.com \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=mark.rutland@arm.com \
    --cc=mingo@redhat.com \
    --cc=schwidefsky@de.ibm.com \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.