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]
Message-Id: <1211306773.5915.174.camel@brick>
Date:	Tue, 20 May 2008 11:06:13 -0700
From:	Harvey Harrison <harvey.harrison@...il.com>
To:	Andrew Morton <akpm@...ux-foundation.org>
Cc:	LKML <linux-kernel@...r.kernel.org>
Subject: [PATCH 17/21] fs: remaining users of aligned-endian get/put helpers

Signed-off-by: Harvey Harrison <harvey.harrison@...il.com>
---
 fs/hfsplus/wrapper.c  |    6 +++---
 fs/isofs/compress.c   |    4 ++--
 fs/partitions/acorn.c |    2 +-
 fs/qnx4/inode.c       |    2 +-
 fs/reiserfs/super.c   |    2 +-
 5 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/fs/hfsplus/wrapper.c b/fs/hfsplus/wrapper.c
index 175d08e..0e2fd86 100644
--- a/fs/hfsplus/wrapper.c
+++ b/fs/hfsplus/wrapper.c
@@ -35,17 +35,17 @@ static int hfsplus_read_mdb(void *bufptr, struct hfsplus_wd *wd)
 	    sig != cpu_to_be16(HFSPLUS_VOLHEAD_SIGX))
 		return 0;
 
-	attrib = be16_to_cpu(*(__be16 *)(bufptr + HFSP_WRAPOFF_ATTRIB));
+	attrib = get_be16(bufptr + HFSP_WRAPOFF_ATTRIB);
 	if (!(attrib & HFSP_WRAP_ATTRIB_SLOCK) ||
 	   !(attrib & HFSP_WRAP_ATTRIB_SPARED))
 		return 0;
 
-	wd->ablk_size = be32_to_cpu(*(__be32 *)(bufptr + HFSP_WRAPOFF_ABLKSIZE));
+	wd->ablk_size = get_be32(bufptr + HFSP_WRAPOFF_ABLKSIZE);
 	if (wd->ablk_size < HFSPLUS_SECTOR_SIZE)
 		return 0;
 	if (wd->ablk_size % HFSPLUS_SECTOR_SIZE)
 		return 0;
-	wd->ablk_start = be16_to_cpu(*(__be16 *)(bufptr + HFSP_WRAPOFF_ABLKSTART));
+	wd->ablk_start = get_be16(bufptr + HFSP_WRAPOFF_ABLKSTART);
 
 	extent = get_unaligned_be32(bufptr + HFSP_WRAPOFF_EMBEDEXT);
 	wd->embed_start = (extent >> 16) & 0xFFFF;
diff --git a/fs/isofs/compress.c b/fs/isofs/compress.c
index defb932..d6b9f47 100644
--- a/fs/isofs/compress.c
+++ b/fs/isofs/compress.c
@@ -124,7 +124,7 @@ static int zisofs_readpage(struct file *file, struct page *page)
 			brelse(ptrbh[1]);
 		goto eio;
 	}
-	cstart = le32_to_cpu(*(__le32 *)(bh->b_data + (blockptr & bufmask)));
+	cstart = get_le32(bh->b_data + (blockptr & bufmask));
 
 	if ( indexblocks == 2 ) {
 		/* We just crossed a block boundary.  Switch to the next block */
@@ -136,7 +136,7 @@ static int zisofs_readpage(struct file *file, struct page *page)
 			goto eio;
 		}
 	}
-	cend = le32_to_cpu(*(__le32 *)(bh->b_data + (blockendptr & bufmask)));
+	cend = get_le32(bh->b_data + (blockendptr & bufmask));
 	brelse(bh);
 
 	if (cstart > cend)
diff --git a/fs/partitions/acorn.c b/fs/partitions/acorn.c
index 3d3e166..45cbb3a 100644
--- a/fs/partitions/acorn.c
+++ b/fs/partitions/acorn.c
@@ -344,7 +344,7 @@ static inline int valid_ics_sector(const unsigned char *data)
 	for (i = 0, sum = 0x50617274; i < 508; i++)
 		sum += data[i];
 
-	sum -= le32_to_cpu(*(__le32 *)(&data[508]));
+	sum -= get_le32(&data[508]);
 
 	return sum == 0;
 }
diff --git a/fs/qnx4/inode.c b/fs/qnx4/inode.c
index b31ab78..80872f5 100644
--- a/fs/qnx4/inode.c
+++ b/fs/qnx4/inode.c
@@ -372,7 +372,7 @@ static int qnx4_fill_super(struct super_block *s, void *data, int silent)
 		printk("qnx4: unable to read the superblock\n");
 		goto outnobh;
 	}
-	if ( le32_to_cpup((__le32*) bh->b_data) != QNX4_SUPER_MAGIC ) {
+	if (get_le32(bh->b_data) != QNX4_SUPER_MAGIC) {
 		if (!silent)
 			printk("qnx4: wrong fsid in superblock.\n");
 		goto out;
diff --git a/fs/reiserfs/super.c b/fs/reiserfs/super.c
index ed424d7..d7b0215 100644
--- a/fs/reiserfs/super.c
+++ b/fs/reiserfs/super.c
@@ -221,7 +221,7 @@ static int finish_unfinished(struct super_block *s)
 
 		/* reiserfs_iget needs k_dirid and k_objectid only */
 		item = B_I_PITEM(bh, ih);
-		obj_key.on_disk_key.k_dir_id = le32_to_cpu(*(__le32 *) item);
+		obj_key.on_disk_key.k_dir_id = get_le32(item);
 		obj_key.on_disk_key.k_objectid =
 		    le32_to_cpu(ih->ih_key.k_objectid);
 		obj_key.on_disk_key.k_offset = 0;
-- 
1.5.5.1.570.g26b5e


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