All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dave Martin <Dave.Martin@arm.com>
To: linux-kernel@vger.kernel.org
Cc: linux-arch@vger.kernel.org,
	Andrew Morton <akpm@linux-foundation.org>,
	Benjamin Herrenschmidt <benh@kernel.crashing.org>,
	Catalin Marinas <catalin.marinas@arm.com>,
	Fenghua Yu <fenghua.yu@intel.com>,
	"H. Peter Anvin" <hpa@zytor.com>, Ingo Molnar <mingo@kernel.org>,
	Ivan Kokshaysky <ink@jurassic.park.msu.ru>,
	James Hogan <jhogan@kernel.org>,
	Kees Cook <keescook@chromium.org>,
	Matt Turner <mattst88@gmail.com>,
	Michael Ellerman <mpe@ellerman.id.au>,
	Paul Mackerras <paulus@samba.org>,
	Ralf Baechle <ralf@linux-mips.org>,
	Richard Henderson <rth@twiddle.net>,
	Rich Felker <dalias@libc.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Tony Luck <tony.luck@intel.com>,
	Will Deacon <will.deacon@arm.com>,
	x86@kernel.org, Yoshinori Sato <ysato@users.sourceforge.jp>
Subject: [RFC PATCH 00/11] prctl: Modernise wiring for optional prctl() calls
Date: Mon, 14 May 2018 18:14:16 +0100	[thread overview]
Message-ID: <1526318067-4964-1-git-send-email-Dave.Martin@arm.com> (raw)

[Reviewer note: this is a cross-arch series.  To reduce spam, I have
tried not to Cc people on patches they aren't likely to care about.
The complete series can be found in the LKML or linux-arch archives.]

The core framework for the prctl() syscall is unloved and looking
rather crusty these days.  It also relies on defining ancillary
boilerplate macros for each prctl() in order to control conditional
compilation of the different prctl calls.  We have better ways to
do this now.

This series attempts to modernise the code by defining a couple of new
Kconfig variables HAVE_PRCTL_ARCH and HAVE_ARCH_PR_SET_GET_UNALIGN to
allow architectures to provide hooks for arch-dependent prctls.


For now this series has had minimal testing: some basic testing of
arch-specific prctls using PR_SVE_SET_VL on arm64; build-tested on
x86; otherwise untested.

This is not polished yet... but I'm interested to know what people
think about the approach.

Cheers
---Dave


Dave Martin (11):
  prctl: Support movement of arch prctls out of common code
  arm64: Move arch-specific prctls out of core code
  MIPS: Remove unused task argument from prctl functions
  MIPS: Move arch-specific prctls out of core code
  x86: Move arch-specific prctls out of core code
  powerpc: Remove unused task argument from prctl functions
  powerpc: Move arch-specific prctls out of core code
  ia64: Remove unused task argument from prctl functions
  ia64: Move arch-specific prctls out of core code
  prctl: Remove redundant task argument from PR_{SET,GET}_UNALIGN
    backends
  prctl: Refactor PR_{SET,GET}_UNALIGN to reduce boilerplate

 arch/Kconfig                         |   6 ++
 arch/alpha/Kconfig                   |   1 +
 arch/alpha/include/asm/thread_info.h |  23 --------
 arch/alpha/kernel/Makefile           |   2 +-
 arch/alpha/kernel/sys.c              |  36 ++++++++++++
 arch/arm64/Kconfig                   |   1 +
 arch/arm64/include/asm/processor.h   |   4 --
 arch/arm64/kernel/sys.c              |  15 +++++
 arch/ia64/Kconfig                    |   2 +
 arch/ia64/include/asm/processor.h    |  24 --------
 arch/ia64/kernel/sys_ia64.c          |  37 ++++++++++++
 arch/mips/Kconfig                    |   1 +
 arch/mips/include/asm/processor.h    |   3 -
 arch/mips/kernel/process.c           |  23 ++++----
 arch/mips/kernel/syscall.c           |  15 +++++
 arch/parisc/Kconfig                  |   1 +
 arch/parisc/include/asm/processor.h  |  14 -----
 arch/parisc/kernel/sys_parisc.c      |  15 +++++
 arch/powerpc/Kconfig                 |   2 +
 arch/powerpc/include/asm/processor.h |  20 ++-----
 arch/powerpc/kernel/process.c        |  38 ++++++------
 arch/powerpc/kernel/syscalls.c       |  17 ++++++
 arch/sh/Kconfig                      |   1 +
 arch/sh/include/asm/processor.h      |   7 ---
 arch/sh/mm/alignment.c               |  12 ++--
 arch/x86/Kconfig                     |   1 +
 arch/x86/include/asm/processor.h     |   6 --
 arch/x86/kernel/Makefile             |   1 +
 arch/x86/kernel/sys.c                |  26 +++++++++
 include/linux/prctl.h                |  27 +++++++++
 include/uapi/linux/prctl.h           |   6 +-
 kernel/sys.c                         | 110 ++++-------------------------------
 tools/include/uapi/linux/prctl.h     |   6 +-
 33 files changed, 263 insertions(+), 240 deletions(-)
 create mode 100644 arch/alpha/kernel/sys.c
 create mode 100644 arch/x86/kernel/sys.c
 create mode 100644 include/linux/prctl.h

-- 
2.1.4

WARNING: multiple messages have this Message-ID (diff)
From: Dave Martin <Dave.Martin@arm.com>
To: linux-kernel@vger.kernel.org
Cc: linux-arch@vger.kernel.org,
	Andrew Morton <akpm@linux-foundation.org>,
	Benjamin Herrenschmidt <benh@kernel.crashing.org>,
	Catalin Marinas <catalin.marinas@arm.com>,
	Fenghua Yu <fenghua.yu@intel.com>,
	"H. Peter Anvin" <hpa@zytor.com>, Ingo Molnar <mingo@kernel.org>,
	Ivan Kokshaysky <ink@jurassic.park.msu.ru>,
	James Hogan <jhogan@kernel.org>,
	Kees Cook <keescook@chromium.org>,
	Matt Turner <mattst88@gmail.com>,
	Michael Ellerman <mpe@ellerman.id.au>,
	Paul Mackerras <paulus@samba.org>,
	Ralf Baechle <ralf@linux-mips.org>,
	Richard Henderson <rth@twiddle.net>,
	Rich Felker <dalias@libc.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Tony Luck <tony.luck@intel.com>,
	Will Deacon <will.deacon@arm.com>,
	x86@kernel.org, Yoshinori Sato <ysato@users.sourceforge.>
Subject: [RFC PATCH 00/11] prctl: Modernise wiring for optional prctl() calls
Date: Mon, 14 May 2018 18:14:16 +0100	[thread overview]
Message-ID: <1526318067-4964-1-git-send-email-Dave.Martin@arm.com> (raw)

[Reviewer note: this is a cross-arch series.  To reduce spam, I have
tried not to Cc people on patches they aren't likely to care about.
The complete series can be found in the LKML or linux-arch archives.]

The core framework for the prctl() syscall is unloved and looking
rather crusty these days.  It also relies on defining ancillary
boilerplate macros for each prctl() in order to control conditional
compilation of the different prctl calls.  We have better ways to
do this now.

This series attempts to modernise the code by defining a couple of new
Kconfig variables HAVE_PRCTL_ARCH and HAVE_ARCH_PR_SET_GET_UNALIGN to
allow architectures to provide hooks for arch-dependent prctls.


For now this series has had minimal testing: some basic testing of
arch-specific prctls using PR_SVE_SET_VL on arm64; build-tested on
x86; otherwise untested.

This is not polished yet... but I'm interested to know what people
think about the approach.

Cheers
---Dave


Dave Martin (11):
  prctl: Support movement of arch prctls out of common code
  arm64: Move arch-specific prctls out of core code
  MIPS: Remove unused task argument from prctl functions
  MIPS: Move arch-specific prctls out of core code
  x86: Move arch-specific prctls out of core code
  powerpc: Remove unused task argument from prctl functions
  powerpc: Move arch-specific prctls out of core code
  ia64: Remove unused task argument from prctl functions
  ia64: Move arch-specific prctls out of core code
  prctl: Remove redundant task argument from PR_{SET,GET}_UNALIGN
    backends
  prctl: Refactor PR_{SET,GET}_UNALIGN to reduce boilerplate

 arch/Kconfig                         |   6 ++
 arch/alpha/Kconfig                   |   1 +
 arch/alpha/include/asm/thread_info.h |  23 --------
 arch/alpha/kernel/Makefile           |   2 +-
 arch/alpha/kernel/sys.c              |  36 ++++++++++++
 arch/arm64/Kconfig                   |   1 +
 arch/arm64/include/asm/processor.h   |   4 --
 arch/arm64/kernel/sys.c              |  15 +++++
 arch/ia64/Kconfig                    |   2 +
 arch/ia64/include/asm/processor.h    |  24 --------
 arch/ia64/kernel/sys_ia64.c          |  37 ++++++++++++
 arch/mips/Kconfig                    |   1 +
 arch/mips/include/asm/processor.h    |   3 -
 arch/mips/kernel/process.c           |  23 ++++----
 arch/mips/kernel/syscall.c           |  15 +++++
 arch/parisc/Kconfig                  |   1 +
 arch/parisc/include/asm/processor.h  |  14 -----
 arch/parisc/kernel/sys_parisc.c      |  15 +++++
 arch/powerpc/Kconfig                 |   2 +
 arch/powerpc/include/asm/processor.h |  20 ++-----
 arch/powerpc/kernel/process.c        |  38 ++++++------
 arch/powerpc/kernel/syscalls.c       |  17 ++++++
 arch/sh/Kconfig                      |   1 +
 arch/sh/include/asm/processor.h      |   7 ---
 arch/sh/mm/alignment.c               |  12 ++--
 arch/x86/Kconfig                     |   1 +
 arch/x86/include/asm/processor.h     |   6 --
 arch/x86/kernel/Makefile             |   1 +
 arch/x86/kernel/sys.c                |  26 +++++++++
 include/linux/prctl.h                |  27 +++++++++
 include/uapi/linux/prctl.h           |   6 +-
 kernel/sys.c                         | 110 ++++-------------------------------
 tools/include/uapi/linux/prctl.h     |   6 +-
 33 files changed, 263 insertions(+), 240 deletions(-)
 create mode 100644 arch/alpha/kernel/sys.c
 create mode 100644 arch/x86/kernel/sys.c
 create mode 100644 include/linux/prctl.h

-- 
2.1.4

             reply	other threads:[~2018-05-14 17:14 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-14 17:14 Dave Martin [this message]
2018-05-14 17:14 ` [RFC PATCH 00/11] prctl: Modernise wiring for optional prctl() calls Dave Martin
2018-05-14 17:14 ` [RFC PATCH 01/11] prctl: Support movement of arch prctls out of common code Dave Martin
2018-05-14 17:14   ` Dave Martin
2018-05-21 18:28   ` Will Deacon
2018-05-14 17:14 ` [RFC PATCH 02/11] arm64: Move arch-specific prctls out of core code Dave Martin
2018-05-21 18:30   ` Will Deacon
2018-05-14 17:14 ` [RFC PATCH 03/11] MIPS: Remove unused task argument from prctl functions Dave Martin
2018-05-14 17:14 ` [RFC PATCH 04/11] MIPS: Move arch-specific prctls out of core code Dave Martin
2018-05-14 17:14 ` [RFC PATCH 05/11] x86: " Dave Martin
2018-05-14 17:14 ` [RFC PATCH 06/11] powerpc: Remove unused task argument from prctl functions Dave Martin
2018-05-15  3:05   ` Michael Ellerman
2018-05-14 17:14 ` [RFC PATCH 07/11] powerpc: Move arch-specific prctls out of core code Dave Martin
2018-05-15  3:06   ` Michael Ellerman
2018-05-14 17:14 ` [RFC PATCH 08/11] ia64: Remove unused task argument from prctl functions Dave Martin
2018-05-14 17:14 ` [RFC PATCH 09/11] ia64: Move arch-specific prctls out of core code Dave Martin
2018-05-14 17:14 ` [RFC PATCH 10/11] prctl: Remove redundant task argument from PR_{SET,GET}_UNALIGN backends Dave Martin
2018-05-14 17:14 ` [RFC PATCH 11/11] prctl: Refactor PR_{SET,GET}_UNALIGN to reduce boilerplate Dave Martin
2018-05-14 18:28 ` [RFC PATCH 00/11] prctl: Modernise wiring for optional prctl() calls Kees Cook
2018-05-14 18:28   ` Kees Cook
2018-05-15 13:30   ` Dave Martin
2018-05-15 13:30     ` Dave Martin

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=1526318067-4964-1-git-send-email-Dave.Martin@arm.com \
    --to=dave.martin@arm.com \
    --cc=akpm@linux-foundation.org \
    --cc=benh@kernel.crashing.org \
    --cc=catalin.marinas@arm.com \
    --cc=dalias@libc.org \
    --cc=fenghua.yu@intel.com \
    --cc=hpa@zytor.com \
    --cc=ink@jurassic.park.msu.ru \
    --cc=jhogan@kernel.org \
    --cc=keescook@chromium.org \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mattst88@gmail.com \
    --cc=mingo@kernel.org \
    --cc=mpe@ellerman.id.au \
    --cc=paulus@samba.org \
    --cc=ralf@linux-mips.org \
    --cc=rth@twiddle.net \
    --cc=tglx@linutronix.de \
    --cc=tony.luck@intel.com \
    --cc=will.deacon@arm.com \
    --cc=x86@kernel.org \
    --cc=ysato@users.sourceforge.jp \
    /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.