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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <81423.1575627938@turing-police>
Date:   Fri, 06 Dec 2019 05:25:38 -0500
From:   "Valdis Klētnieks" <valdis.kletnieks@...edu>
To:     Namjae Jeon <namjae.jeon@...sung.com>
cc:     linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org,
        gregkh@...uxfoundation.org, hch@....de, linkinjeon@...il.com,
        Markus.Elfring@....de, sj1557.seo@...sung.com, dwagner@...e.de,
        nborisov@...e.com
Subject: Re: [PATCH v5 02/13] exfat: add super block operations

On Sun, 24 Nov 2019 19:03:15 -0500, Namjae Jeon said:
> This adds the implementation of superblock operations for exfat.

>  fs/exfat/super.c | 738 +++++++++++++++++++++++++++++++++++++++++++++++

> +static int exfat_fill_super(struct super_block *sb, struct fs_context *fc)
> +{
> +	struct exfat_sb_info *sbi = sb->s_fs_info;
> +	struct exfat_mount_options *opts = &sbi->options;
> +	struct inode *root_inode;
> +	int err;
> +
> +	if (opts->allow_utime == -1)
> +		opts->allow_utime = ~opts->fs_dmask & 0022;

This throws a warning when building with W=1:

  CC [M]  fs/exfat/super.o
fs/exfat/super.c: In function 'exfat_fill_super':
fs/exfat/super.c:552:24: warning: comparison is always false due to limited range of data type [-Wtype-limits]
  552 |  if (opts->allow_utime == -1)
      |                        ^~

which means that opts->allow_utime will never get set. Except for
the use of -1 to show an uninitialized value, all the other uses  don't
care about sign/unsigned, so let's make it signed....

Signed-off-by: Valdis Kletnieks <valdis.kletnieks@...edu>

--- a/fs/exfat/exfat_fs.h	2019-12-06 05:17:58.344590227 -0500
+++ b/fs/exfat/exfat_fs.h	2019-12-06 05:18:25.429222169 -0500
@@ -210,7 +210,7 @@
 	unsigned short fs_fmask;
 	unsigned short fs_dmask;
 	/* permission for setting the [am]time */
-	unsigned short allow_utime;
+	short allow_utime;
 	/* charset for filename input/display */
 	char *iocharset;
 	unsigned char utf8;


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ