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: <20070929050610.GA8880@osiris.ibm.com>
Date:	Sat, 29 Sep 2007 07:06:10 +0200
From:	Heiko Carstens <heiko.carstens@...ibm.com>
To:	Kyle McMartin <kyle@...artin.ca>
Cc:	akpm@...l.org, linux-kernel@...r.kernel.org,
	linux-arch@...r.kernel.org
Subject: Re: [PATCH] Generic compat_sys_fallocate

On Fri, Sep 28, 2007 at 02:11:11PM -0400, Kyle McMartin wrote:
> Basically everyone is using the same sys32_fallocate. Delete a whole bunch of
> archdep code and move the compat wrapper to fs/compat.c
> 
> Signed-off-by: Kyle McMartin <kyle@...artin.ca>
> --- a/arch/sparc64/kernel/sys_sparc32.c
> +++ b/arch/sparc64/kernel/sys_sparc32.c
> @@ -1028,9 +1028,3 @@ long compat_sync_file_range(int fd, unsigned long off_high, unsigned long off_lo
>  				   flags);
>  }
> 
> -asmlinkage long compat_sys_fallocate(int fd, int mode, u32 offhi, u32 offlo,
> -				     u32 lenhi, u32 lenlo)
> -{
> -	return sys_fallocate(fd, mode, ((loff_t)offhi << 32) | offlo,
> -			     ((loff_t)lenhi << 32) | lenlo);
> -}
> diff --git a/arch/x86_64/ia32/sys_ia32.c b/arch/x86_64/ia32/sys_ia32.c
> index bee96d6..ca8deac 100644
> --- a/arch/x86_64/ia32/sys_ia32.c
> +++ b/arch/x86_64/ia32/sys_ia32.c
> @@ -880,10 +880,3 @@ asmlinkage long sys32_fadvise64(int fd, unsigned offset_lo, unsigned offset_hi,
>  				len, advice);
>  }
> 
> -asmlinkage long sys32_fallocate(int fd, int mode, unsigned offset_lo,
> -				unsigned offset_hi, unsigned len_lo,
> -				unsigned len_hi)
> -{
> -	return sys_fallocate(fd, mode, ((u64)offset_hi << 32) | offset_lo,
> -			     ((u64)len_hi << 32) | len_lo);
> -}

These are not identical... the least and most significant parts seem to get
passed in a different way on little and big endian machines.
Maybe it would be worth to have something like compat_merge_64() which does
the right thing?
-
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