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: <20080102020242.GP27566@does.not.exist>
Date:	Wed, 2 Jan 2008 04:02:42 +0200
From:	Adrian Bunk <bunk@...nel.org>
To:	Mike Frysinger <vapier@...too.org>
Cc:	Andrew Morton <akpm@...ux-foundation.org>,
	LKML <linux-kernel@...r.kernel.org>
Subject: Re: [patch] linux/ufs_fs.h: use __u64 for userspace

On Tue, Jan 01, 2008 at 08:51:40PM -0500, Mike Frysinger wrote:
> Fix the ufs_inotofsba macro to use __u64 rather than u64 since this is
> exported to userspace.
> 
> Signed-off-by: Mike Frysinger <vapier@...too.org>
> ---
> diff --git a/include/linux/ufs_fs.h b/include/linux/ufs_fs.h
> index 10b854d..35b6e59 100644
> --- a/include/linux/ufs_fs.h
> +++ b/include/linux/ufs_fs.h
> @@ -225,7 +225,7 @@ typedef __u16 __bitwise __fs16;
>   */
>  #define	ufs_inotocg(x)		((x) / uspi->s_ipg)
>  #define	ufs_inotocgoff(x)	((x) % uspi->s_ipg)
> -#define	ufs_inotofsba(x)	(((u64)ufs_cgimin(ufs_inotocg(x))) + ufs_inotocgoff(x) / uspi->s_inopf)
> +#define	ufs_inotofsba(x)	(((__u64)ufs_cgimin(ufs_inotocg(x))) + ufs_inotocgoff(x) / uspi->s_inopf)
>  #define	ufs_inotofsbo(x)	((x) % uspi->s_inopf)

But userspace anyway can't use them since it doesn't know what "uspi" 
is, so you should better reduce the userspace visibility of this header.

cu
Adrian

-- 

       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed

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