Linux CIFS filesystem development
 help / color / mirror / Atom feed
* [cifs:5.15-backport-8-1-24 226/600] fs/cifs/cifspdu.h:512:17: error: expected specifier-qualifier-list before 'DECLARE_FLEX_ARRAY'
@ 2024-08-03  5:15 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2024-08-03  5:15 UTC (permalink / raw)
  To: Gustavo A. R. Silva
  Cc: oe-kbuild-all, linux-cifs, samba-technical, Steve French,
	Kees Cook, Ronnie Sahlberg

Hi Gustavo,

FYI, the error/warning still remains.

tree:   git://git.samba.org/sfrench/cifs-2.6.git 5.15-backport-8-1-24
head:   c931999946e12679e0adc129509a1e23a4a64b5d
commit: cb470770db4ecdaf46a6c4b1703889ba2d6a4b19 [226/600] cifs: Replace a couple of one-element arrays with flexible-array members
config: i386-randconfig-002-20240803 (https://download.01.org/0day-ci/archive/20240803/202408031336.QdFIpntb-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240803/202408031336.QdFIpntb-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202408031336.QdFIpntb-lkp@intel.com/

All errors (new ones prefixed by >>):

   In file included from fs/cifs/dir.c:17:
>> fs/cifs/cifspdu.h:512:17: error: expected specifier-qualifier-list before 'DECLARE_FLEX_ARRAY'
     512 |                 DECLARE_FLEX_ARRAY(unsigned char, EncryptionKey);
         |                 ^~~~~~~~~~~~~~~~~~
--
   In file included from fs/cifs/cifsglob.h:100,
                    from fs/cifs/cached_dir.c:8:
>> fs/cifs/cifspdu.h:512:17: error: expected specifier-qualifier-list before 'DECLARE_FLEX_ARRAY'
     512 |                 DECLARE_FLEX_ARRAY(unsigned char, EncryptionKey);
         |                 ^~~~~~~~~~~~~~~~~~
   fs/cifs/cached_dir.c:415:6: warning: no previous prototype for 'free_cached_dir' [-Wmissing-prototypes]
     415 | void free_cached_dir(struct cached_fid *cfid)
         |      ^~~~~~~~~~~~~~~
--
   In file included from fs/cifs/ioctl.c:16:
>> fs/cifs/cifspdu.h:512:17: error: expected specifier-qualifier-list before 'DECLARE_FLEX_ARRAY'
     512 |                 DECLARE_FLEX_ARRAY(unsigned char, EncryptionKey);
         |                 ^~~~~~~~~~~~~~~~~~
   fs/cifs/ioctl.c: In function 'cifs_ioctl':
   fs/cifs/ioctl.c:324:17: warning: variable 'caps' set but not used [-Wunused-but-set-variable]
     324 |         __u64   caps;
         |                 ^~~~
--
   In file included from fs/cifs/cifssmb.c:26:
>> fs/cifs/cifspdu.h:512:17: error: expected specifier-qualifier-list before 'DECLARE_FLEX_ARRAY'
     512 |                 DECLARE_FLEX_ARRAY(unsigned char, EncryptionKey);
         |                 ^~~~~~~~~~~~~~~~~~
   fs/cifs/cifssmb.c: In function 'decode_ext_sec_blob':
>> fs/cifs/cifssmb.c:381:33: error: 'union <anonymous>' has no member named 'extended_response'
     381 |         char    *guid = pSMBr->u.extended_response.GUID;
         |                                 ^
   fs/cifs/cifssmb.c:405:33: error: 'union <anonymous>' has no member named 'extended_response'
     405 |                         pSMBr->u.extended_response.SecurityBlob, count, server);
         |                                 ^
   fs/cifs/cifssmb.c: In function 'CIFSSMBNegotiate':
>> fs/cifs/cifssmb.c:516:55: error: 'union <anonymous>' has no member named 'EncryptionKey'
     516 |                 memcpy(ses->server->cryptkey, pSMBr->u.EncryptionKey,
         |                                                       ^


vim +/DECLARE_FLEX_ARRAY +512 fs/cifs/cifspdu.h

   490	
   491	#define READ_RAW_ENABLE 1
   492	#define WRITE_RAW_ENABLE 2
   493	#define RAW_ENABLE (READ_RAW_ENABLE | WRITE_RAW_ENABLE)
   494	#define SMB1_CLIENT_GUID_SIZE (16)
   495	typedef struct negotiate_rsp {
   496		struct smb_hdr hdr;	/* wct = 17 */
   497		__le16 DialectIndex; /* 0xFFFF = no dialect acceptable */
   498		__u8 SecurityMode;
   499		__le16 MaxMpxCount;
   500		__le16 MaxNumberVcs;
   501		__le32 MaxBufferSize;
   502		__le32 MaxRawSize;
   503		__le32 SessionKey;
   504		__le32 Capabilities;	/* see below */
   505		__le32 SystemTimeLow;
   506		__le32 SystemTimeHigh;
   507		__le16 ServerTimeZone;
   508		__u8 EncryptionKeyLength;
   509		__u16 ByteCount;
   510		union {
   511			/* cap extended security off */
 > 512			DECLARE_FLEX_ARRAY(unsigned char, EncryptionKey);
   513			/* followed by Domain name - if extended security is off */
   514			/* followed by 16 bytes of server GUID */
   515			/* then security blob if cap_extended_security negotiated */
   516			struct {
   517				unsigned char GUID[SMB1_CLIENT_GUID_SIZE];
   518				unsigned char SecurityBlob[];
   519			} __attribute__((packed)) extended_response;
   520		} __attribute__((packed)) u;
   521	} __attribute__((packed)) NEGOTIATE_RSP;
   522	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-08-03  5:16 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-03  5:15 [cifs:5.15-backport-8-1-24 226/600] fs/cifs/cifspdu.h:512:17: error: expected specifier-qualifier-list before 'DECLARE_FLEX_ARRAY' kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox