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:   Wed, 10 Jun 2020 08:32:22 -0400
From:   Brian Gerst <brgerst@...il.com>
To:     Jiri Slaby <jslaby@...e.cz>
Cc:     Thomas Gleixner <tglx@...utronix.de>,
        "the arch/x86 maintainers" <x86@...nel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Dominik Brodowski <linux@...inikbrodowski.net>
Subject: Re: [PATCH] syscalls: fix offset type of ksys_ftruncate

On Wed, Jun 10, 2020 at 7:48 AM Jiri Slaby <jslaby@...e.cz> wrote:
>
> After the commit below, truncate on i586 uses ksys_ftruncate. But
> ksys_ftruncate truncates the offset to unsigned long. So switch the type
> of offset to loff_t which is what the lower do_sys_ftruncate expects.
>
> Signed-off-by: Jiri Slaby <jslaby@...e.cz>
> Fixes: 121b32a58a3a (x86/entry/32: Use IA32-specific wrappers for syscalls taking 64-bit arguments)
> Cc: Brian Gerst <brgerst@...il.com>
> Cc: Thomas Gleixner <tglx@...utronix.de>
> Cc: Dominik Brodowski <linux@...inikbrodowski.net>
> ---
>  include/linux/syscalls.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h
> index 63ffa6dc9da3..e97ca179d0dc 100644
> --- a/include/linux/syscalls.h
> +++ b/include/linux/syscalls.h
> @@ -1370,7 +1370,7 @@ static inline long ksys_lchown(const char __user *filename, uid_t user,
>
>  extern long do_sys_ftruncate(unsigned int fd, loff_t length, int small);
>
> -static inline long ksys_ftruncate(unsigned int fd, unsigned long length)
> +static inline long ksys_ftruncate(unsigned int fd, loff_t length)
>  {
>         return do_sys_ftruncate(fd, length, 1);
>  }

Reviewed-by: Brian Gerst <brgerst@...il.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ