ok - changed as suggested. Tested out ok
From ab3459d8f0ef52c38119ed58c4c29139efc7022c Mon Sep 17 00:00:00 2001
From: Steve French <stfrench@xxxxxxxxxxxxx>
Date: Thu, 6 Feb 2020 17:31:56 -0600
Subject: [PATCH 1/2] smb3: print warning once if posix context returned on
open
SMB3.1.1 POSIX Context processing is not complete yet - so print warning
(once) if server returns it on open.
Signed-off-by: Steve French <stfrench@xxxxxxxxxxxxx>
Reviewed-by: Aurelien Aptel <aaptel@xxxxxxxx>
---
fs/cifs/smb2pdu.c | 22 ++++++++++++++++++++++
fs/cifs/smb2pdu.h | 8 ++++++++
2 files changed, 30 insertions(+)
diff --git a/fs/cifs/smb2pdu.c b/fs/cifs/smb2pdu.c
index 47cce0bd1afe..1234f9ccab03 100644
--- a/fs/cifs/smb2pdu.c
+++ b/fs/cifs/smb2pdu.c
@@ -1950,6 +1960,9 @@ smb2_parse_contexts(struct TCP_Server_Info *server,
unsigned int next;
unsigned int remaining;
char *name;
+ const char smb3_create_tag_posix[] = {0x93, 0xAD, 0x25, 0x50, 0x9C,
+ 0xB4, 0x11, 0xE7, 0xB4, 0x23, 0x83,
+ 0xDE, 0x96, 0x8B, 0xCD, 0x7C};
On Thu, Feb 6, 2020 at 5:16 PM ronnie sahlberg <ronniesahlberg@xxxxxxxxx> wrote:
It is probably that m68k lage quite behind in GCC versions and
probably that compiler can not handle this construct:
1983 if (memcmp(name, (char []) {0x93, 0xAD, 0x25, 0x50,1984 0x9C, 0xB4, 0x11, 0xE7, 0xB4,
0x23, 0x83,
1985 0xDE, 0x96, 0x8B, 0xCD, 0x7C}, 16) == 0)and you would probably need something like this:
const char foo[] = {0x93, 0xAD, 0x25, 0x50, 0x9C, 0xB4, 0x11,
0xE7, 0xB4, 0x23, 0x83, 0xDE, 0x96, 0x8B, 0xCD, 0x7C};
if (memcmp(name, foo, sizeof(foo)) == 0)
...
On Fri, Feb 7, 2020 at 8:48 AM Steve French <smfrench@xxxxxxxxx> wrote:
It compiled and tested ok. Is this warning a limitation of the kbuild robot?
On Thu, Feb 6, 2020 at 4:26 PM kbuild test robot <lkp@xxxxxxxxx> wrote:
tree: git://git.samba.org/sfrench/cifs-2.6.git for-next
head: 58b322cfd219fd570d4fcc2e2eb8b5d945389d46
commit: 3d9d8c48232a668ada5f680f70c8b3d366629ab6 [10/11] smb3: print warning once if posix context returned on open
config: m68k-multi_defconfig (attached as .config)
compiler: m68k-linux-gcc (GCC) 7.5.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
git checkout 3d9d8c48232a668ada5f680f70c8b3d366629ab6
# save the attached .config to linux build tree
GCC_VERSION=7.5.0 make.cross ARCH=m68k
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@xxxxxxxxx>
All errors (new ones prefixed by >>):
fs/cifs/smb2pdu.c: In function 'smb2_parse_contexts':
0xDE, 0x96, 0x8B, 0xCD, 0x7C}, 16) == 0)fs/cifs/smb2pdu.c:1985:38: error: macro "memcmp" passed 18 arguments, but takes just 3
^
if (memcmp(name, (char []) {0x93, 0xAD, 0x25, 0x50,fs/cifs/smb2pdu.c:1983:8: error: 'memcmp' undeclared (first use in this function); did you mean 'memchr'?
^~~~~~
memchr
fs/cifs/smb2pdu.c:1983:8: note: each undeclared identifier is reported only once for each function it appears in