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] [day] [month] [year] [list]
Date:   Thu, 21 Jun 2018 11:41:26 +0900
From:   Ryusuke Konishi <konishi.ryusuke@....ntt.co.jp>
To:     Arnd Bergmann <arnd@...db.de>,
        Andrew Morton <akpm@...ux-foundation.org>
Cc:     y2038@...ts.linaro.org, David Howells <dhowells@...hat.com>,
        Jeff Layton <jlayton@...hat.com>, linux-nilfs@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] nilfs2: use 64-bit superblock timstamps

On 2018/06/20 16:50, Arnd Bergmann wrote:
> The mount time field in the superblock uses a 64-bit timestamp, but
> calling get_seconds() may truncate the current time to 32 bits.
> 
> This changes it to ktime_get_real_seconds() to avoid the potential
> overflow.
> 
> Signed-off-by: Arnd Bergmann <arnd@...db.de>

Looks good to me.

Thanks, all.

Acked-by: Ryusuke Konishi <konishi.ryusuke@....ntt.co.jp>


> ---
>   fs/nilfs2/super.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/fs/nilfs2/super.c b/fs/nilfs2/super.c
> index 6ffeca84d7c3..1b9067cf4511 100644
> --- a/fs/nilfs2/super.c
> +++ b/fs/nilfs2/super.c
> @@ -834,7 +834,7 @@ static int nilfs_setup_super(struct super_block *sb, int is_mount)
>   		sbp[0]->s_max_mnt_count = cpu_to_le16(NILFS_DFL_MAX_MNT_COUNT);
>   
>   	sbp[0]->s_mnt_count = cpu_to_le16(mnt_count + 1);
> -	sbp[0]->s_mtime = cpu_to_le64(get_seconds());
> +	sbp[0]->s_mtime = cpu_to_le64(ktime_get_real_seconds());
>   
>   skip_mount_setup:
>   	sbp[0]->s_state =
> 


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ