All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Ronnie Sahlberg <lsahlber@redhat.com>,
	linux-cifs <linux-cifs@vger.kernel.org>
Cc: clang-built-linux@googlegroups.com, kbuild-all@lists.01.org,
	Steve French <smfrench@gmail.com>
Subject: Re: [PATCH 2/3] cifs: move calc_lanman_hash to smb1ops.c
Date: Sat, 14 Aug 2021 10:08:39 +0800	[thread overview]
Message-ID: <202108141014.0daU8a9w-lkp@intel.com> (raw)
In-Reply-To: <20210813195644.937810-3-lsahlber@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 3581 bytes --]

Hi Ronnie,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on cifs/for-next]
[also build test ERROR on v5.14-rc5 next-20210813]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Ronnie-Sahlberg/cifs-only-compile-in-smb1ops-c-if-we-configure-CIFS_ALLOW_INSECURE_LEGACY/20210814-045731
base:   git://git.samba.org/sfrench/cifs-2.6.git for-next
config: hexagon-randconfig-r041-20210814 (attached as .config)
compiler: clang version 12.0.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://github.com/0day-ci/linux/commit/2a89ec2d759f8c3c9035498c5ef1bf66a8f8b07b
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Ronnie-Sahlberg/cifs-only-compile-in-smb1ops-c-if-we-configure-CIFS_ALLOW_INSECURE_LEGACY/20210814-045731
        git checkout 2a89ec2d759f8c3c9035498c5ef1bf66a8f8b07b
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=hexagon 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

>> fs/cifs/smb1ops.c:51:26: error: implicitly declaring library function 'toupper' with type 'int (int)' [-Werror,-Wimplicit-function-declaration]
                   password_with_pad[i] = toupper(password_with_pad[i]);
                                          ^
   fs/cifs/smb1ops.c:51:26: note: include the header <ctype.h> or explicitly provide a declaration for 'toupper'
   1 error generated.


vim +51 fs/cifs/smb1ops.c

    16	
    17	#ifdef CONFIG_CIFS_WEAK_PW_HASH
    18	int calc_lanman_hash(const char *password, const char *cryptkey, bool encrypt,
    19				char *lnm_session_key)
    20	{
    21		int i, len;
    22		int rc;
    23		char password_with_pad[CIFS_ENCPWD_SIZE] = {0};
    24	
    25		if (password) {
    26			for (len = 0; len < CIFS_ENCPWD_SIZE; len++)
    27				if (!password[len])
    28					break;
    29	
    30			memcpy(password_with_pad, password, len);
    31		}
    32	
    33		if (!encrypt && global_secflags & CIFSSEC_MAY_PLNTXT) {
    34			memcpy(lnm_session_key, password_with_pad,
    35				CIFS_ENCPWD_SIZE);
    36			return 0;
    37		}
    38	
    39		/* calculate old style session key */
    40		/* calling toupper is less broken than repeatedly
    41		calling nls_toupper would be since that will never
    42		work for UTF8, but neither handles multibyte code pages
    43		but the only alternative would be converting to UCS-16 (Unicode)
    44		(using a routine something like UniStrupr) then
    45		uppercasing and then converting back from Unicode - which
    46		would only worth doing it if we knew it were utf8. Basically
    47		utf8 and other multibyte codepages each need their own strupper
    48		function since a byte at a time will ont work. */
    49	
    50		for (i = 0; i < CIFS_ENCPWD_SIZE; i++)
  > 51			password_with_pad[i] = toupper(password_with_pad[i]);
    52	
    53		rc = SMBencrypt(password_with_pad, cryptkey, lnm_session_key);
    54	
    55		return rc;
    56	}
    57	#endif /* CIFS_WEAK_PW_HASH */
    58	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 25339 bytes --]

WARNING: multiple messages have this Message-ID (diff)
From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: Re: [PATCH 2/3] cifs: move calc_lanman_hash to smb1ops.c
Date: Sat, 14 Aug 2021 10:08:39 +0800	[thread overview]
Message-ID: <202108141014.0daU8a9w-lkp@intel.com> (raw)
In-Reply-To: <20210813195644.937810-3-lsahlber@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 3665 bytes --]

Hi Ronnie,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on cifs/for-next]
[also build test ERROR on v5.14-rc5 next-20210813]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Ronnie-Sahlberg/cifs-only-compile-in-smb1ops-c-if-we-configure-CIFS_ALLOW_INSECURE_LEGACY/20210814-045731
base:   git://git.samba.org/sfrench/cifs-2.6.git for-next
config: hexagon-randconfig-r041-20210814 (attached as .config)
compiler: clang version 12.0.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://github.com/0day-ci/linux/commit/2a89ec2d759f8c3c9035498c5ef1bf66a8f8b07b
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Ronnie-Sahlberg/cifs-only-compile-in-smb1ops-c-if-we-configure-CIFS_ALLOW_INSECURE_LEGACY/20210814-045731
        git checkout 2a89ec2d759f8c3c9035498c5ef1bf66a8f8b07b
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=hexagon 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

>> fs/cifs/smb1ops.c:51:26: error: implicitly declaring library function 'toupper' with type 'int (int)' [-Werror,-Wimplicit-function-declaration]
                   password_with_pad[i] = toupper(password_with_pad[i]);
                                          ^
   fs/cifs/smb1ops.c:51:26: note: include the header <ctype.h> or explicitly provide a declaration for 'toupper'
   1 error generated.


vim +51 fs/cifs/smb1ops.c

    16	
    17	#ifdef CONFIG_CIFS_WEAK_PW_HASH
    18	int calc_lanman_hash(const char *password, const char *cryptkey, bool encrypt,
    19				char *lnm_session_key)
    20	{
    21		int i, len;
    22		int rc;
    23		char password_with_pad[CIFS_ENCPWD_SIZE] = {0};
    24	
    25		if (password) {
    26			for (len = 0; len < CIFS_ENCPWD_SIZE; len++)
    27				if (!password[len])
    28					break;
    29	
    30			memcpy(password_with_pad, password, len);
    31		}
    32	
    33		if (!encrypt && global_secflags & CIFSSEC_MAY_PLNTXT) {
    34			memcpy(lnm_session_key, password_with_pad,
    35				CIFS_ENCPWD_SIZE);
    36			return 0;
    37		}
    38	
    39		/* calculate old style session key */
    40		/* calling toupper is less broken than repeatedly
    41		calling nls_toupper would be since that will never
    42		work for UTF8, but neither handles multibyte code pages
    43		but the only alternative would be converting to UCS-16 (Unicode)
    44		(using a routine something like UniStrupr) then
    45		uppercasing and then converting back from Unicode - which
    46		would only worth doing it if we knew it were utf8. Basically
    47		utf8 and other multibyte codepages each need their own strupper
    48		function since a byte@a time will ont work. */
    49	
    50		for (i = 0; i < CIFS_ENCPWD_SIZE; i++)
  > 51			password_with_pad[i] = toupper(password_with_pad[i]);
    52	
    53		rc = SMBencrypt(password_with_pad, cryptkey, lnm_session_key);
    54	
    55		return rc;
    56	}
    57	#endif /* CIFS_WEAK_PW_HASH */
    58	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 25339 bytes --]

  reply	other threads:[~2021-08-14  2:08 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-13 19:56 cifs: only compile with DES when building with SMB1 support Ronnie Sahlberg
2021-08-13 19:56 ` [PATCH 1/3] cifs: only compile in smb1ops.c if we configure CIFS_ALLOW_INSECURE_LEGACY Ronnie Sahlberg
2021-08-13 19:56 ` [PATCH 2/3] cifs: move calc_lanman_hash to smb1ops.c Ronnie Sahlberg
2021-08-14  2:08   ` kernel test robot [this message]
2021-08-14  2:08     ` kernel test robot
2021-08-14 19:45   ` kernel test robot
2021-08-14 19:45     ` kernel test robot
2021-08-13 19:56 ` [PATCH 3/3] cifs: move functions that depend on DES to smp1ops.c Ronnie Sahlberg
2021-08-13 20:12 ` cifs: only compile with DES when building with SMB1 support Steve French
2021-08-13 20:13 ` Steve French
  -- strict thread matches above, loose matches on Subject: below --
2021-08-17  5:24 [PATCH 1/3] cifs: only compile in smb1ops.c if we configure CIFS_ALLOW_INSECURE_LEGACY Ronnie Sahlberg
2021-08-17  5:24 ` [PATCH 2/3] cifs: move calc_lanman_hash to smb1ops.c Ronnie Sahlberg

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=202108141014.0daU8a9w-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=clang-built-linux@googlegroups.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-cifs@vger.kernel.org \
    --cc=lsahlber@redhat.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.