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: <CAJF2gTRU=0KS5r=Q9tAcVz8aXbaYL7jGyxfxPCYkxWc4rEBG2g@mail.gmail.com>
Date:   Mon, 31 Jan 2022 21:35:31 +0800
From:   Guo Ren <guoren@...nel.org>
To:     Christoph Hellwig <hch@....de>
Cc:     Arnd Bergmann <arnd@...db.de>,
        "the arch/x86 maintainers" <x86@...nel.org>,
        Linux ARM <linux-arm-kernel@...ts.infradead.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        "open list:BROADCOM NVRAM DRIVER" <linux-mips@...r.kernel.org>,
        Parisc List <linux-parisc@...r.kernel.org>,
        linuxppc-dev <linuxppc-dev@...ts.ozlabs.org>,
        linux-s390 <linux-s390@...r.kernel.org>,
        sparclinux <sparclinux@...r.kernel.org>,
        linux-arch <linux-arch@...r.kernel.org>
Subject: Re: [PATCH 2/5] uapi: simplify __ARCH_FLOCK{,64}_PAD a little

On Mon, Jan 31, 2022 at 2:49 PM Christoph Hellwig <hch@....de> wrote:
>
> Don't bother to define the symbols empty, just don't use them.  That
> makes the intent a little more clear.
>
> Signed-off-by: Christoph Hellwig <hch@....de>
> ---
>  include/uapi/asm-generic/fcntl.h       | 12 ++++--------
>  tools/include/uapi/asm-generic/fcntl.h | 12 ++++--------
>  2 files changed, 8 insertions(+), 16 deletions(-)
>
> diff --git a/include/uapi/asm-generic/fcntl.h b/include/uapi/asm-generic/fcntl.h
> index caa482e3b01af..c53897ca5d402 100644
> --- a/include/uapi/asm-generic/fcntl.h
> +++ b/include/uapi/asm-generic/fcntl.h
> @@ -193,22 +193,16 @@ struct f_owner_ex {
>  #define F_LINUX_SPECIFIC_BASE  1024
>
>  #ifndef HAVE_ARCH_STRUCT_FLOCK
> -#ifndef __ARCH_FLOCK_PAD
> -#define __ARCH_FLOCK_PAD
> -#endif
> -
>  struct flock {
>         short   l_type;
>         short   l_whence;
>         __kernel_off_t  l_start;
>         __kernel_off_t  l_len;
>         __kernel_pid_t  l_pid;
> +#ifdef __ARCH_FLOCK_PAD
>         __ARCH_FLOCK_PAD
> -};
>  #endif
> -
> -#ifndef __ARCH_FLOCK64_PAD
> -#define __ARCH_FLOCK64_PAD
> +};
>  #endif
>
>  struct flock64 {
> @@ -217,7 +211,9 @@ struct flock64 {
>         __kernel_loff_t l_start;
>         __kernel_loff_t l_len;
>         __kernel_pid_t  l_pid;
> +#ifdef __ARCH_FLOCK64_PAD
>         __ARCH_FLOCK64_PAD
> +#endif
>  };
>
>  #endif /* _ASM_GENERIC_FCNTL_H */
> diff --git a/tools/include/uapi/asm-generic/fcntl.h b/tools/include/uapi/asm-generic/fcntl.h
> index 4a49d33ca4d55..82054502b9748 100644
> --- a/tools/include/uapi/asm-generic/fcntl.h
> +++ b/tools/include/uapi/asm-generic/fcntl.h
> @@ -188,22 +188,16 @@ struct f_owner_ex {
>  #define F_LINUX_SPECIFIC_BASE  1024
>
>  #ifndef HAVE_ARCH_STRUCT_FLOCK
> -#ifndef __ARCH_FLOCK_PAD
> -#define __ARCH_FLOCK_PAD
> -#endif
> -
>  struct flock {
>         short   l_type;
>         short   l_whence;
>         __kernel_off_t  l_start;
>         __kernel_off_t  l_len;
>         __kernel_pid_t  l_pid;
> +#ifdef __ARCH_FLOCK_PAD
>         __ARCH_FLOCK_PAD
> -};
>  #endif
> -
> -#ifndef __ARCH_FLOCK64_PAD
> -#define __ARCH_FLOCK64_PAD
> +};
>  #endif
>
>  struct flock64 {
> @@ -212,7 +206,9 @@ struct flock64 {
>         __kernel_loff_t l_start;
>         __kernel_loff_t l_len;
>         __kernel_pid_t  l_pid;
> +#ifdef __ARCH_FLOCK64_PAD
>         __ARCH_FLOCK64_PAD
> +#endif
>  };
>
>  #endif /* _ASM_GENERIC_FCNTL_H */
> --
> 2.30.2
>
Reviewed-by: Guo Ren <guoren@...nel.org>

-- 
Best Regards
 Guo Ren

ML: https://lore.kernel.org/linux-csky/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ