Linux cryptographic layer development
 help / color / mirror / Atom feed
From: kbuild test robot <lkp@intel.com>
To: Kyle Spiers <ksspiers@google.com>
Cc: kbuild-all@01.org, dan.j.williams@intel.com,
	herbert@gondor.apana.org.au, davem@davemloft.net,
	keescook@chromium.org, vinod.koul@intel.com,
	ray.jui@broadcom.com, anup.patel@broadcom.com,
	linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org,
	Kyle Spiers <ksspiers@google.com>
Subject: Re: [PATCH] async_pq: Remove VLA usage
Date: Sat, 5 May 2018 02:25:35 +0800	[thread overview]
Message-ID: <201805050254.GXf00Wwd%fengguang.wu@intel.com> (raw)
In-Reply-To: <20180503225716.154235-1-ksspiers@google.com>

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

Hi Kyle,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on cryptodev/master]
[also build test ERROR on v4.17-rc3 next-20180504]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Kyle-Spiers/async_pq-Remove-VLA-usage/20180505-012638
base:   https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git master
config: sparc64-allmodconfig (attached as .config)
compiler: sparc64-linux-gnu-gcc (Debian 7.2.0-11) 7.2.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        make.cross ARCH=sparc64 

All error/warnings (new ones prefixed by >>):

   crypto/async_tx/raid6test.c: In function 'raid6_dual_recov':
>> crypto/async_tx/raid6test.c:89:13: error: implicit declaration of function 'kmalloc_array'; did you mean 'kvmalloc_array'? [-Werror=implicit-function-declaration]
       blocks = kmalloc_array(disks, sizeof(*blocks),
                ^~~~~~~~~~~~~
                kvmalloc_array
>> crypto/async_tx/raid6test.c:89:11: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
       blocks = kmalloc_array(disks, sizeof(*blocks),
              ^
>> crypto/async_tx/raid6test.c:109:4: error: implicit declaration of function 'kfree'; did you mean 'kvfree'? [-Werror=implicit-function-declaration]
       kfree(blocks);
       ^~~~~
       kvfree
   cc1: some warnings being treated as errors

vim +89 crypto/async_tx/raid6test.c

    66	
    67	/* Recover two failed blocks. */
    68	static void raid6_dual_recov(int disks, size_t bytes, int faila, int failb, struct page **ptrs)
    69	{
    70		struct async_submit_ctl submit;
    71		struct completion cmp;
    72		struct dma_async_tx_descriptor *tx = NULL;
    73		enum sum_check_flags result = ~0;
    74	
    75		if (faila > failb)
    76			swap(faila, failb);
    77	
    78		if (failb == disks-1) {
    79			if (faila == disks-2) {
    80				/* P+Q failure.  Just rebuild the syndrome. */
    81				init_async_submit(&submit, 0, NULL, NULL, NULL, addr_conv);
    82				tx = async_gen_syndrome(ptrs, 0, disks, bytes, &submit);
    83			} else {
    84				struct page **blocks;
    85				struct page *dest;
    86				int count = 0;
    87				int i;
    88	
  > 89				blocks = kmalloc_array(disks, sizeof(*blocks),
    90								GFP_KERNEL);
    91				if (!blocks)
    92					return;
    93	
    94				/* data+Q failure.  Reconstruct data from P,
    95				 * then rebuild syndrome
    96				 */
    97				for (i = disks; i-- ; ) {
    98					if (i == faila || i == failb)
    99						continue;
   100					blocks[count++] = ptrs[i];
   101				}
   102				dest = ptrs[faila];
   103				init_async_submit(&submit, ASYNC_TX_XOR_ZERO_DST, NULL,
   104						  NULL, NULL, addr_conv);
   105				tx = async_xor(dest, blocks, 0, count, bytes, &submit);
   106	
   107				init_async_submit(&submit, 0, tx, NULL, NULL, addr_conv);
   108				tx = async_gen_syndrome(ptrs, 0, disks, bytes, &submit);
 > 109				kfree(blocks);
   110			}
   111		} else {
   112			if (failb == disks-2) {
   113				/* data+P failure. */
   114				init_async_submit(&submit, 0, NULL, NULL, NULL, addr_conv);
   115				tx = async_raid6_datap_recov(disks, bytes, faila, ptrs, &submit);
   116			} else {
   117				/* data+data failure. */
   118				init_async_submit(&submit, 0, NULL, NULL, NULL, addr_conv);
   119				tx = async_raid6_2data_recov(disks, bytes, faila, failb, ptrs, &submit);
   120			}
   121		}
   122		init_completion(&cmp);
   123		init_async_submit(&submit, ASYNC_TX_ACK, tx, callback, &cmp, addr_conv);
   124		tx = async_syndrome_val(ptrs, 0, disks, bytes, &result, spare, &submit);
   125		async_tx_issue_pending(tx);
   126	
   127		if (wait_for_completion_timeout(&cmp, msecs_to_jiffies(3000)) == 0)
   128			pr("%s: timeout! (faila: %d failb: %d disks: %d)\n",
   129			   __func__, faila, failb, disks);
   130	
   131		if (result != 0)
   132			pr("%s: validation failure! faila: %d failb: %d sum_check_flags: %x\n",
   133			   __func__, faila, failb, result);
   134	}
   135	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

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

      parent reply	other threads:[~2018-05-04 18:25 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-03 22:57 [PATCH] async_pq: Remove VLA usage Kyle Spiers
2018-05-03 23:32 ` Kees Cook
2018-05-04 18:25 ` kbuild 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=201805050254.GXf00Wwd%fengguang.wu@intel.com \
    --to=lkp@intel.com \
    --cc=anup.patel@broadcom.com \
    --cc=dan.j.williams@intel.com \
    --cc=davem@davemloft.net \
    --cc=herbert@gondor.apana.org.au \
    --cc=kbuild-all@01.org \
    --cc=keescook@chromium.org \
    --cc=ksspiers@google.com \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ray.jui@broadcom.com \
    --cc=vinod.koul@intel.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