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:   Tue, 23 May 2017 09:16:32 +0200
From:   Richard Weinberger <richard@....at>
To:     Hyunchul Lee <hyc.lee@...il.com>
Cc:     david@...ma-star.at, bfields@...hat.com, dedekind1@...il.com,
        rockdotlee@...il.com, adrian.hunter@...el.com,
        linux-kernel@...r.kernel.org, kernel-team@....com,
        linux-mtd@...ts.infradead.org, linux-fsdevel@...r.kernel.org,
        adilger.kernel@...ger.ca, akpm@...ux-foundation.org,
        marcus.folkesson@...il.com, leon.pollak@...il.com
Subject: Re: [PATCH 4/6] ubifs: Maintain a parent pointer

Hyunchul,

Am 23.05.2017 um 01:50 schrieb Hyunchul Lee:
>> I assumed that the journal does this already because we change old_inode->i_ctime
>> in this function too.
>> But checking the code showed the opposite.
>> So, if we face a power-cut the rename can succeed but we lose the ctime change.
>>
>> This needs to be addressed before we can add the parent pointer.
> 
> Is writing old_inode->i_ctime required? I guess that it is needed only when 
> IS_SYNC(old_inode) is true, otherwise we don't need to guarantee that ctime
> is synced.

Well, rename() has to be an atomic operation. When UBIFS updates ctime during this
operation it has also to be atomic. Otherwise, after a power-cut, you can end-up with
a renamed file but a not updated ctime.
Userspace can depend on this. Think of a backup program that needs to detect changes.
It won't notice the renamed file.

AFAICT POSIX does not require ctime to be updated during rename() but suggests it.
My point is, either we do it always or never.

Just checked xfs and btrfs. Both seem to update ctime of old_inode during the rename
transaction. UBIFS should do the same.

Thanks,
//richard

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ