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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Pine.LNX.4.64.0610141123580.3952@g5.osdl.org>
Date:	Sat, 14 Oct 2006 11:32:09 -0700 (PDT)
From:	Linus Torvalds <torvalds@...l.org>
To:	Al Viro <viro@....linux.org.uk>
cc:	swhiteho@...hat.com, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] gfs2 endianness bug: be16 assigned to be32 field



On Sat, 14 Oct 2006, Al Viro wrote:
>
> -	leaf->lf_dirent_format = cpu_to_be16(GFS2_FORMAT_DE);
> +	leaf->lf_dirent_format = cpu_to_be32(GFS2_FORMAT_DE);

Hmm. Doesn't this change the on-disk format on a LE machine (eg x86)?

In other words, this change makes me nervous. A quick grep seems to 
indicate that nothing actually _uses_ this field, so maybe we don't really 
care, but I think we should double-check that this is what the GFS2 people 
really want.

If we don't want to change the format on a LE machine, then maybe the 
gfs2_leaf structure should be changed to be

	..
	__be16 lf_dirent_format;
	__be16 lf_unused;
	..

which should keep the bits in the same position on LE.

Regardless, the old code was clearly wrong, since it gives different 
on-disk format for a big-endian and a little-endian machine. Al's fix is 
proper, but perhaps people would prefer something that breaks the BE 
format rather than the LE format. Hmm?

Steven?

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