From: Geert Uytterhoeven <geert@linux-m68k.org>
To: Steve French <smfrench@gmail.com>
Cc: "ronnie sahlberg" <ronniesahlberg@gmail.com>,
"kbuild test robot" <lkp@intel.com>,
CIFS <linux-cifs@vger.kernel.org>,
"Aurélien Aptel" <aaptel@suse.com>,
samba-technical <samba-technical@lists.samba.org>,
"Pavel Shilovsky" <piastryyy@gmail.com>,
linux-kernel@vger.kernel.org
Subject: Re: [cifs:for-next 10/11] fs/cifs/smb2pdu.c:1985:38: error: macro "memcmp" passed 18 arguments, but takes just 3
Date: Fri, 7 Feb 2020 09:12:35 +0100 (CET) [thread overview]
Message-ID: <alpine.DEB.2.21.2002070904270.23274@ramsan.of.borg> (raw)
In-Reply-To: <CAH2r5mvtYcc+=bKApMsb=Cg2VgiwPoEfV92cncfhFswjBmkKFw@mail.gmail.com>
Hi Steve,
On Thu, 6 Feb 2020, Steve French wrote:
> ok - changed as suggested. Tested out ok
> From ab3459d8f0ef52c38119ed58c4c29139efc7022c Mon Sep 17 00:00:00 2001
> From: Steve French <stfrench@microsoft.com>
> 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@microsoft.com>
> Reviewed-by: Aurelien Aptel <aaptel@suse.com>
> ---
> 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};
Given this data is used in 2 other places, you may want to make it
global, and use it in build_posix_ctxt() and create_posix_buf(), too.
> On Thu, Feb 6, 2020 at 5:16 PM ronnie sahlberg <ronniesahlberg@gmail.com> 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)
>> ...
This is not related to compiler version (I can trigger it with a small
test program on gcc-7 and gcc-8 on amd64), but due to the use of a
macro in arch/m68k/include/asm/string.h for providing memset():
#define memset(d, c, n) __builtin_memset(d, c, n)
As several other architectures do to the same (even x86, depending on
config options and other parameters), I guess it can be triggered there
as well.
>> On Fri, Feb 7, 2020 at 8:48 AM Steve French <smfrench@gmail.com> 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@intel.com> 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@intel.com>
>>>>
>>>> All errors (new ones prefixed by >>):
>>>>
>>>> fs/cifs/smb2pdu.c: In function 'smb2_parse_contexts':
>>>>>> fs/cifs/smb2pdu.c:1985:38: error: macro "memcmp" passed 18 arguments, but takes just 3
>>>> 0xDE, 0x96, 0x8B, 0xCD, 0x7C}, 16) == 0)
>>>> ^
>>>>>> fs/cifs/smb2pdu.c:1983:8: error: 'memcmp' undeclared (first use in this function); did you mean 'memchr'?
>>>> if (memcmp(name, (char []) {0x93, 0xAD, 0x25, 0x50,
>>>> ^~~~~~
>>>> memchr
>>>> fs/cifs/smb2pdu.c:1983:8: note: each undeclared identifier is reported only once for each function it appears in
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
prev parent reply other threads:[~2020-02-07 8:12 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-06 22:26 [cifs:for-next 10/11] fs/cifs/smb2pdu.c:1985:38: error: macro "memcmp" passed 18 arguments, but takes just 3 kbuild test robot
2020-02-06 22:47 ` Steve French
2020-02-06 23:16 ` ronnie sahlberg
2020-02-06 23:33 ` Steve French
2020-02-07 0:34 ` ronnie sahlberg
2020-02-07 8:12 ` Geert Uytterhoeven [this message]
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=alpine.DEB.2.21.2002070904270.23274@ramsan.of.borg \
--to=geert@linux-m68k.org \
--cc=aaptel@suse.com \
--cc=linux-cifs@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lkp@intel.com \
--cc=piastryyy@gmail.com \
--cc=ronniesahlberg@gmail.com \
--cc=samba-technical@lists.samba.org \
--cc=smfrench@gmail.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;
as well as URLs for NNTP newsgroup(s).