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: <20230104103651.eaxele7amb5t7tpu@fedora>
Date:   Wed, 4 Jan 2023 11:36:51 +0100
From:   Lukas Czerner <lczerner@...hat.com>
To:     Eric Biggers <ebiggers@...nel.org>
Cc:     linux-ext4@...r.kernel.org, Jeremy Bongio <bongiojp@...il.com>
Subject: Re: [e2fsprogs PATCH] tune2fs: fix setting fsuuid::fsu_len

On Wed, Jan 04, 2023 at 01:04:01AM -0800, Eric Biggers wrote:
> From: Eric Biggers <ebiggers@...gle.com>
> 
> Minus does not mean equals.
> 
> Besides fixing an obvious bug, this avoids the following compiler
> warning with clang -Wall:
> 
> tune2fs.c:3625:20: warning: expression result unused [-Wunused-value]
>                         fsuuid->fsu_len - UUID_SIZE;
>                         ~~~~~~~~~~~~~~~ ^ ~~~~~~~~~

Looks good, thanks!

Reviewed-by: Lukas Czerner <lczerner@...hat.com>

> 
> Fixes: a83e199da0ca ("tune2fs: Add support for get/set UUID ioctls.")
> Cc: Jeremy Bongio <bongiojp@...il.com>
> Signed-off-by: Eric Biggers <ebiggers@...gle.com>
> ---
>  misc/tune2fs.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/misc/tune2fs.c b/misc/tune2fs.c
> index 088f87e5..7937b8b5 100644
> --- a/misc/tune2fs.c
> +++ b/misc/tune2fs.c
> @@ -3622,7 +3622,7 @@ _("Warning: The journal is dirty. You may wish to replay the journal like:\n\n"
>  		ret = -1;
>  #ifdef __linux__
>  		if (fsuuid) {
> -			fsuuid->fsu_len - UUID_SIZE;
> +			fsuuid->fsu_len = UUID_SIZE;
>  			fsuuid->fsu_flags = 0;
>  			memcpy(&fsuuid->fsu_uuid, new_uuid, UUID_SIZE);
>  			ret = ioctl(fd, EXT4_IOC_SETFSUUID, fsuuid);
> -- 
> 2.39.0
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ