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: <20070126184942.GP17836@stusta.de>
Date:	Fri, 26 Jan 2007 19:49:42 +0100
From:	Adrian Bunk <bunk@...sta.de>
To:	Eyal Lebedinsky <eyal@...l.emu.id.au>,
	Mark Fasheh <mark.fasheh@...cle.com>
Cc:	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	kurt.hackel@...cle.com, ocfs2-devel@....oracle.com
Subject: [2.6 patch] fix OCFS2 compile error

On Fri, Jan 26, 2007 at 01:22:34PM +1100, Eyal Lebedinsky wrote:
> I should have added that this is on Debian stable:
> 	$ gcc --version
> 	gcc (GCC) 3.3.5 (Debian 1:3.3.5-13)
> 
> Eyal Lebedinsky wrote:
> > i386
> > Practically all modules selected.
> > 
> >   Building modules, stage 2.
> >   MODPOST 1931 modules
>...
> > WARNING: "__udivdi3" [fs/ocfs2/ocfs2.ko] undefined!
> > make[1]: *** [__modpost] Error 1

Thanks for your report.

I don't know why gcc 3.3 generates this now since ocfs2_backup_super_blkno()
seems to be unused, but there is a bug for 32 bit systems that should be 
fixed:

Commit 50af94b14c98f5769860a282a397c6f3b135c8a8 adds:
  offset /= sb->s_blocksize;

That is:
  u64 = u64 / long

Not a problem on 64bit architectures, but obviously a problem on 32 bit 
architectures.

This patch fixes it by using sb->s_blocksize_bits instead of sb->s_blocksize.

Signed-off-by: Adrian Bunk <bunk@...sta.de>

--- a/fs/ocfs2/ocfs2_fs.h
+++ b/fs/ocfs2/ocfs2_fs.h
@@ -587,7 +587,7 @@ static inline u64 ocfs2_backup_super_blkno(struct super_block *sb, int index)
 
 	if (index >= 0 && index < OCFS2_MAX_BACKUP_SUPERBLOCKS) {
 		offset <<= (2 * index);
-		offset /= sb->s_blocksize;
+		offset >>= sb->s_blocksize_bits;
 		return offset;
 	}
 


-
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