Re: [PATCH net 2/2] bpf: fix overflow in prog accounting
From: kbuild test robot <hidden>
Date: 2016-12-17 02:53:24
Hi Daniel, [auto build test ERROR on net/master] url: https://github.com/0day-ci/linux/commits/Daniel-Borkmann/bpf-dynamically-allocate-digest-scratch-buffer/20161217-090046 config: sparc-defconfig (attached as .config) compiler: sparc-linux-gcc (GCC) 6.2.0 reproduce: wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # save the attached .config to linux build tree make.cross ARCH=sparc All errors (new ones prefixed by >>): kernel/bpf/core.c: In function '__bpf_prog_charge':
quoted
kernel/bpf/core.c:80:50: error: 'struct user_struct' has no member named 'locked_vm'; did you mean 'locked_shm'?
user_bufs = atomic_long_add_return(pages, &user->locked_vm);
^~
kernel/bpf/core.c:82:32: error: 'struct user_struct' has no member named 'locked_vm'; did you mean 'locked_shm'?
atomic_long_sub(pages, &user->locked_vm);
^~
kernel/bpf/core.c: In function '__bpf_prog_uncharge':
kernel/bpf/core.c:93:31: error: 'struct user_struct' has no member named 'locked_vm'; did you mean 'locked_shm'?
atomic_long_sub(pages, &user->locked_vm);
^~
vim +80 kernel/bpf/core.c
74 static int __bpf_prog_charge(struct user_struct *user, u32 pages)
75 {
76 unsigned long memlock_limit = rlimit(RLIMIT_MEMLOCK) >> PAGE_SHIFT;
77 unsigned long user_bufs;
78
79 if (user) {
> 80 user_bufs = atomic_long_add_return(pages, &user->locked_vm);
81 if (user_bufs > memlock_limit) {
82 atomic_long_sub(pages, &user->locked_vm);
83 return -EPERM;
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation Attachments
- .config.gz [application/gzip] 11602 bytes