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: <CA+PiJmQzj0Lj2FKi3A4Z=LC_tcQ9i9xtb3dmXwa9fSsQ+YN_LA@mail.gmail.com>
Date:   Thu, 5 Mar 2020 17:42:09 -0800
From:   Daniel Rosenberg <drosen@...gle.com>
To:     Jaegeuk Kim <jaegeuk@...nel.org>
Cc:     linux-kernel@...r.kernel.org,
        linux-f2fs-devel@...ts.sourceforge.net
Subject: Re: [PATCH] f2fs: fix wrong check on F2FS_IOC_FSSETXATTR

On Thu, Mar 5, 2020 at 3:48 PM Jaegeuk Kim <jaegeuk@...nel.org> wrote:
>
> This fixes the incorrect failure when enabling project quota on casefold-enabled
> file.
>
> Cc: Daniel Rosenberg <drosen@...gle.com>
> Signed-off-by: Jaegeuk Kim <jaegeuk@...nel.org>
> ---

This fixes the issue I was seeing, I'm just a bit concerned with the last two.

>
>         fi->i_flags = iflags | (fi->i_flags & ~mask);
> -       f2fs_bug_on(F2FS_I_SB(inode), (fi->i_flags & F2FS_COMPR_FL) &&
> -                                       (fi->i_flags & F2FS_NOCOMP_FL));
> +       f2fs_bug_on(F2FS_I_SB(inode), (masked_flags & F2FS_COMPR_FL) &&
> +                                       (masked_flags & F2FS_NOCOMP_FL));
>
> -       if (fi->i_flags & F2FS_PROJINHERIT_FL)
> +       if (masked_flags & F2FS_PROJINHERIT_FL)
>                 set_inode_flag(inode, FI_PROJ_INHERIT);
>         else
>                 clear_inode_flag(inode, FI_PROJ_INHERIT);
> --
> 2.25.1.481.gfbce0eb801-goog
>

Shouldn't these still be fi->i_flags? masked_flags comes from the
previously set i_flags, so this would change from testing the new
combination that was just set for fi->i_flags to checking only the
masked version of the old flags.
It might make it clearer to rename masked_flags to masked_old_flags,
or something like that.
-Daniel

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ