From: kernel test robot <lkp@intel.com>
To: "Gustavo A. R. Silva" <gustavoars@kernel.org>
Cc: oe-kbuild-all@lists.linux.dev, linux-cifs@vger.kernel.org,
samba-technical@lists.samba.org,
Steve French <stfrench@microsoft.com>,
Kees Cook <keescook@chromium.org>,
Ronnie Sahlberg <lsahlber@redhat.com>
Subject: [cifs:5.15-backport-8-1-24 226/600] fs/cifs/cifspdu.h:512:17: error: expected specifier-qualifier-list before 'DECLARE_FLEX_ARRAY'
Date: Sat, 3 Aug 2024 13:15:48 +0800 [thread overview]
Message-ID: <202408031336.QdFIpntb-lkp@intel.com> (raw)
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
reply other threads:[~2024-08-03 5:16 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202408031336.QdFIpntb-lkp@intel.com \
--to=lkp@intel.com \
--cc=gustavoars@kernel.org \
--cc=keescook@chromium.org \
--cc=linux-cifs@vger.kernel.org \
--cc=lsahlber@redhat.com \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=samba-technical@lists.samba.org \
--cc=stfrench@microsoft.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox