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:   Fri, 17 Jan 2020 10:18:13 +0100
From:   Pali Rohár <pali.rohar@...il.com>
To:     Namjae Jeon <namjae.jeon@...sung.com>
Cc:     linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org,
        gregkh@...uxfoundation.org, valdis.kletnieks@...edu, hch@....de,
        sj1557.seo@...sung.com, linkinjeon@...il.com, arnd@...db.de
Subject: Re: [PATCH v10 05/14] exfat: add file operations

On Wednesday 15 January 2020 17:24:38 Namjae Jeon wrote:
> This adds the implementation of file operations for exfat.
> 
> Reviewed-by: Christoph Hellwig <hch@....de>
> Signed-off-by: Namjae Jeon <namjae.jeon@...sung.com>
> Signed-off-by: Sungjong Seo <sj1557.seo@...sung.com>
> ---
>  fs/exfat/file.c | 355 ++++++++++++++++++++++++++++++++++++++++++++++++
>  1 file changed, 355 insertions(+)
>  create mode 100644 fs/exfat/file.c
> 
> diff --git a/fs/exfat/file.c b/fs/exfat/file.c
> new file mode 100644
> index 000000000000..b4b8af0cae0a
> --- /dev/null
> +++ b/fs/exfat/file.c

...

> +/* resize the file length */
> +int __exfat_truncate(struct inode *inode, loff_t new_size)
> +{

...

> +
> +		ktime_get_real_ts64(&ts);
> +		exfat_set_entry_time(sbi, &ts,
> +				&ep->dentry.file.modify_time,
> +				&ep->dentry.file.modify_date,
> +				&ep->dentry.file.modify_tz);

Hello! Now I spotted that you forgot to update "modify_time_ms" entry.

To prevent this problem, maybe function modify_time_ms() could take
another (optional) parameter for specifying time_ms?

> +		ep->dentry.file.attr = cpu_to_le16(ei->attr);
> +
> +		/* File size should be zero if there is no cluster allocated */
> +		if (ei->start_clu == EXFAT_EOF_CLUSTER) {
> +			ep->dentry.stream.valid_size = 0;
> +			ep->dentry.stream.size = 0;
> +		} else {
> +			ep->dentry.stream.valid_size = cpu_to_le64(new_size);
> +			ep->dentry.stream.size = ep->dentry.stream.valid_size;
> +		}
> +

-- 
Pali Rohár
pali.rohar@...il.com

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ