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: <20101018134127.5d1264fb@notabene>
Date:	Mon, 18 Oct 2010 13:41:27 +1100
From:	Neil Brown <neilb@...e.de>
To:	Akinobu Mita <akinobu.mita@...il.com>
Cc:	linux-kernel@...r.kernel.org, linux-arch@...r.kernel.org,
	Arnd Bergmann <arnd@...db.de>,
	Christoph Hellwig <hch@...radead.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	linux-raid@...r.kernel.org
Subject: Re: [PATCH 18/22] md: use little endian bit operations

On Fri, 15 Oct 2010 18:46:17 +0900
Akinobu Mita <akinobu.mita@...il.com> wrote:

> As a preparation for removing ext2 non-atomic bit operations from
> asm/bitops.h. This converts ext2 non-atomic bit operations to
> little endian bit operations.

Looks good, thanks.

Acked-by: NeilBrown <neilb@...e.de>

NeilBrown

> 
> Signed-off-by: Akinobu Mita <akinobu.mita@...il.com>
> Cc: Neil Brown <neilb@...e.de>
> Cc: linux-raid@...r.kernel.org
> ---
>  drivers/md/bitmap.c |    6 +++---
>  1 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/md/bitmap.c b/drivers/md/bitmap.c
> index e4fb58d..2a37051 100644
> --- a/drivers/md/bitmap.c
> +++ b/drivers/md/bitmap.c
> @@ -850,7 +850,7 @@ static void bitmap_file_set_bit(struct bitmap *bitmap, sector_t block)
>  		if (bitmap->flags & BITMAP_HOSTENDIAN)
>  			set_bit(bit, kaddr);
>  		else
> -			ext2_set_bit(bit, kaddr);
> +			__test_and_set_le_bit(bit, kaddr);
>  		kunmap_atomic(kaddr, KM_USER0);
>  		PRINTK("set file bit %lu page %lu\n", bit, page->index);
>  	}
> @@ -1046,7 +1046,7 @@ static int bitmap_init_from_disk(struct bitmap *bitmap, sector_t start)
>  		if (bitmap->flags & BITMAP_HOSTENDIAN)
>  			b = test_bit(bit, paddr);
>  		else
> -			b = ext2_test_bit(bit, paddr);
> +			b = test_le_bit(bit, paddr);
>  		kunmap_atomic(paddr, KM_USER0);
>  		if (b) {
>  			/* if the disk bit is set, set the memory bit */
> @@ -1222,7 +1222,7 @@ void bitmap_daemon_work(mddev_t *mddev)
>  						clear_bit(file_page_offset(bitmap, j),
>  							  paddr);
>  					else
> -						ext2_clear_bit(file_page_offset(bitmap, j),
> +						__test_and_clear_le_bit(file_page_offset(bitmap, j),
>  							       paddr);
>  					kunmap_atomic(paddr, KM_USER0);
>  				} else

--
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