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: <8e6ff78d-1c18-789b-a0ef-adf87a891a58@infradead.org>
Date:   Fri, 15 May 2020 10:36:04 -0700
From:   Randy Dunlap <rdunlap@...radead.org>
To:     Trond Myklebust <trondmy@...merspace.com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "linux-nfs@...r.kernel.org" <linux-nfs@...r.kernel.org>,
        "linux-fsdevel@...r.kernel.org" <linux-fsdevel@...r.kernel.org>,
        "viro@...IV.linux.org.uk" <viro@...IV.linux.org.uk>,
        "dhowells@...hat.com" <dhowells@...hat.com>,
        "anna.schumaker@...app.com" <anna.schumaker@...app.com>
Subject: Re: [PATCH -next] nfs: fsinfo: fix build when CONFIG_NFS_V4 is not
 enabled

On 5/15/20 10:33 AM, Trond Myklebust wrote:
> On Fri, 2020-05-15 at 10:27 -0700, Randy Dunlap wrote:
>> From: Randy Dunlap <rdunlap@...radead.org>
>>
>> Fix multiple build errors when CONFIG_NFS_V4 is not enabled.
>>
>> ../fs/nfs/fsinfo.c: In function 'nfs_fsinfo_get_supports':
>> ../fs/nfs/fsinfo.c:153:12: error: 'const struct nfs_server' has no
>> member named 'attr_bitmask'
>>   if (server->attr_bitmask[0] & FATTR4_WORD0_SIZE)
>>             ^~
>> ../fs/nfs/fsinfo.c:155:12: error: 'const struct nfs_server' has no
>> member named 'attr_bitmask'
>>   if (server->attr_bitmask[1] & FATTR4_WORD1_NUMLINKS)
>>             ^~
>> ../fs/nfs/fsinfo.c:158:12: error: 'const struct nfs_server' has no
>> member named 'attr_bitmask'
>>   if (server->attr_bitmask[0] & FATTR4_WORD0_ARCHIVE)
>>             ^~
>> ../fs/nfs/fsinfo.c:160:12: error: 'const struct nfs_server' has no
>> member named 'attr_bitmask'
>>   if (server->attr_bitmask[0] & FATTR4_WORD0_HIDDEN)
>>             ^~
>> ../fs/nfs/fsinfo.c:162:12: error: 'const struct nfs_server' has no
>> member named 'attr_bitmask'
>>   if (server->attr_bitmask[1] & FATTR4_WORD1_SYSTEM)
>>             ^~
>> ../fs/nfs/fsinfo.c: In function 'nfs_fsinfo_get_features':
>> ../fs/nfs/fsinfo.c:205:12: error: 'const struct nfs_server' has no
>> member named 'attr_bitmask'
>>   if (server->attr_bitmask[0] & FATTR4_WORD0_CASE_INSENSITIVE)
>>             ^~
>> ../fs/nfs/fsinfo.c:207:13: error: 'const struct nfs_server' has no
>> member named 'attr_bitmask'
>>   if ((server->attr_bitmask[0] & FATTR4_WORD0_ARCHIVE) ||
>>              ^~
>> ../fs/nfs/fsinfo.c:208:13: error: 'const struct nfs_server' has no
>> member named 'attr_bitmask'
>>       (server->attr_bitmask[0] & FATTR4_WORD0_HIDDEN) ||
>>              ^~
>> ../fs/nfs/fsinfo.c:209:13: error: 'const struct nfs_server' has no
>> member named 'attr_bitmask'
>>       (server->attr_bitmask[1] & FATTR4_WORD1_SYSTEM))
>>              ^~
>>
>>
>> Signed-off-by: Randy Dunlap <rdunlap@...radead.org>
>> Cc: linux-nfs@...r.kernel.org
>> Cc: Trond Myklebust <trond.myklebust@...merspace.com>
>> Cc: Anna Schumaker <anna.schumaker@...app.com>
>> Cc: Alexander Viro <viro@...iv.linux.org.uk>
>> Cc: linux-fsdevel@...r.kernel.org
>> Cc: David Howells <dhowells@...hat.com>
>> ---
>>  fs/nfs/fsinfo.c |    5 +++++
>>  1 file changed, 5 insertions(+)
>>
>> --- linux-next-20200515.orig/fs/nfs/fsinfo.c
>> +++ linux-next-20200515/fs/nfs/fsinfo.c
>> @@ -5,6 +5,7 @@
>>   * Written by David Howells (dhowells@...hat.com)
>>   */
>>  
>> +#include <linux/kconfig.h>
>>  #include <linux/nfs_fs.h>
>>  #include <linux/windows.h>
>>  #include "internal.h"
>> @@ -150,6 +151,7 @@ static int nfs_fsinfo_get_supports(struc
>>  		sup->stx_mask |= STATX_CTIME;
>>  	if (server->caps & NFS_CAP_MTIME)
>>  		sup->stx_mask |= STATX_MTIME;
>> +#if IS_ENABLED(CONFIG_NFS_V4)
>>  	if (server->attr_bitmask[0] & FATTR4_WORD0_SIZE)
>>  		sup->stx_mask |= STATX_SIZE;
>>  	if (server->attr_bitmask[1] & FATTR4_WORD1_NUMLINKS)
>> @@ -161,6 +163,7 @@ static int nfs_fsinfo_get_supports(struc
>>  		sup->win_file_attrs |= ATTR_HIDDEN;
>>  	if (server->attr_bitmask[1] & FATTR4_WORD1_SYSTEM)
>>  		sup->win_file_attrs |= ATTR_SYSTEM;
>> +#endif
>>  
>>  	sup->stx_attributes = STATX_ATTR_AUTOMOUNT;
>>  	return sizeof(*sup);
>> @@ -202,12 +205,14 @@ static int nfs_fsinfo_get_features(struc
>>  	if (server->caps & NFS_CAP_MTIME)
>>  		fsinfo_set_feature(ft, FSINFO_FEAT_HAS_MTIME);
>>  
>> +#if IS_ENABLED(CONFIG_NFS_V4)
>>  	if (server->attr_bitmask[0] & FATTR4_WORD0_CASE_INSENSITIVE)
>>  		fsinfo_set_feature(ft, FSINFO_FEAT_NAME_CASE_INDEP);
>>  	if ((server->attr_bitmask[0] & FATTR4_WORD0_ARCHIVE) ||
>>  	    (server->attr_bitmask[0] & FATTR4_WORD0_HIDDEN) ||
>>  	    (server->attr_bitmask[1] & FATTR4_WORD1_SYSTEM))
>>  		fsinfo_set_feature(ft, FSINFO_FEAT_WINDOWS_ATTRS);
>> +#endif
>>  
>>  	return sizeof(*ft);
>>  }
> 
> This whole thing needs to be reviewed and acked by the NFS community,

Certainly.

> and quite frankly I'm inclined to NAK this. This is the second time
> David tries to push this unwanted rewrite of totally unrelated code.

No problem on that. I just want it to build cleanly.

thanks.
-- 
~Randy

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ