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: <e2dfba81-e6c6-b04f-7260-281c29808327@suse.com>
Date:   Wed, 1 Apr 2020 09:47:46 +0300
From:   Nikolay Borisov <nborisov@...e.com>
To:     Eugene Syromiatnikov <esyr@...hat.com>,
        linux-kernel@...r.kernel.org, linux-btrfs@...r.kernel.org,
        David Sterba <dsterba@...e.com>
Cc:     Josef Bacik <josef@...icpanda.com>, Chris Mason <clm@...com>,
        "Dmitry V. Levin" <ldv@...linux.org>
Subject: Re: [PATCH] btrfs: re-instantiate the removed
 BTRFS_SUBVOL_CREATE_ASYNC definition



On 1.04.20 г. 6:26 ч., Eugene Syromiatnikov wrote:
> The commit 9c1036fdb1d1ff1b ("btrfs: Remove BTRFS_SUBVOL_CREATE_ASYNC
> support") breaks strace build with the kernel headers from git:
> 
>     btrfs.c: In function "btrfs_test_subvol_ioctls":
>     btrfs.c:531:23: error: "BTRFS_SUBVOL_CREATE_ASYNC" undeclared (first use
>     in this function)
>        vol_args_v2.flags = BTRFS_SUBVOL_CREATE_ASYNC;
> 
> Moreover, it is improper to break UAPI anyway.
> 
> Restore the macro definition and put it under "#ifndef __KERNEL__"
> in order to prevent inadvertent in-kernel usage.
> 
> Fixes: 9c1036fdb1d1ff1b ("btrfs: Remove BTRFS_SUBVOL_CREATE_ASYNC support")
> Signed-off-by: Eugene Syromiatnikov <esyr@...hat.com>

Ops, sorry about that:

Reviewed-by: Nikolay Borisov <nborisov@...e.com>

> ---
>  include/uapi/linux/btrfs.h | 10 ++++------
>  1 file changed, 4 insertions(+), 6 deletions(-)
> 
> diff --git a/include/uapi/linux/btrfs.h b/include/uapi/linux/btrfs.h
> index 8134924..e6b6cb0f 100644
> --- a/include/uapi/linux/btrfs.h
> +++ b/include/uapi/linux/btrfs.h
> @@ -36,12 +36,10 @@ struct btrfs_ioctl_vol_args {
>  #define BTRFS_DEVICE_PATH_NAME_MAX	1024
>  #define BTRFS_SUBVOL_NAME_MAX 		4039
>  
> -/*
> - * Deprecated since 5.7:
> - *
> - * BTRFS_SUBVOL_CREATE_ASYNC	(1ULL << 0)
> - */
> -
> +#ifndef __KERNEL__
> +/* Deprecated since 5.7 */
> +# define BTRFS_SUBVOL_CREATE_ASYNC	(1ULL << 0)
> +#endif
>  #define BTRFS_SUBVOL_RDONLY		(1ULL << 1)
>  #define BTRFS_SUBVOL_QGROUP_INHERIT	(1ULL << 2)
>  
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ