lkml.org 
[lkml]   [2015]   [Oct]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [net-next PATCH] bpf: Output error message to logbuf when loading
Hi Wang,

[auto build test WARNING on net-next/master -- if it's inappropriate base, please suggest rules for selecting the more suitable base]

url: https://github.com/0day-ci/linux/commits/Wang-Nan/bpf-Output-error-message-to-logbuf-when-loading/20151026-143920
config: x86_64-randconfig-x019-201543 (attached as .config)
reproduce:
# save the attached .config to linux build tree
make ARCH=x86_64

All warnings (new ones prefixed by >>):

kernel/bpf/syscall.c: In function 'bpf_prog_load_note':
>> kernel/bpf/syscall.c:600:2: warning: ignoring return value of 'copy_to_user', declared with attribute warn_unused_result [-Wunused-result]
copy_to_user(log_ubuf, log_buf, log_size);
^

vim +/copy_to_user +600 kernel/bpf/syscall.c

584 va_list args;
585
586 log_ubuf = (char __user *) (unsigned long) attr->log_buf;
587 log_level = attr->log_level;
588 log_size = sizeof(log_buf);
589 if (attr->log_size < log_size)
590 log_size = attr->log_size;
591
592 if (log_level == 0 || !log_size || !log_ubuf)
593 return;
594
595 va_start(args, fmt);
596 log_len = vscnprintf(log_buf, log_size, fmt, args);
597 va_end(args);
598
599 /* Don't need to care the copying result too much */
> 600 copy_to_user(log_ubuf, log_buf, log_size);
601 }
602
603 /* last field in 'union bpf_attr' used by this command */
604 #define BPF_PROG_LOAD_LAST_FIELD kern_version
605
606 static int bpf_prog_load(union bpf_attr *attr)
607 {
608 enum bpf_prog_type type = attr->prog_type;

---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[unhandled content-type:application/octet-stream]
\
 
 \ /
  Last update: 2015-10-26 08:01    [W:0.054 / U:0.116 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site