linux-s390.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 0/5] all: s390: make compat wrappers the generic solution
@ 2016-02-26 14:34 Yury Norov
  2016-02-26 14:34 ` [PATCH 3/5] all: s390: move wrapper infrastructure to generic headers Yury Norov
  0 siblings, 1 reply; 16+ messages in thread
From: Yury Norov @ 2016-02-26 14:34 UTC (permalink / raw)
  To: heiko.carstens, arnd, catalin.marinas, linux-kernel, linux-s390,
	linux-arm-kernel, linux-arch, linux-doc
  Cc: Prasun.Kapoor, pinskia, agraf, broonie, joseph,
	christoph.muellner, Nathan_Lynch, klimov.linux, bamvor.zhangjian,
	Yury Norov

The problem that makes us use wrappers is that some compat
architectures allows user code to access top halves of registers.
This is not a problem for syscalls that are already handled by compat
code, or for that who has types of the same size in kernel and
userspace. In case of s390 and lp64/ilp32 the problem is in pointer
types, long, unsigned long.

S390 folks already have the solution for it. In this patchset,
it is turned to be general, as arm64/ilp32 needs it too.

This patchset is created as the part of the work of enabling arm64
with ILP32 user mode. See details here:
http://thread.gmane.org/gmane.linux.kernel/2126946

Acked-by: Heiko Carstens <heiko.carstens@de.ibm.com>

v2:
 This is the implementation of one of two possible approaches. First
 one defines new syscall handler declaration macro, that creates both compat and
 non-compat handlers, see [1]. This one declares all wrappers in separated file
 kernel/compat_wrapper.c

v3: 
 - move 2 s390-related wrappers from kernel/compat_wrappers.h
   to arch/s390/kernel/compat_linux.c
 - comments extended
Build-tested on s390.

[1] http://www.spinics.net/lists/linux-s390/msg11593.html

Yury Norov (5):
  all: syscall wrappers: add documentation
  all: introduce COMPAT_WRAPPER option and enable it for s390
  all: s390: move wrapper infrastructure to generic headers
  all: s390: move compat_wrappers.c from arch/s390/kernel to kernel/
  all: wrap needed syscalls in generic unistd

 Documentation/adding-syscalls.txt |  32 +++++
 arch/Kconfig                      |   4 +
 arch/s390/Kconfig                 |   1 +
 arch/s390/include/asm/compat.h    |  17 ++-
 arch/s390/kernel/Makefile         |   2 +-
 arch/s390/kernel/compat_wrapper.c | 180 ------------------------
 include/linux/compat.h            | 278 ++++++++++++++++++++++++++++++++++++++
 include/linux/syscalls.h          |  57 +-------
 include/linux/syscalls_structs.h  |  60 ++++++++
 include/uapi/asm-generic/unistd.h | 231 +++++++++++++++----------------
 kernel/Makefile                   |   1 +
 kernel/compat_wrapper.c           | 170 +++++++++++++++++++++++
 12 files changed, 680 insertions(+), 353 deletions(-)
 delete mode 100644 arch/s390/kernel/compat_wrapper.c
 create mode 100644 include/linux/syscalls_structs.h
 create mode 100644 kernel/compat_wrapper.c

-- 
2.5.0

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2016-02-26 14:34 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20160224183409.Z0-V7M-5gyw9GvgM_xLdQ4umDDai2oMiIv0Fk768GR0@z>
2016-02-24 18:34 ` [PATCH v2 0/5] all: s390: make compat wrappers the generic solution Yury Norov
     [not found]   ` <20160224183410.akd29iMQICIHfxlkQmUrbv0BbkwUnSqllVoo9539Uuk@z>
2016-02-24 18:34     ` [PATCH 1/5] all: syscall wrappers: add documentation Yury Norov
     [not found]   ` <20160224183411.3BagGddeYJJBc0v0u-1Amx1u8W5aIsKQqzjrVHzAZ30@z>
2016-02-24 18:34     ` [PATCH 2/5] all: introduce COMPAT_WRAPPER option and enable it for s390 Yury Norov
     [not found]       ` <20160225084943.ZpfrJ6W7U0h855DYm2O7Wqn3rOAZwwACqQUBXZBdaoc@z>
2016-02-25  8:49         ` Heiko Carstens
2016-02-25 20:19           ` Yury Norov
2016-02-25 22:10             ` Heiko Carstens
     [not found]   ` <20160224183412.8YANxpFDCCnUfsfbTyfVXmUywYsL-3sq10q8dIhjVLM@z>
2016-02-24 18:34     ` [PATCH 3/5] all: s390: move wrapper infrastructure to generic headers Yury Norov
     [not found]       ` <20160225085140.8i-qLUab7G-KDu0pTBy3oCwiFU7xqNgQRmijv5rIg2c@z>
2016-02-25  8:51         ` Heiko Carstens
2016-02-25 20:23           ` Yury Norov
2016-02-25 22:20             ` Heiko Carstens
     [not found]   ` <20160224183413.dgt96jcRrtBwBfE3KGH7yCzl1FewRaNvzzNuYnSEILI@z>
2016-02-24 18:34     ` [PATCH 4/5] all: s390: move compat_wrappers.c from arch/s390/kernel to kernel/ Yury Norov
     [not found]       ` <20160225085227.nsamepb6Yl6XvLsVRtltlvyh2pXR9iPWoSA4bcom5aw@z>
2016-02-25  8:52         ` Heiko Carstens
2016-02-25 20:27       ` Yury Norov
     [not found]   ` <20160224183414.3tsYWbZu2fuiiwTl6lB_d0tMCpwgBsFNJb7IFy7LECo@z>
2016-02-24 18:34     ` [PATCH 5/5] all: wrap needed syscalls in generic unistd Yury Norov
2016-02-25  8:54   ` [PATCH v2 0/5] all: s390: make compat wrappers the generic solution Heiko Carstens
2016-02-26 14:34 [PATCH v3 " Yury Norov
2016-02-26 14:34 ` [PATCH 3/5] all: s390: move wrapper infrastructure to generic headers Yury Norov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).