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: <20081106220954.GM18939@mit.edu>
Date:	Thu, 6 Nov 2008 17:09:54 -0500
From:	Theodore Tso <tytso@....edu>
To:	"Aneesh Kumar K.V" <aneesh.kumar@...ux.vnet.ibm.com>
Cc:	cmm@...ibm.com, sandeen@...hat.com, linux-ext4@...r.kernel.org
Subject: Re: [RFC PATCH -V3 1/9] ext4: sparse fixes

On Fri, Nov 07, 2008 at 12:19:26AM +0530, Aneesh Kumar K.V wrote:
>  #define EXT4_HAS_COMPAT_FEATURE(sb,mask)			\
> -	(EXT4_SB(sb)->s_es->s_feature_compat & cpu_to_le32(mask))
> +	(le32_to_cpu(EXT4_SB(sb)->s_es->s_feature_compat) & mask)
>  #define EXT4_HAS_RO_COMPAT_FEATURE(sb,mask)			\
> -	(EXT4_SB(sb)->s_es->s_feature_ro_compat & cpu_to_le32(mask))
> +	(le32_to_cpu(EXT4_SB(sb)->s_es->s_feature_ro_compat) & mask)
>  #define EXT4_HAS_INCOMPAT_FEATURE(sb,mask)			\
> -	(EXT4_SB(sb)->s_es->s_feature_incompat & cpu_to_le32(mask))
> +	(le32_to_cpu(EXT4_SB(sb)->s_es->s_feature_incompat) & mask)

This is going to force a byte-swap instruction on every single
big-endian system out there, which could potentially be costly, or at
least undeed given that all of the times that these functions are
called, the result gets used only as a booelan.

Can we shut up sparse by using a explicit cast to an unsigned int?

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