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>] [day] [month] [year] [list]
Message-Id: <EFAF64C6-9989-4622-9441-5B23C81B45AE@dilger.ca>
Date:   Fri, 27 Oct 2017 17:19:59 -0600
From:   Andreas Dilger <adilger@...ger.ca>
To:     Artem Blagodarenko <artem.blagodarenko@...il.com>
Cc:     linux-ext4@...r.kernel.org, adilger.kernel@...ger.ca,
        alexey.lyashkov@...il.com
Subject: Re: [RFC PATCH 5/8] debugfs: 64bit inode support

On Oct 27, 2017, at 11:22 AM, Artem Blagodarenko <artem.blagodarenko@...il.com> wrote:
> 
> New dirdata type EXT2_DIRENT_INODE is added.
> 
> Signed-off-by: Artem Blagodarenko <artem.blagodarenko@...il.com>
> ---
> debugfs/ls.c         | 5 ++++-
> lib/ext2fs/ext2_fs.h | 1 +
> 2 files changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/debugfs/ls.c b/debugfs/ls.c
> index 2216d456..0c575328 100644
> --- a/debugfs/ls.c
> +++ b/debugfs/ls.c
> @@ -64,9 +64,12 @@ static void list_dirdata(struct list_dir_struct *ls,
> 
> 		dlen = data[0];
> 
> -		if (dirdata_mask == EXT2_DIRENT_LUFID) {
> +		if (dirdata_mask == EXT2_DIRENT_INODE)
> +			fprintf(ls->f, "Inode high part:%04\n",*(__u32*)(data +1));

This should be brief, or the "ls" output will be very wide, and having multiple
words makes parsing this output for testing complex.  Something like:

        fprintf(ls->f, "ino64:%04"

but it might just be better to include the high 32 bits into the inode number
that is already printed?

> +		else if (dirdata_mask == EXT2_DIRENT_LUFID) {
> 			struct lu_fid *fid = (struct lu_fid *)(data + 1);
> 
> +			fprintf(ls->f, "lufind dirdata\n");

(typo) s/lufind/lufid/

Similarly, this should be shorter, like "FID:"DFID,

> diff --git a/lib/ext2fs/ext2_fs.h b/lib/ext2fs/ext2_fs.h
> index 6a882789..b9773814 100644
> --- a/lib/ext2fs/ext2_fs.h
> +++ b/lib/ext2fs/ext2_fs.h
> @@ -1041,6 +1041,7 @@ struct ext2_dir_entry_tail {
> /* lu_fid size and NUL char */
> #define EXT2_DIRENT_LUFID_SIZE		(17 + 1)
> #define EXT2_DIRENT_LUFID		0x10
> +#define EXT2_DIRENT_INODE		0x20
> 
> /*
>  * Constants for ext4's extended time encoding
> --
> 2.13.5 (Apple Git-94)
> 


Cheers, Andreas






Download attachment "signature.asc" of type "application/pgp-signature" (196 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ