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: <1411105858-21120-4-git-send-email-tytso@mit.edu>
Date:	Fri, 19 Sep 2014 01:50:58 -0400
From:	Theodore Ts'o <tytso@....edu>
To:	Ext4 Developers List <linux-ext4@...r.kernel.org>
Cc:	Theodore Ts'o <tytso@....edu>
Subject: [PATCH 4/4] e2fsck: use ext2fs_get_mem() instad of ext2fs_get_memalign()

There is no reason to request a aligned buffer in
check_{inode,block}_bitmap, and this will cause failures for dietlibc,
which doesn't have support for posix_memalign() or any other way to
request an aligned memory allocation.  Fortunately, this is only
needed in very few places where direct I/O is required.

Signed-off-by: Theodore Ts'o <tytso@....edu>
---
 e2fsck/pass5.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/e2fsck/pass5.c b/e2fsck/pass5.c
index 86ac9fd..8d6032b 100644
--- a/e2fsck/pass5.c
+++ b/e2fsck/pass5.c
@@ -99,8 +99,7 @@ static void check_inode_bitmap_checksum(e2fsck_t ctx)
 		return;
 
 	nbytes = (size_t)(EXT2_INODES_PER_GROUP(ctx->fs->super) / 8);
-	retval = ext2fs_get_memalign(ctx->fs->blocksize, ctx->fs->blocksize,
-				     &buf);
+	retval = ext2fs_get_mem(ctx->fs->blocksize, &buf);
 	if (retval) {
 		com_err(ctx->program_name, 0, "%s",
 		    _("check_inode_bitmap_checksum: Memory allocation error"));
@@ -155,8 +154,7 @@ static void check_block_bitmap_checksum(e2fsck_t ctx)
 		return;
 
 	nbytes = (size_t)(EXT2_CLUSTERS_PER_GROUP(ctx->fs->super) / 8);
-	retval = ext2fs_get_memalign(ctx->fs->blocksize, ctx->fs->blocksize,
-				     &buf);
+	retval = ext2fs_get_mem(ctx->fs->blocksize, &buf);
 	if (retval) {
 		com_err(ctx->program_name, 0, "%s",
 		    _("check_block_bitmap_checksum: Memory allocation error"));
-- 
2.1.0

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