[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL v2 07/17] signal/all/do_sigaltstack remove __get_user
From: |
riku . voipio |
Subject: |
[Qemu-devel] [PULL v2 07/17] signal/all/do_sigaltstack remove __get_user value check |
Date: |
Tue, 17 Jun 2014 17:56:50 +0300 |
From: Riku Voipio <address@hidden>
Access is already checked in the lock_user_struct
call before.
Signed-off-by: Riku Voipio <address@hidden>
Reviewed-by: Peter Maydell <address@hidden>
---
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 2a1c681..f55076d 100644
--- a/linux-user/signal.c
+++ b/linux-user/signal.c
@@ -619,11 +619,12 @@ abi_long do_sigaltstack(abi_ulong uss_addr, abi_ulong
uoss_addr, abi_ulong sp)
struct target_sigaltstack ss;
ret = -TARGET_EFAULT;
- if (!lock_user_struct(VERIFY_READ, uss, uss_addr, 1)
- || __get_user(ss.ss_sp, &uss->ss_sp)
- || __get_user(ss.ss_size, &uss->ss_size)
- || __get_user(ss.ss_flags, &uss->ss_flags))
+ if (!lock_user_struct(VERIFY_READ, uss, uss_addr, 1)) {
goto out;
+ }
+ __get_user(ss.ss_sp, &uss->ss_sp);
+ __get_user(ss.ss_size, &uss->ss_size);
+ __get_user(ss.ss_flags, &uss->ss_flags);
unlock_user_struct(uss, uss_addr, 0);
ret = -TARGET_EPERM;
--
2.0.0.rc2
- [Qemu-devel] [PULL v2 17/17] User mode support for Linux ELF files with no section header, (continued)
- [Qemu-devel] [PULL v2 17/17] User mode support for Linux ELF files with no section header, riku . voipio, 2014/06/17
- [Qemu-devel] [PULL v2 08/17] signal/all/do_sigreturn - remove __get_user checks, riku . voipio, 2014/06/17
- [Qemu-devel] [PULL v2 16/17] linux-user: Return correct errno for unsupported netlink socket, riku . voipio, 2014/06/17
- [Qemu-devel] [PULL v2 03/17] signal/all: remove return value from copy_siginfo_to_user, riku . voipio, 2014/06/17
- [Qemu-devel] [PULL v2 01/17] signal/all: remove __get/__put_user return value reading, riku . voipio, 2014/06/17
- [Qemu-devel] [PULL v2 14/17] linux-user/uname: Return correct uname string for x86_64, riku . voipio, 2014/06/17
- [Qemu-devel] [PULL v2 11/17] signal/sparc64_set_context: remove __get_user checks, riku . voipio, 2014/06/17
- [Qemu-devel] [PULL v2 09/17] signal/all/setup_frame remove __put_user checks, riku . voipio, 2014/06/17
- [Qemu-devel] [PULL v2 13/17] linux-user: fix gcc-4.9 compiler error on __{get, put]}_user, riku . voipio, 2014/06/17
- [Qemu-devel] [PULL v2 15/17] linux-user: Don't overrun guest buffer in sched_getaffinity, riku . voipio, 2014/06/17
- [Qemu-devel] [PULL v2 07/17] signal/all/do_sigaltstack remove __get_user value check,
riku . voipio <=
- [Qemu-devel] [PULL v2 06/17] signal/sparc/restore_fpu_state: remove, riku . voipio, 2014/06/17
- [Qemu-devel] [PULL v2 05/17] signal/all: remove return value from restore_sigcontext, riku . voipio, 2014/06/17
- Re: [Qemu-devel] [PULL v2 00/17] linux-user updates, Peter Maydell, 2014/06/17