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-next>] [day] [month] [year] [list]
Message-ID: <20090810130142.GA23619@in.ibm.com>
Date:	Mon, 10 Aug 2009 18:31:42 +0530
From:	Dinakar Guniguntala <dino@...ibm.com>
To:	linux-rt-users <linux-rt-users@...r.kernel.org>,
	linux-kernel@...r.kernel.org, Ingo Molnar <mingo@...e.hu>,
	Thomas Gleixner <tglx@...utronix.de>,
	Darren Hart <dvhltc@...ibm.com>
Subject: [PATCH] futex: fix compat_futex to be same as futex for REQUEUE_PI

From: Dinakar Guniguntala <dino@...ibm.com>

Need to add the REQUEUE_PI checks to the compat_sys_futex API as well to
ensure 32 bit requeue's work fine on a 64 bit system.
Patch is against latest tip

Signed-off-by: Dinakar Guniguntala <dino@...ibm.com>
CC: Darren Hart <dvhltc@...ibm.com>

	-Dinakar


 futex_compat.c |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)


diff -X ignore -Nurp linux-tip/kernel/futex_compat.c linux-tip.mod/kernel/futex_compat.c
--- linux-tip/kernel/futex_compat.c	2009-08-10 05:37:17.000000000 -0700
+++ linux-tip.mod/kernel/futex_compat.c	2009-08-10 05:46:42.000000000 -0700
@@ -180,7 +180,8 @@ asmlinkage long compat_sys_futex(u32 __u
 	int cmd = op & FUTEX_CMD_MASK;
 
 	if (utime && (cmd == FUTEX_WAIT || cmd == FUTEX_LOCK_PI ||
-		      cmd == FUTEX_WAIT_BITSET)) {
+		      cmd == FUTEX_WAIT_BITSET ||
+		      cmd == FUTEX_WAIT_REQUEUE_PI)) {
 		if (get_compat_timespec(&ts, utime))
 			return -EFAULT;
 		if (!timespec_valid(&ts))
@@ -191,7 +192,8 @@ asmlinkage long compat_sys_futex(u32 __u
 			t = ktime_add_safe(ktime_get(), t);
 		tp = &t;
 	}
-	if (cmd == FUTEX_REQUEUE || cmd == FUTEX_CMP_REQUEUE)
+	if (cmd == FUTEX_REQUEUE || cmd == FUTEX_CMP_REQUEUE ||
+	    cmd == FUTEX_CMP_REQUEUE_PI || cmd == FUTEX_WAKE_OP)
 		val2 = (int) (unsigned long) utime;
 
 	return do_futex(uaddr, op, val, tp, uaddr2, val2, val3);
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ