]> Git Repo - qemu.git/commit - linux-user/sparc/target_syscall.h
linux-user: Use correct target SHMLBA in shmat()
authorPeter Maydell <[email protected]>
Mon, 11 Jul 2016 15:48:11 +0000 (16:48 +0100)
committerRiku Voipio <[email protected]>
Wed, 21 Sep 2016 11:28:52 +0000 (14:28 +0300)
commitee8e76141b4dd00f8e97fda274876a17f9a46bbe
tree97fad83fed31bae2f164c1a525e13b468e12cfbc
parent0ef9ea290ed9319cb788ea40be06dd18b32ba05a
linux-user: Use correct target SHMLBA in shmat()

The shmat() handling needs to do target-specific handling
of the attach address for shmat():
 * if the SHM_RND flag is passed, the address is rounded
   down to a SHMLBA boundary
 * if SHM_RND is not passed, then the call is failed EINVAL
   if the address is not a multiple of SHMLBA

Since SHMLBA is target-specific, we need to do this
checking and rounding in QEMU and can't leave it up to the
host syscall.

Allow targets to define TARGET_FORCE_SHMLBA and provide
a target_shmlba() function if appropriate, and update
do_shmat() to honour them.

Signed-off-by: Peter Maydell <[email protected]>
Signed-off-by: Riku Voipio <[email protected]>
linux-user/arm/target_syscall.h
linux-user/mips/target_syscall.h
linux-user/mips64/target_syscall.h
linux-user/sh4/target_syscall.h
linux-user/sparc/target_syscall.h
linux-user/syscall.c
This page took 0.025658 seconds and 4 git commands to generate.