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]
Date:	Mon, 26 Jan 2015 17:31:03 +0000
From:	Catalin Marinas <catalin.marinas@....com>
To:	Andrew Morton <akpm@...ux-foundation.org>
Cc:	"linux-arm-kernel@...ts.infradead.org" 
	<linux-arm-kernel@...ts.infradead.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Arnd Bergmann <arnd@...db.de>
Subject: Re: [PATCH 2/5] syscalls: Declare sys_*stat64 prototypes if
 __ARCH_WANT_(COMPAT_)STAT64

On Fri, Jan 09, 2015 at 03:57:25PM +0000, Catalin Marinas wrote:
> Currently, the sys_stat64, sys_fstat64 and sys_lstat64 prototpyes are
> only declared if BITS_PER_LONG == 32. Following commit 0753f70f07fb
> (fs: Build sys_stat64() and friends if __ARCH_WANT_COMPAT_STAT64), the
> implementation of these functions is allowed on 64-bit systems for
> compat support. The patch changes the condition on the prototype
> declaration from BITS_PER_LONG == 32 to defined(__ARCH_WANT_STAT64) ||
> defined(__ARCH_WANT_COMPAT_STAT64).
> 
> In addition, it moves the sys_fstatat64 prototype under the same #if
> block
> 
> Signed-off-by: Catalin Marinas <catalin.marinas@....com>
> Cc: Andrew Morton <akpm@...ux-foundation.org>
> Cc: Arnd Bergmann <arnd@...db.de>

Andrew,

Are you ok with this patch (and the previous one)? They trivial changes
to add or enable some prototypes. If you are ok with them, I'd like to
push them with the rest of the series via the arm64 tree.

Thanks (patch below for reference).

Catalin

>  include/linux/syscalls.h | 8 +++++---
>  1 file changed, 5 insertions(+), 3 deletions(-)
> 
> diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h
> index 85893d744901..76d1e38aabe1 100644
> --- a/include/linux/syscalls.h
> +++ b/include/linux/syscalls.h
> @@ -410,12 +410,16 @@ asmlinkage long sys_newlstat(const char __user *filename,
>  				struct stat __user *statbuf);
>  asmlinkage long sys_newfstat(unsigned int fd, struct stat __user *statbuf);
>  asmlinkage long sys_ustat(unsigned dev, struct ustat __user *ubuf);
> -#if BITS_PER_LONG == 32
> +#if defined(__ARCH_WANT_STAT64) || defined(__ARCH_WANT_COMPAT_STAT64)
>  asmlinkage long sys_stat64(const char __user *filename,
>  				struct stat64 __user *statbuf);
>  asmlinkage long sys_fstat64(unsigned long fd, struct stat64 __user *statbuf);
>  asmlinkage long sys_lstat64(const char __user *filename,
>  				struct stat64 __user *statbuf);
> +asmlinkage long sys_fstatat64(int dfd, const char __user *filename,
> +			       struct stat64 __user *statbuf, int flag);
> +#endif
> +#if BITS_PER_LONG == 32
>  asmlinkage long sys_truncate64(const char __user *path, loff_t length);
>  asmlinkage long sys_ftruncate64(unsigned int fd, loff_t length);
>  #endif
> @@ -771,8 +775,6 @@ asmlinkage long sys_openat(int dfd, const char __user *filename, int flags,
>  			   umode_t mode);
>  asmlinkage long sys_newfstatat(int dfd, const char __user *filename,
>  			       struct stat __user *statbuf, int flag);
> -asmlinkage long sys_fstatat64(int dfd, const char __user *filename,
> -			       struct stat64 __user *statbuf, int flag);
>  asmlinkage long sys_readlinkat(int dfd, const char __user *path, char __user *buf,
>  			       int bufsiz);
>  asmlinkage long sys_utimensat(int dfd, const char __user *filename,
--
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