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: <46dbc10f-37a1-80f7-b4b5-e49eb867eff2@wanadoo.fr>
Date:   Fri, 30 Jul 2021 09:30:23 +0200
From:   Christophe JAILLET <christophe.jaillet@...adoo.fr>
To:     Konstantin Komarov <almaz.alexandrovich@...agon-software.com>,
        linux-fsdevel@...r.kernel.org
Cc:     viro@...iv.linux.org.uk, linux-kernel@...r.kernel.org,
        pali@...nel.org, dsterba@...e.cz, aaptel@...e.com,
        willy@...radead.org, rdunlap@...radead.org, joe@...ches.com,
        mark@...mstone.com, nborisov@...e.com,
        linux-ntfs-dev@...ts.sourceforge.net, anton@...era.com,
        dan.carpenter@...cle.com, hch@....de, ebiggers@...nel.org,
        andy.lavr@...il.com, kari.argillander@...il.com,
        oleksandr@...alenko.name
Subject: Re: [PATCH v27 05/10] fs/ntfs3: Add attrib operations

Hi,

below are a few comments based on a cppcheck run.
Don't take it too seriously into consideration, this is just a minor 
clean-up.

It is reported only if a new iteration is done and if it makes sense to 
include it.

CJ

Le 29/07/2021 à 15:49, Konstantin Komarov a écrit :
> This adds attrib operations
> 
> Signed-off-by: Konstantin Komarov <almaz.alexandrovich@...agon-software.com>
> ---
>   fs/ntfs3/attrib.c   | 2082 +++++++++++++++++++++++++++++++++++++++++++
>   fs/ntfs3/attrlist.c |  456 ++++++++++
>   fs/ntfs3/xattr.c    | 1046 ++++++++++++++++++++++
>   3 files changed, 3584 insertions(+)
>   create mode 100644 fs/ntfs3/attrib.c
>   create mode 100644 fs/ntfs3/attrlist.c
>   create mode 100644 fs/ntfs3/xattr.c
> 
> diff --git a/fs/ntfs3/attrib.c b/fs/ntfs3/attrib.c
> new file mode 100644
> index 000000000..bca85e7b6
> --- /dev/null
> +++ b/fs/ntfs3/attrib.c

[...]

> +/*
> + * load runs for given range [from to)
> + */
> +int attr_load_runs_range(struct ntfs_inode *ni, enum ATTR_TYPE type,
> +			 const __le16 *name, u8 name_len, struct runs_tree *run,
> +			 u64 from, u64 to)
> +{
> +	struct ntfs_sb_info *sbi = ni->mi.sbi;
> +	u8 cluster_bits = sbi->cluster_bits;
> +	CLST vcn = from >> cluster_bits;

This initialization is overwritten in the for loop below.
It can be removed.

> +	CLST vcn_last = (to - 1) >> cluster_bits;
> +	CLST lcn, clen;
> +	int err;
> +
> +	for (vcn = from >> cluster_bits; vcn <= vcn_last; vcn += clen) {

here

> +		if (!run_lookup_entry(run, vcn, &lcn, &clen, NULL)) {
> +			err = attr_load_runs_vcn(ni, type, name, name_len, run,
> +						 vcn);
> +			if (err)
> +				return err;
> +			clen = 0; /*next run_lookup_entry(vcn) must be success*/
> +		}
> +	}
> +
> +	return 0;
> +}

[...]

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ