From: kbuild test robot <lkp@intel.com>
To: Hoeun Ryu <hoeun.ryu@gmail.com>
Cc: kbuild-all@01.org, Andrew Morton <akpm@linux-foundation.org>,
Michal Hocko <mhocko@suse.com>, Ingo Molnar <mingo@kernel.org>,
Andy Lutomirski <luto@kernel.org>,
Kees Cook <keescook@chromium.org>,
"Eric W. Biederman" <ebiederm@xmission.com>,
Mateusz Guzik <mguzik@redhat.com>,
linux-kernel@vger.kernel.org,
kernel-hardening@lists.openwall.com,
Hoeun Ryu <hoeun.ryu@gmail.com>
Subject: Re: [PATCH v2 1/2] fork: free vmapped stacks in cache when cpus are offline
Date: Thu, 9 Feb 2017 16:01:04 +0800 [thread overview]
Message-ID: <201702091508.y1BtYFQv%fengguang.wu@intel.com> (raw)
In-Reply-To: <1486613040-30555-1-git-send-email-hoeun.ryu@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 6743 bytes --]
Hi Hoeun,
[auto build test WARNING on next-20170208]
[also build test WARNING on v4.10-rc7]
[cannot apply to linus/master linux/master v4.9-rc8 v4.9-rc7 v4.9-rc6]
[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/Hoeun-Ryu/fork-free-vmapped-stacks-in-cache-when-cpus-are-offline/20170209-124143
config: i386-randconfig-x004-201706 (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
# save the attached .config to linux build tree
make ARCH=i386
All warnings (new ones prefixed by >>):
kernel/fork.c: In function 'free_vm_stack_cache':
kernel/fork.c:177:18: error: 'NR_CACHED_STACKS' undeclared (first use in this function)
for (i = 0; i < NR_CACHED_STACKS; i++) {
^~~~~~~~~~~~~~~~
kernel/fork.c:177:18: note: each undeclared identifier is reported only once for each function it appears in
In file included from include/asm-generic/percpu.h:6:0,
from arch/x86/include/asm/percpu.h:542,
from arch/x86/include/asm/preempt.h:5,
from include/linux/preempt.h:59,
from include/linux/spinlock.h:50,
from include/linux/mmzone.h:7,
from include/linux/gfp.h:5,
from include/linux/slab.h:14,
from kernel/fork.c:14:
kernel/fork.c:178:46: error: 'cached_stacks' undeclared (first use in this function)
struct vm_struct *vm_stack = this_cpu_read(cached_stacks[i]);
^
include/linux/percpu-defs.h:305:9: note: in definition of macro '__pcpu_size_call_return'
typeof(variable) pscr_ret__; \
^~~~~~~~
kernel/fork.c:178:32: note: in expansion of macro 'this_cpu_read'
struct vm_struct *vm_stack = this_cpu_read(cached_stacks[i]);
^~~~~~~~~~~~~
include/linux/percpu-defs.h:304:1: warning: initialization makes pointer from integer without a cast [-Wint-conversion]
({ \
^
include/linux/percpu-defs.h:494:29: note: in expansion of macro '__pcpu_size_call_return'
#define this_cpu_read(pcp) __pcpu_size_call_return(this_cpu_read_, pcp)
^~~~~~~~~~~~~~~~~~~~~~~
kernel/fork.c:178:32: note: in expansion of macro 'this_cpu_read'
struct vm_struct *vm_stack = this_cpu_read(cached_stacks[i]);
^~~~~~~~~~~~~
In file included from arch/x86/include/asm/preempt.h:5:0,
from include/linux/preempt.h:59,
from include/linux/spinlock.h:50,
from include/linux/mmzone.h:7,
from include/linux/gfp.h:5,
from include/linux/slab.h:14,
from kernel/fork.c:14:
>> arch/x86/include/asm/percpu.h:94:13: warning: assignment makes integer from pointer without a cast [-Wint-conversion]
pto_tmp__ = (val); \
^
arch/x86/include/asm/percpu.h:416:36: note: in expansion of macro 'percpu_to_op'
#define this_cpu_write_1(pcp, val) percpu_to_op("mov", (pcp), val)
^~~~~~~~~~~~
include/linux/percpu-defs.h:364:11: note: in expansion of macro 'this_cpu_write_1'
case 1: stem##1(variable, __VA_ARGS__);break; \
^~~~
include/linux/percpu-defs.h:495:34: note: in expansion of macro '__pcpu_size_call'
#define this_cpu_write(pcp, val) __pcpu_size_call(this_cpu_write_, pcp, val)
^~~~~~~~~~~~~~~~
>> kernel/fork.c:183:3: note: in expansion of macro 'this_cpu_write'
this_cpu_write(cached_stacks[i], NULL);
^~~~~~~~~~~~~~
>> arch/x86/include/asm/percpu.h:94:13: warning: assignment makes integer from pointer without a cast [-Wint-conversion]
pto_tmp__ = (val); \
^
arch/x86/include/asm/percpu.h:417:36: note: in expansion of macro 'percpu_to_op'
#define this_cpu_write_2(pcp, val) percpu_to_op("mov", (pcp), val)
^~~~~~~~~~~~
include/linux/percpu-defs.h:365:11: note: in expansion of macro 'this_cpu_write_2'
case 2: stem##2(variable, __VA_ARGS__);break; \
^~~~
include/linux/percpu-defs.h:495:34: note: in expansion of macro '__pcpu_size_call'
#define this_cpu_write(pcp, val) __pcpu_size_call(this_cpu_write_, pcp, val)
^~~~~~~~~~~~~~~~
>> kernel/fork.c:183:3: note: in expansion of macro 'this_cpu_write'
this_cpu_write(cached_stacks[i], NULL);
^~~~~~~~~~~~~~
>> arch/x86/include/asm/percpu.h:94:13: warning: assignment makes integer from pointer without a cast [-Wint-conversion]
pto_tmp__ = (val); \
^
arch/x86/include/asm/percpu.h:418:36: note: in expansion of macro 'percpu_to_op'
#define this_cpu_write_4(pcp, val) percpu_to_op("mov", (pcp), val)
^~~~~~~~~~~~
include/linux/percpu-defs.h:366:11: note: in expansion of macro 'this_cpu_write_4'
case 4: stem##4(variable, __VA_ARGS__);break; \
^~~~
include/linux/percpu-defs.h:495:34: note: in expansion of macro '__pcpu_size_call'
#define this_cpu_write(pcp, val) __pcpu_size_call(this_cpu_write_, pcp, val)
^~~~~~~~~~~~~~~~
>> kernel/fork.c:183:3: note: in expansion of macro 'this_cpu_write'
this_cpu_write(cached_stacks[i], NULL);
^~~~~~~~~~~~~~
At top level:
kernel/fork.c:173:12: warning: 'free_vm_stack_cache' defined but not used [-Wunused-function]
static int free_vm_stack_cache(unsigned int cpu)
^~~~~~~~~~~~~~~~~~~
vim +/this_cpu_write +183 kernel/fork.c
167 * flush. Try to minimize the number of calls by caching stacks.
168 */
169 #define NR_CACHED_STACKS 2
170 static DEFINE_PER_CPU(struct vm_struct *, cached_stacks[NR_CACHED_STACKS]);
171 #endif
172
173 static int free_vm_stack_cache(unsigned int cpu)
174 {
175 int i;
176
177 for (i = 0; i < NR_CACHED_STACKS; i++) {
178 struct vm_struct *vm_stack = this_cpu_read(cached_stacks[i]);
179 if (!vm_stack)
180 continue;
181
182 vfree(vm_stack->addr);
> 183 this_cpu_write(cached_stacks[i], NULL);
184 }
185
186 return 0;
187 }
188
189 static unsigned long *alloc_thread_stack_node(struct task_struct *tsk, int node)
190 {
191 #ifdef CONFIG_VMAP_STACK
---
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: 28107 bytes --]
next prev parent reply other threads:[~2017-02-09 8:03 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-09 4:03 [PATCH v2 1/2] fork: free vmapped stacks in cache when cpus are offline Hoeun Ryu
2017-02-09 4:03 ` [PATCH v2 2/2] fork: make number of cached stacks (vmapped) configurable using Kbuild Hoeun Ryu
2017-02-09 4:26 ` [kernel-hardening] " Eric Biggers
2017-02-09 8:40 ` Michal Hocko
2017-02-09 13:36 ` Hoeun Ryu
2017-02-09 4:22 ` [kernel-hardening] [PATCH v2 1/2] fork: free vmapped stacks in cache when cpus are offline Eric Biggers
2017-02-09 13:35 ` Hoeun Ryu
2017-02-09 7:28 ` kbuild test robot
2017-02-09 8:01 ` kbuild test robot [this message]
2017-02-09 8:38 ` Michal Hocko
2017-02-09 13:36 ` Hoeun Ryu
2017-02-09 10:26 ` 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=201702091508.y1BtYFQv%fengguang.wu@intel.com \
--to=lkp@intel.com \
--cc=akpm@linux-foundation.org \
--cc=ebiederm@xmission.com \
--cc=hoeun.ryu@gmail.com \
--cc=kbuild-all@01.org \
--cc=keescook@chromium.org \
--cc=kernel-hardening@lists.openwall.com \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@kernel.org \
--cc=mguzik@redhat.com \
--cc=mhocko@suse.com \
--cc=mingo@kernel.org \
/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).