lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1459240534-8658-3-git-send-email-matt.redfearn@imgtec.com>
Date:	Tue, 29 Mar 2016 09:35:30 +0100
From:	Matt Redfearn <matt.redfearn@...tec.com>
To:	<IMG-MIPSLinuxKerneldevelopers@...tec.com>
CC:	Matt Redfearn <matt.redfearn@...tec.com>,
	Paul Burton <paul.burton@...tec.com>,
	<linux-mips@...ux-mips.org>, <linux-kernel@...r.kernel.org>,
	Amanieu d'Antras <amanieu@...il.com>,
	"Ralf Baechle" <ralf@...ux-mips.org>,
	Alex Smith <alex.smith@...tec.com>,
	"Andrew Morton" <akpm@...ux-foundation.org>
Subject: [PATCH v2 2/6] MIPS: Support sending SIG_SYS to 32bit userspace from 64bit kernel

The seccomp_bpf self test revealed that a 64bit kernel delivered an
invalid SIG_SYS to a 32bit userspace, because it was falling into the
default of the switch statement. Add a case to handle delivering the
signal.

With this patch, the seccomp_bpf self test now passes the TRAP.handler
case with O32 and N32 userlands.

Signed-off-by: Matt Redfearn <matt.redfearn@...tec.com>
Cc: Paul Burton <paul.burton@...tec.com>
Cc: linux-mips@...ux-mips.org
---

Changes in v2: None

 arch/mips/kernel/signal32.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/arch/mips/kernel/signal32.c b/arch/mips/kernel/signal32.c
index 4909639aa35b..78c8349d151c 100644
--- a/arch/mips/kernel/signal32.c
+++ b/arch/mips/kernel/signal32.c
@@ -227,6 +227,12 @@ int copy_siginfo_to_user32(compat_siginfo_t __user *to, const siginfo_t *from)
 			err |= __put_user(from->si_uid, &to->si_uid);
 			err |= __put_user(from->si_int, &to->si_int);
 			break;
+		case __SI_SYS >> 16:
+			err |= __copy_to_user(&to->si_call_addr, &from->si_call_addr,
+					      sizeof(compat_uptr_t));
+			err |= __put_user(from->si_syscall, &to->si_syscall);
+			err |= __put_user(from->si_arch, &to->si_arch);
+			break;
 		}
 	}
 	return err;
-- 
2.5.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ