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:	Sun, 6 Mar 2016 18:13:49 -0500
From:	Theodore Ts'o <tytso@....edu>
To:	Andreas Dilger <adilger@...ger.ca>
Cc:	linux-ext4@...r.kernel.org
Subject: Re: [PATCH 4/6] lsattr: treat inode generation as an unsigned int

On Sat, Mar 05, 2016 at 05:38:34PM -0700, Andreas Dilger wrote:
> The EXT2_GETVERSION ioctl is defined to take a "long" parameter, but
> fgetversion() calls ioctl() with an "int" parameter instead.  This is
> handled in the kernel correctly, but the generation is sign-extended
> in fgetversion() before return on 64-bit systems and lsattr prints
> it as a huge positive number for inode generation above 0x80000000:
> 
>         1635574212 -------------e-- /mnt/ost0/O/0/d0/12928
>         18446744073045131735 -------------e-- /mnt/ost0/O/0/d0/166240
>         782808861 -------------e-- /mnt/ost0/O/0/d0/31744
>         18446744072181134840 -------------e-- /mnt/ost0/O/0/d0/135008
> 
> Correctly assign the returned generation number as an unsigned value,
> and print it with a 10-character field width.  The version is printed
> left-aligned for consistency with the old code and to ensure it is
> always printed in the first column for use with tools like "cut":
> 
>         1635574212 -------------e-- /mnt/ost0/O/0/d0/12928
>         3630547415 -------------e-- /mnt/ost0/O/0/d0/166240
>         782808861  -------------e-- /mnt/ost0/O/0/d0/31744
>         2766550520 -------------e-- /mnt/ost0/O/0/d0/135008
> 
> Do not return a random value from the stack as the version on error.
> Clean up some style issues and consolidate some duplicate code.
> 
> Signed-off-by: Andreas Dilger <adilger@...ger.ca>

Thanks, applied.

						- Ted
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ