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>] [day] [month] [year] [list]
Date:	Thu, 21 Aug 2008 01:15:54 -0500
From:	Eric Sandeen <sandeen@...hat.com>
To:	Martin Schwidefsky <schwidefsky@...ibm.com>
CC:	Jan Glauber <jglauber@...hat.com>,
	ext4 development <linux-ext4@...r.kernel.org>,
	"Josef 'Jeff' Sipek" <jeffpc@...efsipek.net>
Subject: [PATCH] s390: fix ext2_find_next_bit

The following changes get ext4 on s390 up and running for me.

the switch from ffs to __ffs changes where we start counting
(if the first bit is set, is that "0" or "1?"  ext2 wants to 
start counting with "0") and the rest is, honestly, just lifted 
from the stock find_next_bit() implementation.

Signed-off-by: Eric Sandeen <sandeen@...hat.com>
--

Index: linux-2.6/arch/s390/include/asm/bitops.h
===================================================================
--- linux-2.6.orig/arch/s390/include/asm/bitops.h	2008-08-11 16:23:58.000000000 -0500
+++ linux-2.6/arch/s390/include/asm/bitops.h	2008-08-21 00:49:40.950176518 -0500
@@ -862,10 +862,10 @@ static inline int ext2_find_next_bit(voi
 	p = addr + offset / __BITOPS_WORDSIZE;
 	if (bit) {
 		/*
-		 * s390 version of ffz returns __BITOPS_WORDSIZE
-		 * if no zero bit is present in the word.
+		 * s390 version of ffs returns __BITOPS_WORDSIZE
+		 * if no set bit is present in the word.
 		 */
-		set = ffs(__load_ulong_le(p, 0) >> bit) + bit;
+		set = __ffs(__load_ulong_le(p, 0) & (~0UL << bit));
 		if (set >= size)
 			return size + offset;
 		if (set < __BITOPS_WORDSIZE)

--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ