linux-user patches for 2.3-rc1
From: Riku Voipio <[email protected]>
The following changes since commit 3c6c9fe034c0c07b77f272e4a53d7735220a16a4:
Merge remote-tracking branch 'remotes/ehabkost/tags/x86-pull-request' into staging (2015-03-20 12:26:09 +0000)
are available in the git repository at:
git://git.linaro.org/people/riku.voipio/qemu.git tags/pull-linux-user-20150323
for you to fetch changes up to 61c7480fa36775cc2baa2f8141f0c64a15f827b5:
linux-user: fix broken cpu_copy() (2015-03-23 15:26:42 +0200)
----------------------------------------------------------------
linux-user patches for 2.3-rc1
----------------------------------------------------------------
Andreas Schwab (1):
linux-user: fix emulation of splice syscall
Chen Gang S (1):
linux-user/main.c: Remove redundant end_exclusive() in
arm_kernel_cmpxchg64_helper()
Leon Alrae (1):
linux-user: fix broken cpu_copy()
linux-user/main.c | 4 +--- linux-user/syscall.c | 22 ++++++++++++++++++---- 2 files changed, 19 insertions(+), 7 deletions(-)
Signature · 1 line
2.1.4
[Qemu-devel] [PULL 1/3] linux-user/main.c: Remove redundant end_exclusive() in arm_kernel_cmpxchg64_helper()
From: Chen Gang S <[email protected]>
start/end_exclusive() need be pairs, except the start_exclusive() in stop_all_tasks() which is only used by force_sig(), which will be abort. So at present, start_exclusive() in stop_all_task() need not be paired.
queue_signal() may call force_sig(), or return after kill pid (or queue signal). If could return from queue_signal(), stop_all_task() would not be called in time, the next end_exclusive() would be issue.
So in arm_kernel_cmpxchg64_helper() for ARM, need remove end_exclusive() after queue_signal(). The related commit: "97cc756 linux-user: Implement new ARM 64 bit cmpxchg kernel helper".
--- linux-user/main.c | 2 -- 1 file changed, 2 deletions(-)
linux-user/main.c +0 -2
@@ -525,8 +525,6 @@ segv: info.si_code =TARGET_SEGV_MAPERR ; info._sifields._sigfault._addr = env->exception.vaddress;queue_signal (env, info.si_signo, &info); - -end_exclusive (); }/* Handle a jump to the kernel code page. */
Signature · 1 line
2.1.4
[Qemu-devel] [PULL 2/3] linux-user: fix emulation of splice syscall
In reply to [email protected]From: Andreas Schwab <[email protected]>
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.
--- linux-user/syscall.c | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-)
linux-user/syscall.c +18 -4
@@ -9351,15 +9351,29 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1, {loff_t loff_in, loff_out;loff_t *ploff_in =NULL , *ploff_out =NULL ; -if (arg2) { -get_user_u64 (loff_in, arg2); +if (arg2) { +if (get_user_u64 (loff_in, arg2)) { + goto efault; + } ploff_in = &loff_in; } -if (arg4) { -get_user_u64 (loff_out, arg2); +if (arg4) { +if (get_user_u64 (loff_out, arg4)) { + goto efault; + } ploff_out = &loff_out; } ret =get_errno (splice (arg1, ploff_in, arg3, ploff_out, arg5, arg6)); +if (arg2) { +if (put_user_u64 (loff_in, arg2)) { + goto efault; + } + } +if (arg4) { +if (put_user_u64 (loff_out, arg4)) { + goto efault; + } + } }break ;#endif
Signature · 1 line
2.1.4
[Qemu-devel] [PULL 3/3] linux-user: fix broken cpu_copy()
In reply to [email protected]From: Leon Alrae <[email protected]>
New threads always point at the same env which is incorrect and usually leads to a crash.
--- linux-user/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
linux-user/main.c +1 -1
@@ -3451,7 +3451,7 @@ CPUArchState *cpu_copy(CPUArchState *env) {CPUState *cpu =ENV_GET_CPU (env);CPUState *new_cpu =cpu_init (cpu_model); -CPUArchState *new_env = cpu->env_ptr; +CPUArchState *new_env = new_cpu->env_ptr;CPUBreakpoint *bp;CPUWatchpoint *wp;
Signature · 1 line
2.1.4
Peter Maydell
AppliedQuoted 10 lines · On 23 March 2015 at 13:54, <[email protected]> wrote:
From: Riku Voipio <[email protected]>
The following changes since commit
3c6c9fe034c0c07b77f272e4a53d7735220a16a4:Merge remote-tracking branch 'remotes/ehabkost/tags/x86-pull-request' into staging (2015-03-20 12:26:09 +0000)
are available in the git repository at:
git://git.linaro.org/people/riku.voipio/qemu.gittags/pull-linux-user-20150323
Quoted 8 lines
for you to fetch changes up to
61c7480fa36775cc2baa2f8141f0c64a15f827b5:linux-user: fix broken
cpu_copy()(2015-03-23 15:26:42 +0200)----------------------------------------------------------------
linux-user patches for 2.3-rc1----------------------------------------------------------------
Applied, thanks.
-- PMM