From: kbuild test robot <lkp@intel.com>
To: Roberto Sassu <roberto.sassu@huawei.com>
Cc: kbuild-all@01.org, viro@zeniv.linux.org.uk,
linux-security-module@vger.kernel.org,
linux-integrity@vger.kernel.org, initramfs@vger.kernel.org,
linux-api@vger.kernel.org, linux-fsdevel@vger.kernel.org,
linux-kernel@vger.kernel.org, zohar@linux.vnet.ibm.com,
silviu.vlasceanu@huawei.com, dmitry.kasatkin@huawei.com,
takondra@cisco.com, kamensky@cisco.com, hpa@zytor.com,
arnd@arndb.de, rob@landley.net, james.w.mcmechan@gmail.com,
niveditas98@gmail.com, Roberto Sassu <roberto.sassu@huawei.com>
Subject: Re: [PATCH v3 2/2] initramfs: introduce do_readxattrs()
Date: Sat, 18 May 2019 07:09:12 +0800 [thread overview]
Message-ID: <201905180721.noI11xIn%lkp@intel.com> (raw)
In-Reply-To: <20190517165519.11507-3-roberto.sassu@huawei.com>
[-- Attachment #1: Type: text/plain, Size: 3884 bytes --]
Hi Roberto,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on linus/master]
[also build test ERROR on v5.1 next-20190517]
[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/Roberto-Sassu/initramfs-set-extended-attributes/20190518-055846
config: sparc64-allyesconfig (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
GCC_VERSION=7.2.0 make.cross ARCH=sparc64
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>
All error/warnings (new ones prefixed by >>):
init/initramfs.c: In function 'do_readxattrs':
>> init/initramfs.c:437:10: error: implicit declaration of function 'vmalloc'; did you mean 'kvmalloc'? [-Werror=implicit-function-declaration]
path = vmalloc(file_entry_size);
^~~~~~~
kvmalloc
>> init/initramfs.c:437:8: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
path = vmalloc(file_entry_size);
^
>> init/initramfs.c:461:3: error: implicit declaration of function 'vfree'; did you mean 'kvfree'? [-Werror=implicit-function-declaration]
vfree(path);
^~~~~
kvfree
cc1: some warnings being treated as errors
vim +437 init/initramfs.c
391
392 static int __init do_readxattrs(void)
393 {
394 struct path_hdr hdr;
395 char *path = NULL;
396 char str[sizeof(hdr.p_size) + 1];
397 unsigned long file_entry_size;
398 size_t size, path_size, total_size;
399 struct kstat st;
400 struct file *file;
401 loff_t pos;
402 int ret;
403
404 ret = vfs_lstat(XATTR_LIST_FILENAME, &st);
405 if (ret < 0)
406 return ret;
407
408 total_size = st.size;
409
410 file = filp_open(XATTR_LIST_FILENAME, O_RDONLY, 0);
411 if (IS_ERR(file))
412 return PTR_ERR(file);
413
414 pos = file->f_pos;
415
416 while (total_size) {
417 size = kernel_read(file, (char *)&hdr, sizeof(hdr), &pos);
418 if (size != sizeof(hdr)) {
419 ret = -EIO;
420 goto out;
421 }
422
423 total_size -= size;
424
425 str[sizeof(hdr.p_size)] = 0;
426 memcpy(str, hdr.p_size, sizeof(hdr.p_size));
427 ret = kstrtoul(str, 16, &file_entry_size);
428 if (ret < 0)
429 goto out;
430
431 file_entry_size -= sizeof(sizeof(hdr.p_size));
432 if (file_entry_size > total_size) {
433 ret = -EINVAL;
434 goto out;
435 }
436
> 437 path = vmalloc(file_entry_size);
438 if (!path) {
439 ret = -ENOMEM;
440 goto out;
441 }
442
443 size = kernel_read(file, path, file_entry_size, &pos);
444 if (size != file_entry_size) {
445 ret = -EIO;
446 goto out_free;
447 }
448
449 total_size -= size;
450
451 path_size = strnlen(path, file_entry_size);
452 if (path_size == file_entry_size) {
453 ret = -EINVAL;
454 goto out_free;
455 }
456
457 xattr_buf = path + path_size + 1;
458 xattr_len = file_entry_size - path_size - 1;
459
460 ret = do_setxattrs(path);
> 461 vfree(path);
462 path = NULL;
463
464 if (ret < 0)
465 break;
466 }
467 out_free:
468 vfree(path);
469 out:
470 fput(file);
471
472 if (ret < 0)
473 error("Unable to parse xattrs");
474
475 return ret;
476 }
477
---
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: 57391 bytes --]
next prev parent reply other threads:[~2019-05-17 23:10 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-17 16:55 [PATCH v3 0/2] initramfs: add support for xattrs in the initial ram disk Roberto Sassu
2019-05-17 16:55 ` [PATCH v3 1/2] initramfs: set extended attributes Roberto Sassu
2019-05-17 16:55 ` [PATCH v3 2/2] initramfs: introduce do_readxattrs() Roberto Sassu
2019-05-17 20:18 ` hpa
2019-05-17 21:02 ` Arvind Sankar
2019-05-17 21:10 ` Arvind Sankar
2019-05-20 8:16 ` Roberto Sassu
2019-05-17 21:47 ` H. Peter Anvin
2019-05-17 22:17 ` Arvind Sankar
2019-05-20 9:39 ` Roberto Sassu
2019-05-22 16:17 ` hpa
2019-05-22 17:22 ` Roberto Sassu
2019-05-22 19:26 ` Rob Landley
2019-05-22 20:21 ` Taras Kondratiuk
2019-05-17 21:17 ` Rob Landley
2019-05-17 21:41 ` H. Peter Anvin
2019-05-18 2:16 ` Rob Landley
2019-05-22 16:18 ` hpa
2019-05-20 8:47 ` Roberto Sassu
2019-05-17 23:09 ` kbuild test robot [this message]
2019-05-18 1:02 ` kbuild test robot
2019-05-18 5:49 ` kbuild test robot
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=201905180721.noI11xIn%lkp@intel.com \
--to=lkp@intel.com \
--cc=arnd@arndb.de \
--cc=dmitry.kasatkin@huawei.com \
--cc=hpa@zytor.com \
--cc=initramfs@vger.kernel.org \
--cc=james.w.mcmechan@gmail.com \
--cc=kamensky@cisco.com \
--cc=kbuild-all@01.org \
--cc=linux-api@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-integrity@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-security-module@vger.kernel.org \
--cc=niveditas98@gmail.com \
--cc=rob@landley.net \
--cc=roberto.sassu@huawei.com \
--cc=silviu.vlasceanu@huawei.com \
--cc=takondra@cisco.com \
--cc=viro@zeniv.linux.org.uk \
--cc=zohar@linux.vnet.ibm.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).