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] [day] [month] [year] [list]
Message-Id: <20100301163754.889bd7a7.akpm@linux-foundation.org>
Date:	Mon, 1 Mar 2010 16:37:54 -0800
From:	Andrew Morton <akpm@...ux-foundation.org>
To:	Evgeniy Dushistov <dushistov@...l.ru>
Cc:	linux-kernel@...r.kernel.org,
	Alex Viskovatoff <viskovatoff@...p.cc>
Subject: Re: [PATCH] ufs: make solaris fsck happy

On Thu, 25 Feb 2010 21:47:43 +0300
Evgeniy Dushistov <dushistov@...l.ru> wrote:

> --- a/fs/ufs/ufs_fs.h
> +++ b/fs/ufs/ufs_fs.h
> @@ -227,11 +227,16 @@ typedef __u16 __bitwise __fs16;
>   */
>  #define ufs_cbtocylno(bno) \
>  	((bno) * uspi->s_nspf / uspi->s_spc)
> -#define ufs_cbtorpos(bno) \
> +#define ufs_cbtorpos(bno)				      \
> +	((UFS_SB(sb)->s_flags & UFS_CG_SUN) ?		      \
> +	 (((((bno) * uspi->s_nspf % uspi->s_spc) %	      \
> +	    uspi->s_nsect) *				      \
> +	   uspi->s_nrpos) / uspi->s_nsect)		      \
> +	 :						      \
>  	((((bno) * uspi->s_nspf % uspi->s_spc / uspi->s_nsect \
>  	* uspi->s_trackskew + (bno) * uspi->s_nspf % uspi->s_spc \
>  	% uspi->s_nsect * uspi->s_interleave) % uspi->s_nsect \
> -	* uspi->s_nrpos) / uspi->s_npsect)
> +	  * uspi->s_nrpos) / uspi->s_npsect))

yikes, that macro should be killed with a stick before it becomes
self-aware and starts breeding.

Or converted into a C function which humans have a chance of
understanding and maintaining.

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