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: <CAHc6FU6QQicrNDKWMQknP9YqKtEhhL0KbDCLACQ=v8P+tPQ5WQ@mail.gmail.com>
Date:   Thu, 13 Jul 2023 16:15:50 +0200
From:   Andreas Gruenbacher <agruenba@...hat.com>
To:     Jeff Layton <jlayton@...nel.org>
Cc:     brauner@...nel.org, Bob Peterson <rpeterso@...hat.com>,
        linux-fsdevel@...r.kernel.org, cluster-devel@...hat.com,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] gfs2: fix timestamp handling on quota inodes

Jeff and Christian,

On Thu, Jul 13, 2023 at 3:52 PM Jeff Layton <jlayton@...nel.org> wrote:
> While these aren't generally visible from userland, it's best to be
> consistent with timestamp handling. When adjusting the quota, update the
> mtime and ctime like we would with a write operation on any other inode,
> and avoid updating the atime which should only be done for reads.
>
> Signed-off-by: Jeff Layton <jlayton@...nel.org>
> ---
>  fs/gfs2/quota.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> Christian,
>
> Would you mind picking this into the vfs.ctime branch, assuming the GFS2
> maintainers ack it? Andreas and I had discussed this privately, and I
> think it makes sense as part of that series.

Yes, please.

> Thanks,
> Jeff
>
> diff --git a/fs/gfs2/quota.c b/fs/gfs2/quota.c
> index 704192b73605..aa5fd06d47bc 100644
> --- a/fs/gfs2/quota.c
> +++ b/fs/gfs2/quota.c
> @@ -871,7 +871,7 @@ static int gfs2_adjust_quota(struct gfs2_inode *ip, loff_t loc,
>                 size = loc + sizeof(struct gfs2_quota);
>                 if (size > inode->i_size)
>                         i_size_write(inode, size);
> -               inode->i_mtime = inode->i_atime = current_time(inode);
> +               inode->i_mtime = inode_set_ctime_current(inode);
>                 mark_inode_dirty(inode);
>                 set_bit(QDF_REFRESH, &qd->qd_flags);
>         }
> --
> 2.41.0
>

Reviewed-by: Andreas Gruenbacher <agruenba@...hat.com>

Thanks,
Andreas

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ