linux-cifs.vger.kernel.org archive mirror
 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: kbuild-all@lists.01.org, Steve French <smfrench@gmail.com>
Subject: Re: [PATCH] cifs: fork arc4 and add a private copy in fs/cifs
Date: Fri, 20 Aug 2021 09:59:07 +0800	[thread overview]
Message-ID: <202108200912.S96izB9l-lkp@intel.com> (raw)
In-Reply-To: <20210819032044.1269514-1-lsahlber@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 5495 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 next-20210819]
[cannot apply to v5.14-rc6]
[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-fork-arc4-and-add-a-private-copy-in-fs-cifs/20210819-112323
base:   git://git.samba.org/sfrench/cifs-2.6.git for-next
config: x86_64-randconfig-a001-20210818 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
        # https://github.com/0day-ci/linux/commit/370a85a8919b6e79ab8f83007d030b157981b7cf
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Ronnie-Sahlberg/cifs-fork-arc4-and-add-a-private-copy-in-fs-cifs/20210819-112323
        git checkout 370a85a8919b6e79ab8f83007d030b157981b7cf
        # save the attached .config to linux build tree
        make W=1 ARCH=x86_64 

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 >>):

   ld: lib/crypto/arc4.o: in function `arc4_setkey':
>> lib/crypto/arc4.c:14: multiple definition of `arc4_setkey'; fs/cifs/arc4.o:fs/cifs/arc4.c:13: first defined here
   ld: lib/crypto/arc4.o: in function `arc4_crypt':
>> lib/crypto/arc4.c:43: multiple definition of `arc4_crypt'; fs/cifs/arc4.o:fs/cifs/arc4.c:41: first defined here


vim +14 lib/crypto/arc4.c

dc51f25752bfcb Ard Biesheuvel 2019-06-12  12  
dc51f25752bfcb Ard Biesheuvel 2019-06-12  13  int arc4_setkey(struct arc4_ctx *ctx, const u8 *in_key, unsigned int key_len)
dc51f25752bfcb Ard Biesheuvel 2019-06-12 @14  {
dc51f25752bfcb Ard Biesheuvel 2019-06-12  15  	int i, j = 0, k = 0;
dc51f25752bfcb Ard Biesheuvel 2019-06-12  16  
dc51f25752bfcb Ard Biesheuvel 2019-06-12  17  	ctx->x = 1;
dc51f25752bfcb Ard Biesheuvel 2019-06-12  18  	ctx->y = 0;
dc51f25752bfcb Ard Biesheuvel 2019-06-12  19  
dc51f25752bfcb Ard Biesheuvel 2019-06-12  20  	for (i = 0; i < 256; i++)
dc51f25752bfcb Ard Biesheuvel 2019-06-12  21  		ctx->S[i] = i;
dc51f25752bfcb Ard Biesheuvel 2019-06-12  22  
dc51f25752bfcb Ard Biesheuvel 2019-06-12  23  	for (i = 0; i < 256; i++) {
dc51f25752bfcb Ard Biesheuvel 2019-06-12  24  		u32 a = ctx->S[i];
dc51f25752bfcb Ard Biesheuvel 2019-06-12  25  
dc51f25752bfcb Ard Biesheuvel 2019-06-12  26  		j = (j + in_key[k] + a) & 0xff;
dc51f25752bfcb Ard Biesheuvel 2019-06-12  27  		ctx->S[i] = ctx->S[j];
dc51f25752bfcb Ard Biesheuvel 2019-06-12  28  		ctx->S[j] = a;
dc51f25752bfcb Ard Biesheuvel 2019-06-12  29  		if (++k >= key_len)
dc51f25752bfcb Ard Biesheuvel 2019-06-12  30  			k = 0;
dc51f25752bfcb Ard Biesheuvel 2019-06-12  31  	}
dc51f25752bfcb Ard Biesheuvel 2019-06-12  32  
dc51f25752bfcb Ard Biesheuvel 2019-06-12  33  	return 0;
dc51f25752bfcb Ard Biesheuvel 2019-06-12  34  }
dc51f25752bfcb Ard Biesheuvel 2019-06-12  35  EXPORT_SYMBOL(arc4_setkey);
dc51f25752bfcb Ard Biesheuvel 2019-06-12  36  
dc51f25752bfcb Ard Biesheuvel 2019-06-12  37  void arc4_crypt(struct arc4_ctx *ctx, u8 *out, const u8 *in, unsigned int len)
dc51f25752bfcb Ard Biesheuvel 2019-06-12  38  {
dc51f25752bfcb Ard Biesheuvel 2019-06-12  39  	u32 *const S = ctx->S;
dc51f25752bfcb Ard Biesheuvel 2019-06-12  40  	u32 x, y, a, b;
dc51f25752bfcb Ard Biesheuvel 2019-06-12  41  	u32 ty, ta, tb;
dc51f25752bfcb Ard Biesheuvel 2019-06-12  42  
dc51f25752bfcb Ard Biesheuvel 2019-06-12 @43  	if (len == 0)
dc51f25752bfcb Ard Biesheuvel 2019-06-12  44  		return;
dc51f25752bfcb Ard Biesheuvel 2019-06-12  45  
dc51f25752bfcb Ard Biesheuvel 2019-06-12  46  	x = ctx->x;
dc51f25752bfcb Ard Biesheuvel 2019-06-12  47  	y = ctx->y;
dc51f25752bfcb Ard Biesheuvel 2019-06-12  48  
dc51f25752bfcb Ard Biesheuvel 2019-06-12  49  	a = S[x];
dc51f25752bfcb Ard Biesheuvel 2019-06-12  50  	y = (y + a) & 0xff;
dc51f25752bfcb Ard Biesheuvel 2019-06-12  51  	b = S[y];
dc51f25752bfcb Ard Biesheuvel 2019-06-12  52  
dc51f25752bfcb Ard Biesheuvel 2019-06-12  53  	do {
dc51f25752bfcb Ard Biesheuvel 2019-06-12  54  		S[y] = a;
dc51f25752bfcb Ard Biesheuvel 2019-06-12  55  		a = (a + b) & 0xff;
dc51f25752bfcb Ard Biesheuvel 2019-06-12  56  		S[x] = b;
dc51f25752bfcb Ard Biesheuvel 2019-06-12  57  		x = (x + 1) & 0xff;
dc51f25752bfcb Ard Biesheuvel 2019-06-12  58  		ta = S[x];
dc51f25752bfcb Ard Biesheuvel 2019-06-12  59  		ty = (y + ta) & 0xff;
dc51f25752bfcb Ard Biesheuvel 2019-06-12  60  		tb = S[ty];
dc51f25752bfcb Ard Biesheuvel 2019-06-12  61  		*out++ = *in++ ^ S[a];
dc51f25752bfcb Ard Biesheuvel 2019-06-12  62  		if (--len == 0)
dc51f25752bfcb Ard Biesheuvel 2019-06-12  63  			break;
dc51f25752bfcb Ard Biesheuvel 2019-06-12  64  		y = ty;
dc51f25752bfcb Ard Biesheuvel 2019-06-12  65  		a = ta;
dc51f25752bfcb Ard Biesheuvel 2019-06-12  66  		b = tb;
dc51f25752bfcb Ard Biesheuvel 2019-06-12  67  	} while (true);
dc51f25752bfcb Ard Biesheuvel 2019-06-12  68  
dc51f25752bfcb Ard Biesheuvel 2019-06-12  69  	ctx->x = x;
dc51f25752bfcb Ard Biesheuvel 2019-06-12  70  	ctx->y = y;
dc51f25752bfcb Ard Biesheuvel 2019-06-12  71  }
dc51f25752bfcb Ard Biesheuvel 2019-06-12  72  EXPORT_SYMBOL(arc4_crypt);
dc51f25752bfcb Ard Biesheuvel 2019-06-12  73  

---
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: 42021 bytes --]

      reply	other threads:[~2021-08-20  1:59 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-19  3:20 [PATCH] cifs: fork arc4 and add a private copy in fs/cifs Ronnie Sahlberg
2021-08-20  1:59 ` kernel test robot [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=202108200912.S96izB9l-lkp@intel.com \
    --to=lkp@intel.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 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).