[Qemu-devel] [PATCH 09/13] signal.c: setup_frame remove __put_user checks

2014-04-23 Thread riku . voipio
From: Riku Voipio Remove "if(__put_user" checks and their related error paths for all architecture's setup_frame, setup_rt_frame and similar. Remove the unlock_user_struct when the only way to end up there is from failed lock_user_struct. Remove err variable if there are no user

[Qemu-devel] [PATCH 00/13] __{get,put}_user return value cleanup

2014-04-23 Thread riku . voipio
From: Riku Voipio This series is primarily motivated to have a gcc-4.9 buildfix: linux-user/syscall.c: In function ‘host_to_target_stat64’: linux-user/qemu.h:301:19: error: right-hand operand of comma expression has no effect [-Werror=unused-value] ((hptr), (x)), 0) removing the unused

[Qemu-devel] [PATCH 04/13] signal.c: remove return value from setup_sigcontext

2014-04-23 Thread riku . voipio
From: Riku Voipio Make all implementations of setup_sigcontext void and remove checking it's return value from functions calling setup_sigcontext. Signed-off-by: Riku Voipio --- linux-user/signal.c | 65 + 1 file changed, 21 inser

[Qemu-devel] [PATCH 01/13] signal.c: remove __get/__put_user return value reading

2014-04-23 Thread riku . voipio
From: Riku Voipio Remove all the simple cases or reading the return value of __get_user and __put_user. We set err = 0 in sparc versions of do_sigreturn and sparc64_set_context to avoid compile error, but else this patch is just the removal of err |= __get_user ... idiom. Signed-off-by: Riku

[Qemu-devel] [PATCH 05/13] signal.c: remove return value from restore_sigcontext

2014-04-23 Thread riku . voipio
From: Riku Voipio make most implementations of restore_sigcontext void and remove checking it's return value from functions calling restore_sigcontext. The exception is the X86 version of the function that is too different from others to deal in this way. Signed-off-by: Riku Voipio ---

[Qemu-devel] [PATCH 08/13] do_sigreturn - remove __get_user checks

2014-04-23 Thread riku . voipio
From: Riku Voipio Remove "if(__get_user" checks and their related error paths for all architecture's do_sigreturn. Remove the unlock_user_struct when the only way to end up there is from failed lock_user_struct. Signed-off-by: Riku Voipio --- linux-use

[Qemu-devel] [PATCH 13/13] fix gcc-4.9 compiler error on __{get, put]}_user

2014-04-23 Thread riku . voipio
From: Riku Voipio gcc-4.9 finds unused operand: linux-user/syscall.c: In function ‘host_to_target_stat64’: linux-user/qemu.h:301:19: error: right-hand operand of comma expression has no effect [-Werror=unused-value] ((hptr), (x)), 0) Just removing the rh operand is no good, it will error

[Qemu-devel] [PATCH 10/13] remove __put/get error checks from ppc {save, restore}_user_regs

2014-04-23 Thread riku . voipio
From: Riku Voipio As __get_user and __put_user do not return errors, remove the if checks from around them. This allows making the save/restore functions void. Signed-off-by: Riku Voipio Cc: Alexander Graf --- linux-user/signal.c | 126 +--- 1

[Qemu-devel] [PATCH 11/13] sparc64_set_context: remove __get_user checks

2014-04-23 Thread riku . voipio
From: Riku Voipio Remove checks of __get_user and the err variable used to control flow with it. Signed-off-by: Riku Voipio --- linux-user/signal.c | 12 +++- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/linux-user/signal.c b/linux-user/signal.c index efb3562..487fa2f

Re: [Qemu-devel] [PATCH 00/13] __{get, put}_user return value cleanup

2014-04-23 Thread Riku Voipio
On Wed, Apr 23, 2014 at 02:22:32PM +0100, Peter Maydell wrote: > On 23 April 2014 14:11, wrote: > > From: Riku Voipio > > > > This series is primarily motivated to have a gcc-4.9 buildfix: > > > > linux-user/syscall.c: In function ‘host_to_target_stat64’: &g

Re: [Qemu-devel] [PATCH 1/2] linux-user: Move if-elses to a switch statement

2014-04-27 Thread Riku Voipio
Hi, On Fri, Apr 25, 2014 at 02:42:14PM +0100, Huw Davies wrote: > > This makes adding more message types cleaner. > > > > Signed-off-by: Huw Davies > > --- > > linux-user/syscall.c | 51 > > +-- > > 1 file changed, 33 insertions(+), 18 deletions(

Re: [Qemu-devel] [PATCH] linux-user: Assert stack used for auxvec, envp, argv

2014-05-02 Thread Riku Voipio
& argv > > exactly matches the amount allocated. This catches if DLINFO_ITEMS isn't > > updated when another NEW_AUX_ENT is added. > > > > Signed-off-by: James Hogan > > Cc: Riku Voipio > > Cc: Peter Maydell > > --- > > This should be applie

Re: [Qemu-devel] [PATCH] linux-user/signal.c: Set fault address in AArch64 signal info

2014-05-02 Thread Riku Voipio
t.pc); > __put_user(pstate_read(env), &sf->uc.tuc_mcontext.pstate); > > -__put_user(/*current->thread.fault_address*/ 0, > -&sf->uc.tuc_mcontext.fault_address); > +__put_user(env->exception.vaddress, > &sf->uc.tuc_mcontext.fault_address); > > for (i = 0; i < TARGET_NSIG_WORDS; i++) { > __put_user(set->sig[i], &sf->uc.tuc_sigmask.sig[i]); > -- > 1.9.2 > > -- > Riku Voipio

Re: [Qemu-devel] [PATCH 5/5] linux-user/signal.c: define __SIGRTMIN/MAX for non-GNU platforms

2014-05-02 Thread Riku Voipio
On Tue, Apr 29, 2014 at 10:06:31PM +0200, Natanael Copa wrote: > On Tue, 29 Apr 2014 09:02:13 -0600 > Eric Blake wrote: > > > On 04/29/2014 08:53 AM, Natanael Copa wrote: > > > On Tue, 29 Apr 2014 08:28:29 -0600 > > > Eric Blake wrote: > > > > > >> On 04/29/2014 08:17 AM, Natanael Copa wrote: >

[Qemu-devel] [PULL 06/14] linux-user: avoid using glibc internals in _syscall5 and in definition of target_sigevent struct

2014-05-02 Thread riku . voipio
: Natanael Copa Signed-off-by: Riku Voipio Reviewed-by: Peter Maydell --- linux-user/syscall.c | 2 +- linux-user/syscall_defs.h | 16 +++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 15de6f8..af0bb35 100644 --- a

[Qemu-devel] [PULL 01/14] linux-user: Add /proc/self/exe open forwarding

2014-05-02 Thread riku . voipio
From: Maxim Ostapenko QEMU already supports /proc/self/{maps,stat,auxv} so addition of /proc/self/exe is rather trivial. Fixes https://bugs.launchpad.net/qemu/+bug/1299190 Signed-off-by: Maxim Ostapenko Reviewed-by: Peter Maydell Signed-off-by: Riku Voipio --- linux-user/syscall.c | 5

[Qemu-devel] [PULL 03/14] linux-user: Move if-elses to a switch statement.

2014-05-02 Thread riku . voipio
From: Huw Davies This makes adding more message types cleaner. Signed-off-by: Huw Davies Signed-off-by: Riku Voipio --- linux-user/syscall.c | 51 +-- 1 file changed, 33 insertions(+), 18 deletions(-) diff --git a/linux-user/syscall.c b/linux

[Qemu-devel] [PULL 14/14] linux-user/elfload.c: Support ARM HWCAP2 flags

2014-05-02 Thread riku . voipio
From: Peter Maydell The ARM kernel has chosen to spill into the HWCAP2 ELF feature bit flags early, even though it hasn't yet exhausted all 32 bits of the HWCAP word. Add support for setting this in the same way we do for HWCAP. Signed-off-by: Peter Maydell Signed-off-by: Riku V

[Qemu-devel] [PULL 05/14] linux-user: Handle arches with llseek instead of _llseek

2014-05-02 Thread riku . voipio
, defining TARGET_NR__llseek as TARGET_NR_llseek. Signed-off-by: James Hogan Cc: Riku Voipio Cc: Jia Liu Signed-off-by: Riku Voipio --- linux-user/syscall.c | 5 + 1 file changed, 5 insertions(+) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 27073b1..15de6f8 100644 --- a

[Qemu-devel] [PULL 08/14] linux-user: rename cpu-uname -> uname

2014-05-02 Thread riku . voipio
From: Riku Voipio To move more uname related functions out of syscall.c, rename cpu-uname.{c,h} to uname.{c.h} Signed-off-by: Riku Voipio --- linux-user/Makefile.objs | 2 +- linux-user/cpu-uname.c | 72 linux-user/cpu-uname.h | 1

[Qemu-devel] [PULL 07/14] linux-user/signal.c: Set fault address in AArch64 signal info

2014-05-02 Thread riku . voipio
From: Peter Maydell Set the fault address correctly in the signal information passed to a signal handler for AArch64 guests. Signed-off-by: Peter Maydell Signed-off-by: Riku Voipio --- linux-user/signal.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/linux-user

[Qemu-devel] [PULL 10/14] linux-user: remove configure option for setting uname release

2014-05-02 Thread riku . voipio
From: Riku Voipio --enable-uname-release was a rather heavyweight hammer, as it allows providing values less that UNAME_MINIMUM_RELEASE. Also, it affects all built linux-user targets, which in most cases is not what user wants. Now that we have UNAME_MINIMUM_RELEASE for all linux-user platforms

[Qemu-devel] [PULL 09/14] linux-user: move uname functions to uname.c

2014-05-02 Thread riku . voipio
From: Riku Voipio Make syscall.c slightly smaller by moving uname-related functions to uname.c. Signed-off-by: Riku Voipio --- linux-user/syscall.c | 102 --- linux-user/uname.c | 101 ++ linux

[Qemu-devel] [PULL 04/14] linux-user: Add support for SCM_CREDENTIALS.

2014-05-02 Thread riku . voipio
From: Huw Davies Signed-off-by: Huw Davies Signed-off-by: Riku Voipio --- linux-user/syscall.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 52bd000..27073b1 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c

[Qemu-devel] [PULL 00/14] linux-user update

2014-05-02 Thread riku . voipio
From: Riku Voipio The following changes since commit fdaad4715ae9e998fd0595bedfb16fdaf0c68ccc: Merge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20140501' into staging (2014-05-02 11:32:00 +0100) are available in the git repository at: http://git.linaro.org/

[Qemu-devel] [PULL 13/14] linux-user/elfload.c: Fix A64 code which was incorrectly acting like A32

2014-05-02 Thread riku . voipio
. Fix this by properly separating the 64 and 32 bit code, since they have more differences than similarities. Signed-off-by: Peter Maydell Cc: qemu-sta...@nongnu.org Signed-off-by: Riku Voipio --- linux-user/elfload.c | 86 1 file changed, 73

[Qemu-devel] [PULL 12/14] linux-user/elfload.c: Update ARM HWCAP bits

2014-05-02 Thread riku . voipio
ter Maydell Cc: qemu-sta...@nongnu.org Signed-off-by: Riku Voipio --- linux-user/elfload.c | 22 -- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/linux-user/elfload.c b/linux-user/elfload.c index 18ea1b3..d372300 100644 --- a/linux-user/elfload.c +++ b/linux

[Qemu-devel] [PULL 02/14] linux-user: Assert stack used for auxvec, envp, argv

2014-05-02 Thread riku . voipio
From: James Hogan Assert that the amount of stack space used for auxvec, envp & argv exactly matches the amount allocated. This catches if DLINFO_ITEMS isn't updated when another NEW_AUX_ENT is added. Signed-off-by: James Hogan Cc: Riku Voipio Cc: Peter Maydell Signed-off-by: Ri

[Qemu-devel] [PULL 11/14] linux-user/elfload.c: Fix incorrect ARM HWCAP bits

2014-05-02 Thread riku . voipio
that weird hardware, so it's otherwise uninteresting to us.) Cc: qemu-sta...@nongnu.org Signed-off-by: Peter Maydell Signed-off-by: Riku Voipio --- linux-user/elfload.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/linux-user/elfload.c b/linux-user/elflo

Re: [Qemu-devel] [PATCH] linux-user: fix getrusage and wait4 failures with invalid rusage struct

2014-05-05 Thread Riku Voipio
Hi, Thanks, looks good and fixes getrusage02 ltp test. Added to the linux-user que: https://git.linaro.org/people/riku.voipio/qemu.git/shortlog/refs/heads/linux-user-for-upstream Peter, do you prefer a new pull request for linux-user with this patch added on top, or is pulling the updated branc

[Qemu-devel] [PULL v2 00/15] linux-user update

2014-05-05 Thread riku . voipio
From: Riku Voipio The following changes since commit fdaad4715ae9e998fd0595bedfb16fdaf0c68ccc: Merge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20140501' into staging (2014-05-02 11:32:00 +0100) are available in the git repository at: http://git.linaro.org/

Re: [Qemu-devel] [PULL v2 00/15] linux-user update

2014-05-05 Thread Riku Voipio
On 5 May 2014 16:02, Peter Maydell wrote: > On 5 May 2014 13:34, wrote: > > From: Riku Voipio > > > > The following changes since commit > fdaad4715ae9e998fd0595bedfb16fdaf0c68ccc: > > > > Merge remote-tracking branch > 'remotes/pmaydell/tags/pul

Re: [Qemu-devel] [PATCH 3/4] linux-user: set minimum kernel version to2.6.322

2014-03-06 Thread Riku Voipio
On 4 March 2014 13:41, Peter Maydell wrote: > On 4 March 2014 11:32, Alex Bennée wrote: > > Is the effect of this to report system uname or minimum whichever is higher? > > That's what this patch does. The old configure stuff which > this patchset removed made it report "always that version", > I

Re: [Qemu-devel] [PATCH 3/4] linux-user: set minimum kernel version to2.6.322

2014-03-10 Thread Riku Voipio
On 7 March 2014 10:45, Peter Maydell wrote: >> On 7 March 2014 02:19, Riku Voipio wrote: > > So you agree these patches are the way to go? > I haven't actually reviewed them but I think the idea is right, > yes. With the hard freeze getting close, and me being away u

[Qemu-devel] [PATCH 3/8] linux-user: Don't use UID16 on AArch64

2014-03-10 Thread riku . voipio
From: Andreas Schwab The AArch64 kernel defines its __kernel_uid_t type as 32 bits, unlike 32 bit ARM, so don't enable our 16-bit UID wrapper handling. Signed-off-by: Andreas Schwab Signed-off-by: Peter Maydell Signed-off-by: Riku Voipio Reviewed-by: Richard Henderson --- linux

[Qemu-devel] [PATCH 2/8] linux-user: AArch64: Implement SA_RESTORER for signal handlers

2014-03-10 Thread riku . voipio
From: Michael Matz Implement support for signal handlers with the SA_RESTORER flag set. Signed-off-by: Michael Matz [PMM: minor tweaks to make patch apply to current master] Signed-off-by: Peter Maydell Signed-off-by: Riku Voipio Reviewed-by: Richard Henderson --- linux-user/signal.c | 16

[Qemu-devel] [PATCH 1/8] linux-user/signal.c: Fix AArch64 big-endian FP register restore

2014-03-10 Thread riku . voipio
From: Peter Maydell Fix the loop restoring the FP registers from the signal frame to match the one used when setting up the signal frame, so that it handles TARGET_WORDS_BIGENDIAN being set. Signed-off-by: Peter Maydell Signed-off-by: Riku Voipio Reviewed-by: Richard Henderson --- linux

[Qemu-devel] [PATCH 6/8] linux-user: translate signal number on return from sigtimedwait

2014-03-10 Thread riku . voipio
From: Petar Jovanovic On success, sigtimedwait() returns a signal number that needs to be translated from a host value to a target value. This change also fixes issues with sigwait (that is implemented using sigtimedwait()). Signed-off-by: Petar Jovanovic Signed-off-by: Riku Voipio Reviewed

[Qemu-devel] [PATCH 4/8] linux-user: Fix getresuid, getresgid if !USE_UID16

2014-03-10 Thread riku . voipio
Signed-off-by: Peter Maydell Signed-off-by: Riku Voipio Reviewed-by: Andreas Färber Reviewed-by: Richard Henderson --- linux-user/syscall.c | 18 -- 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 1407b7a..ccdbc4e

[Qemu-devel] [PATCH 8/8] linux-user: set minimum kernel version to 2.6.32

2014-03-10 Thread riku . voipio
From: Riku Voipio Popular glibc based distributions[1] require minimum 2.6.32 as kernel version. For some targets 2.6.18 would be enough, but dropping so low would mean some suboptimal system calls could get used. Set the minimum kernel advertized to 2.6.32 for all architectures but aarch64 to

[Qemu-devel] [PATCH 7/8] linux-user: correct handling of break exception for MIPS

2014-03-10 Thread riku . voipio
From: Petar Jovanovic Exception with break instruction has not been correctly propagated as SIGTRAP. This resolves crash issues with examples that use break instruction on MIPS. Signed-off-by: Petar Jovanovic Signed-off-by: Riku Voipio --- linux-user/main.c | 4 1 file changed, 4

[Qemu-devel] [PATCH 5/8] linux-user: Implement sendmmsg syscall

2014-03-10 Thread riku . voipio
cking operations); cap the vector length as the kernel implementation does; don't lock guest memory twice; support MSG_WAITFORONE flag] Signed-off-by: Peter Maydell Signed-off-by: Riku Voipio Reviewed-by: Richard Henderson --- linux-user/syscall.c

[Qemu-devel] [PULL 0/8] linux-user update for 2.0

2014-03-10 Thread riku . voipio
From: Riku Voipio The following changes since commit d844a7b6569fb2b5252773444b18841426e5b906: modules: Fix building with --enable-modules (2014-02-28 12:30:13 +) are available in the git repository at: git://git.linaro.org/people/riku.voipio/qemu.git linux-user-for-upstream for you

Re: [Qemu-devel] [PATCH] linux-user: Don't reserve space for commpage for AArch64

2014-03-12 Thread Riku Voipio
On Mon, Mar 10, 2014 at 12:59:17PM +, Peter Maydell wrote: > AArch64 Linux, unlike AArch32, doesn't use a commpage. This means we > should not be reserving room in the guest address space for one. > Fixes LP:1287195. Looks good, Reviewed-by: Riku Voipio > Reported-by:

Re: [Qemu-devel] [ANNOUNCE] QEMU 2.0.0-rc0 is now available

2014-03-14 Thread Riku Voipio
On Thu, Mar 13, 2014 at 08:19:48PM -0700, Anthony Liguori wrote: > Please add entries to the ChangeLog for the 2.0 release below: > http://wiki.qemu.org/ChangeLog/Next I could do some updates for linux-user - but how does one get an account to edit on wiki.l.o ? Riku

Re: [Qemu-devel] [PATCH] linux-user: Implement capget, capset

2014-03-17 Thread Riku Voipio
On Fri, Mar 14, 2014 at 06:10:50PM +, Peter Maydell wrote: > Implement the capget and capset syscalls. This is useful because > simple programs like 'ls' try to use it in AArch64 I'm not seing this with ubuntu trusty, wookeys debian or my static busybox. Where is your ls from? Also, runnning q

[Qemu-devel] [PATCH] linux-user: don't warn on missing capget/capset

2014-03-17 Thread riku . voipio
From: Riku Voipio some people get numerous unimplemented capget/capset warnings. Since qemu linux-user is not secure to begin with, just skip the system call warning for now. Proper capset/capget to be added in Qemu 2.1 Signed-off-by: Riku Voipio --- linux-user/syscall.c | 4 ++-- 1 file

Re: [Qemu-devel] [PATCH v2] linux-user: Implement capget, capset

2014-03-17 Thread Riku Voipio
On Mon, Mar 17, 2014 at 12:15:35PM +, Peter Maydell wrote: > Implement the capget and capset syscalls. This is useful because > simple programs like 'ls' try to use it in AArch64, and otherwise > we emit a lot of noise about it being unimplemented. > Signed-off-by: Peter Maydell > --- > Chan

Re: [Qemu-devel] [PATCH] linux-user: don't warn on missing capget/capset

2014-03-17 Thread Riku Voipio
On 17 March 2014 22:17, Andreas Färber wrote: > Am 17.03.2014 12:55, schrieb riku.voi...@linaro.org: > > From: Riku Voipio > > > > some people get numerous unimplemented capget/capset warnings. Since qemu > > linux-user is not secure to begin with, just skip the syst

[Qemu-devel] [PULL for-2.0 5/7] signal: added a wrapper for sigprocmask function

2014-03-19 Thread riku . voipio
-provided signal masks.] Signed-off-by: Peter Maydell Signed-off-by: Riku Voipio --- linux-user/qemu.h| 1 + linux-user/signal.c | 58 ++-- linux-user/syscall.c | 14 ++--- 3 files changed, 42 insertions(+), 31 deletions(-) diff --git a/linux

[Qemu-devel] [PULL for-2.0 0/7] linux-user patches

2014-03-19 Thread riku . voipio
From: Riku Voipio The following changes since commit 6fffa26244737f8fd8641a21fee29bd6aa9fdff5: Merge remote-tracking branch 'remotes/mjt/tags/trivial-patches-2014-03-15' into staging (2014-03-15 18:22:11 +) are available in the git repository at: git://git.linaro.

[Qemu-devel] [PULL for-2.0 4/7] linux-user: Don't reserve space for commpage for AArch64

2014-03-19 Thread riku . voipio
From: Peter Maydell AArch64 Linux, unlike AArch32, doesn't use a commpage. This means we should not be reserving room in the guest address space for one. Fixes LP:1287195. Reported-by: Amanieu d'Antras Signed-off-by: Peter Maydell Signed-off-by: Riku Voipio --- linux-user/elf

[Qemu-devel] [PULL for-2.0 6/7] linux-user: Don't allow guest to block SIGSEGV

2014-03-19 Thread riku . voipio
ch is based on an idea by Alex Barcelo, but rather than simply lying to the guest about the SIGSEGV state we track it. Signed-off-by: Peter Maydell Reported-by: Alex Barcelo Signed-off-by: Riku Voipio --- linux-user/qemu.h | 1 + linux-user/signal.c

[Qemu-devel] [PULL for-2.0 7/7] linux-user: Implement capget, capset

2014-03-19 Thread riku . voipio
From: Peter Maydell Implement the capget and capset syscalls. This is useful because simple programs like 'ls' try to use it in AArch64, and otherwise we emit a lot of noise about it being unimplemented. Signed-off-by: Peter Maydell Signed-off-by: Riku Voipio --- linux-user

[Qemu-devel] [PULL for-2.0 1/7] linux-user/signal.c: Correct error path for AArch64 do_rt_sigreturn

2014-03-19 Thread riku . voipio
nothing). Signed-off-by: Peter Maydell Signed-off-by: Riku Voipio --- linux-user/signal.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linux-user/signal.c b/linux-user/signal.c index 24c91f3..209855e 100644 --- a/linux-user/signal.c +++ b/linux-user/signal.c @@ -1340,7 +1340,7

[Qemu-devel] [PULL for-2.0 3/7] linux-user: implement F_[GS]ETOWN_EX

2014-03-19 Thread riku . voipio
From: Andreas Schwab F_GETOWN is replaced by F_GETOWN_EX inside the glibc fcntl wrapper Signed-off-by: Andreas Schwab Signed-off-by: Riku Voipio --- linux-user/syscall.c | 36 linux-user/syscall_defs.h | 7 +++ 2 files changed, 43 insertions

[Qemu-devel] [PULL for-2.0 2/7] linux-user: Don't return uninitialized value for atomic_barrier syscall

2014-03-19 Thread riku . voipio
From: Peter Maydell QEMU's implementation of the m68k atomic_barrier syscall, like the kernel's, is just a no-op. However we still need to return a result code from it. Signed-off-by: Peter Maydell Signed-off-by: Riku Voipio --- linux-user/syscall.c | 1 + 1 file changed, 1

[Qemu-devel] [PULL 03/11] linux-user/arm/nwfpe: Delete unused aCC array

2015-01-27 Thread riku . voipio
From: Peter Maydell The aCC array in fpopcode.c is completely unused in QEMU; delete it (silencing a clang warning). Signed-off-by: Peter Maydell Signed-off-by: Riku Voipio --- linux-user/arm/nwfpe/fpopcode.c | 22 -- 1 file changed, 22 deletions(-) diff --git a/linux

[Qemu-devel] [PULL 11/11] linux-user: support target-to-host SCM_CREDENTIALS

2015-01-27 Thread riku . voipio
From: Alex Suykov When passing ancillary data through a unix socket, handle credentials properly instead of doing a simple copy and issuing a warning. Signed-off-by: Alex Suykov Signed-off-by: Riku Voipio --- linux-user/syscall.c | 18 ++ 1 file changed, 14 insertions(+), 4

[Qemu-devel] [PULL 02/11] linux-user/alpha: Add define for NR_shmat to enable shmat syscall

2015-01-27 Thread riku . voipio
chard Henderson Signed-off-by: Peter Maydell Signed-off-by: Riku Voipio --- linux-user/alpha/syscall_nr.h | 4 1 file changed, 4 insertions(+) diff --git a/linux-user/alpha/syscall_nr.h b/linux-user/alpha/syscall_nr.h index 625f301..dde8d5c 100644 --- a/linux-user/alpha/syscall_nr.h +++ b/l

[Qemu-devel] [PULL 09/11] mips64-linux-user: Fix definition of struct sigaltstack

2015-01-27 Thread riku . voipio
From: Ed Swierk Without this fix, qemu segfaults when emulating the sigaltstack syscall, because it incorrectly treats the ss_flags field as 64 bits rather than 32 bits. Signed-off-by: Ed Swierk Signed-off-by: Riku Voipio --- linux-user/mips64/target_signal.h | 2 +- 1 file changed, 1

[Qemu-devel] [PULL 01/11] linux-user/signal.c: Remove current_exec_domain_sig()

2015-01-27 Thread riku . voipio
mains will be better served by adding the correct code from scratch based on the kernel sources at that time. This change also fixes some clang warnings about the function being defined but not used for some target architectures. Signed-off-by: Peter Maydell Signed-off-by: Riku Voipio --- linu

[Qemu-devel] [PULL 10/11] linux-user: Fix broken m68k signal handling on 64 bit hosts

2015-01-27 Thread riku . voipio
e intended retaddr+0,retaddr+2, resulting in a guest crash when it tried to execute the invalid zero-bytes at retaddr+0. Fix by using uint32_t instead; also use uint16_t rather than short for consistency. This fixes bug LP:1404690. Reported-by: Michel Boaventura Signed-off-by: Peter Maydell Signed-of

[Qemu-devel] [PULL 04/11] linux-user/main.c: Call cpu_exec_start/end on all target archs

2015-01-27 Thread riku . voipio
ned-off-by: Riku Voipio --- linux-user/main.c | 18 ++ 1 file changed, 18 insertions(+) diff --git a/linux-user/main.c b/linux-user/main.c index 8c70be4..95e8a51 100644 --- a/linux-user/main.c +++ b/linux-user/main.c @@ -283,7 +283,9 @@ void cpu_loop(CPUX86State *env) target_sigi

[Qemu-devel] [PULL 00/11] linux-user-updates

2015-01-27 Thread riku . voipio
From: Riku Voipio The following changes since commit b00c92e3ef59b78f6029d66353aaf995ceaa6605: Merge remote-tracking branch 'remotes/mst/tags/for_upstream' into staging (2015-01-27 13:17:30 +) are available in the git repository at: git://git.linaro.org/people/riku.voipi

[Qemu-devel] [PULL 08/11] linux-user: Fix ioctl cmd type mismatch on 64-bit targets

2015-01-27 Thread riku . voipio
, causing the comparison to fail and resulting in lots of spurious "Unsupported ioctl" errors. Changing the target_cmd field in the ioctl_entries list to a signed int causes those values to be sign-extended as well during the comparison. Signed-off-by: Ed Swierk Signed-off-by: Riku Voipio

[Qemu-devel] [PULL 05/11] linux-user/main.c: Mark end_exclusive() as possibly unused

2015-01-27 Thread riku . voipio
From: Peter Maydell The function end_exclusive() isn't used on all targets; mark it as such to avoid a clang warning. Signed-off-by: Peter Maydell Signed-off-by: Riku Voipio --- linux-user/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linux-user/main.c b/

[Qemu-devel] [PULL 06/11] linux-user/signal.c: Remove unnecessary wrapper copy_siginfo_to_user

2015-01-27 Thread riku . voipio
configs. Signed-off-by: Peter Maydell Signed-off-by: Riku Voipio --- linux-user/signal.c | 28 +++- 1 file changed, 11 insertions(+), 17 deletions(-) diff --git a/linux-user/signal.c b/linux-user/signal.c index fa955ef..8065710 100644 --- a/linux-user/signal.c +++ b

[Qemu-devel] [PULL 07/11] linux-user: translate resource also for prlimit64

2015-01-27 Thread riku . voipio
From: Felix Janda The resource argument is translated from host to target for [gs]etprlimit but not for prlimit64. Fix this. Signed-off-by: Felix Janda Signed-off-by: Riku Voipio --- linux-user/syscall.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/linux-user

Re: [Qemu-devel] [PATCH] linux-user/syscall.c: Let all lock_user_struct() and unlock_user_struct() paired with each other

2015-01-28 Thread Riku Voipio
Hi, First of all, thanks Chen for taking time to improve the linux-user codebase in qemu! On Mon, Jan 26, 2015 at 03:01:52PM +, Peter Maydell wrote: > On 26 January 2015 at 14:59, Chen Gang S wrote: > > On 1/26/15 06:10, Peter Maydell wrote: > >> I would just like the commit message to be cl

Re: [Qemu-devel] [PATCH] linux-user: fix broken cpu_copy()

2015-03-23 Thread Riku Voipio
On Monday, March 23, 2015 3:02:29 PM EET, Andreas Färber wrote: Am 23.03.2015 um 13:55 schrieb Leon Alrae: New threads always point at the same env which is incorrect and usually leads to a crash. Signed-off-by: Leon Alrae --- Hi, ... Clearly my fault and might explain some breakage in our

[Qemu-devel] [PULL 2/2] linux-user: Fix up timer id handling

2015-03-23 Thread riku . voipio
t_timer_id typedef that is s32, just like Linux has it. It also changes the magic offset to a value that makes all timer ids be positive. Reported-by: Tom Musta Signed-off-by: Alexander Graf Reviewed-by: Peter Maydell Reviewed-by: Tom Musta Tested-by: Tom Musta Signed-off-by: Riku Voipio ---

[Qemu-devel] [PULL 1/3] linux-user/main.c: Remove redundant end_exclusive() in arm_kernel_cmpxchg64_helper()

2015-03-23 Thread riku . voipio
RM 64 bit cmpxchg kernel helper". Signed-off-by: Chen Gang Signed-off-by: Riku Voipio --- linux-user/main.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/linux-user/main.c b/linux-user/main.c index 6e446de..31eb60f 100644 --- a/linux-user/main.c +++ b/linux-user/main.c @@ -525,8 +525

[Qemu-devel] [PULL 0/3] linux-user patches for 2.3-rc1

2015-03-23 Thread riku . voipio
From: Riku Voipio The following changes since commit 3c6c9fe034c0c07b77f272e4a53d7735220a16a4: Merge remote-tracking branch 'remotes/ehabkost/tags/x86-pull-request' into staging (2015-03-20 12:26:09 +) are available in the git repository at: git://git.linaro.org/people/r

[Qemu-devel] [PULL 2/3] linux-user: fix emulation of splice syscall

2015-03-23 Thread riku . voipio
From: Andreas Schwab The second and fourth argument are in/out parameters, store them back after the syscall. Also, the fourth argument was mishandled, and EFAULT handling was missing. Signed-off-by: Andreas Schwab Reviewed-by: Peter Maydell Signed-off-by: Riku Voipio --- linux-user

[Qemu-devel] [PULL 1/2] linux-user: Do not subtract offset from end address

2015-03-23 Thread riku . voipio
From: Tom Musta When computing the upper address of a program segment, do not subtract the offset from the virtual address; instead compute the sum of the virtual address and the memory size. Signed-off-by: Tom Musta Signed-off-by: Riku Voipio --- linux-user/elfload.c | 2 +- 1 file changed

[Qemu-devel] [PULL 3/3] linux-user: fix broken cpu_copy()

2015-03-23 Thread riku . voipio
From: Leon Alrae New threads always point at the same env which is incorrect and usually leads to a crash. Signed-off-by: Leon Alrae Reviewed-by: Andreas Färber Signed-off-by: Riku Voipio --- linux-user/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linux-user

Re: [Qemu-devel] [PULL 2/2] linux-user: Fix up timer id handling

2015-03-23 Thread Riku Voipio
Hi, Sorry for these two patches, please ignore. Riku

Re: [Qemu-devel] [PATCH 0/6] linux-user: Fix various clang warnings

2015-01-21 Thread Riku Voipio
Hi, On Tue, Jan 20, 2015 at 02:54:20PM +, Peter Maydell wrote: > Ping! I've just updated my linux-user-for-upstream tree. I'll get it reviewed/tested tonight. > thanks > -- PMM > > On 8 January 2015 at 12:19, Peter Maydell wrote: > > This patchset fixes warnings produced by clang in the li

Re: [Qemu-devel] [PATCH] linux-user: Do not subtract offset from end address

2014-11-06 Thread Riku Voipio
On Thu, Nov 06, 2014 at 01:43:13PM -0600, Tom Musta wrote: > When computing the upper address of a program segment, do not subtract the > offset from the virtual address; instead compute the sum of the virtual > address > and the memory size. Thanks, I'll test this and try to get it applied ASAP.

[Qemu-devel] [PULL 1/2] linux-user: Do not subtract offset from end address

2014-11-10 Thread riku . voipio
From: Tom Musta When computing the upper address of a program segment, do not subtract the offset from the virtual address; instead compute the sum of the virtual address and the memory size. Signed-off-by: Tom Musta Signed-off-by: Riku Voipio --- linux-user/elfload.c | 2 +- 1 file changed

[Qemu-devel] [PULL 0/2] linux-user fixes after -rc0

2014-11-10 Thread riku . voipio
From: Riku Voipio The following changes since commit 558c2c8ddfb165a36eb95dc93125c04829d68aa7: Merge remote-tracking branch 'remotes/kevin/tags/for-upstream' into staging (2014-11-10 16:28:51 +) are available in the git repository at: git://git.linaro.org/people/riku.voipi

[Qemu-devel] [PULL 2/2] linux-user: Fix up timer id handling

2014-11-10 Thread riku . voipio
t_timer_id typedef that is s32, just like Linux has it. It also changes the magic offset to a value that makes all timer ids be positive. Reported-by: Tom Musta Signed-off-by: Alexander Graf Reviewed-by: Peter Maydell Reviewed-by: Tom Musta Tested-by: Tom Musta Signed-off-by: Riku Voipio ---

Re: [Qemu-devel] [PATCH] linux-user/uname: Return correct uname string for x86_64

2014-06-05 Thread Riku Voipio
Hi, On Tue, Jun 03, 2014 at 03:07:59PM +0100, Peter Maydell wrote: > Ping! Looks good, I'll collect this and other linux-user patches and submit linux-user update by tomorrow. Riku > thanks > -- PMM > > On 10 May 2014 12:25, Peter Maydell wrote: > > We were returning the incorrect uname stri

Re: [Qemu-devel] [PATCH v2] linux-user/signal.c: define __SIGRTMIN/MAX for non-GNU platforms

2014-06-06 Thread Riku Voipio
Hi, On Wed, Jun 04, 2014 at 09:49:00AM +0200, Natanael Copa wrote: > The __SIGRTMIN and __SIGRTMAX are glibc internals and are not available > on all platforms, so we define those if they are missing. We also check > that those corresponds with the posix variables SIGRTMIN/SIGRTMAX which > may onl

Re: [Qemu-devel] [PATCH] linux-user/uname: Return correct uname string for x86_64

2014-06-06 Thread Riku Voipio
On Thu, Jun 05, 2014 at 02:21:42PM +0100, Peter Maydell wrote: > On 5 June 2014 14:11, Riku Voipio wrote: > > Hi, > > > > On Tue, Jun 03, 2014 at 03:07:59PM +0100, Peter Maydell wrote: > >> Ping! > > > > Looks good, I'll collect this and other linux

[Qemu-devel] [PATCH v2 04/13] signal/all: remove return value from setup_sigcontext

2014-06-06 Thread riku . voipio
From: Riku Voipio Make all implementations of setup_sigcontext void and remove checking it's return value from functions calling setup_sigcontext. Signed-off-by: Riku Voipio --- linux-user/signal.c | 65 + 1 file changed, 21 inser

[Qemu-devel] [PATCH v2 10/13] signal/ppc/{save, restore}_user_regs remove __put/get error checks

2014-06-06 Thread riku . voipio
From: Riku Voipio As __get_user and __put_user do not return errors, remove the if checks from around them. This allows making the save/restore functions void. Signed-off-by: Riku Voipio Cc: Alexander Graf --- linux-user/signal.c | 126 +--- 1

[Qemu-devel] [PATCH v2 08/13] signal/all/do_sigreturn - remove __get_user checks

2014-06-06 Thread riku . voipio
From: Riku Voipio Remove "if(__get_user" checks and their related error paths for all architecture's do_sigreturn. Remove the unlock_user_struct when the only way to end up there is from failed lock_user_struct. Signed-off-by: Riku Voipio --- linux-use

[Qemu-devel] [PATCH v2 05/13] signal/all: remove return value from restore_sigcontext

2014-06-06 Thread riku . voipio
From: Riku Voipio make most implementations of restore_sigcontext void and remove checking it's return value from functions calling restore_sigcontext. The exception is the X86 version of the function that is too different from others to deal in this way. Signed-off-by: Riku Voipio ---

[Qemu-devel] [PATCH v2 01/13] signal/all: remove __get/__put_user return value reading

2014-06-06 Thread riku . voipio
From: Riku Voipio Remove all the simple cases of reading the return value of __get_user and __put_user. We set err = 0 in sparc versions of do_sigreturn and sparc64_set_context to avoid compile error, but else this patch is just general removal of err |= __get_user ... idiom. Signed-off-by

[Qemu-devel] [PATCH v2 09/13] signal/all/setup_frame remove __put_user checks

2014-06-06 Thread riku . voipio
From: Riku Voipio Remove "if(__put_user" checks and their related error paths for all architecture's setup_frame, setup_rt_frame and similar. Remove the unlock_user_struct when the only way to end up there is from failed lock_user_struct. Remove err variable if there are no user

[Qemu-devel] [PATCH v2 02/13] signal/x86/setup_frame: __put_user cleanup

2014-06-06 Thread riku . voipio
From: Riku Voipio Remove the remaining check for __put_user return value, and all the checks for err variable which isn't set anywhere anymore. No we can only end up in give_sigsegv due to failed lock_user_struct - thus we remove the unlock_user_struct to avoid unlocking a region never l

[Qemu-devel] [PATCH v2 13/13] linux-user: fix gcc-4.9 compiler error on __{get, put]}_user

2014-06-06 Thread riku . voipio
From: Riku Voipio gcc-4.9 finds unused operand: linux-user/syscall.c: In function ‘host_to_target_stat64’: linux-user/qemu.h:301:19: error: right-hand operand of comma expression has no effect [-Werror=unused-value] ((hptr), (x)), 0) Just removing the rh operand is no good, it will error

[Qemu-devel] [PATCH v2 03/13] signal/all: remove return value from copy_siginfo_to_user

2014-06-06 Thread riku . voipio
From: Riku Voipio Since copy_siginfo_to_user always returns 0, make it void and remove any checks for return value from calling functions. Signed-off-by: Riku Voipio --- linux-user/signal.c | 28 +--- 1 file changed, 9 insertions(+), 19 deletions(-) diff --git a/linux

[Qemu-devel] [PATCH v2 06/13] signal/sparc/restore_fpu_state: remove

2014-06-06 Thread riku . voipio
From: Riku Voipio A function never called from anywhere, obviously half-complete. Remove function and if someone wants to complete this, please check the old version out of git history. Signed-off-by: Riku Voipio --- linux-user/signal.c | 37 - 1 file

[Qemu-devel] [PATCH v2 00/13] linux-user: __{get, put}_user return value cleanup

2014-06-06 Thread riku . voipio
From: Riku Voipio This series is a cleanup and gcc-4.9 buildfix: linux-user/syscall.c: In function ‘host_to_target_stat64’: linux-user/qemu.h:301:19: error: right-hand operand of comma expression has no effect [-Werror=unused-value] ((hptr), (x)), 0) removing the unused 0 moves the bar

[Qemu-devel] [PATCH v2 07/13] signal/all/do_sigaltstack remove __get_user value check

2014-06-06 Thread riku . voipio
From: Riku Voipio Access is already checked in the lock_user_struct call before. Signed-off-by: Riku Voipio --- linux-user/signal.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/linux-user/signal.c b/linux-user/signal.c index 91fd27f..56d6e29 100644 --- a/linux

[Qemu-devel] [PATCH v2 12/13] signal/ppc/do_setcontext remove __get_user return check

2014-06-06 Thread riku . voipio
From: Riku Voipio The last remaining check for return value of __get_user. Signed-off-by: Riku Voipio Cc: Alexander Graf --- linux-user/signal.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/linux-user/signal.c b/linux-user/signal.c index 29d87f9..e47db2c 100644 --- a

[Qemu-devel] [PATCH v2 11/13] signal/sparc64_set_context: remove __get_user checks

2014-06-06 Thread riku . voipio
From: Riku Voipio Remove checks of __get_user and the err variable used to control flow with it. Signed-off-by: Riku Voipio --- linux-user/signal.c | 12 +++- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/linux-user/signal.c b/linux-user/signal.c index 052c03a..29d87f9

<    1   2   3   4   5   6   7   8   9   10   >