From: kbuild test robot <lkp@intel.com>
To: Rick Edgecombe <rick.p.edgecombe@intel.com>
Cc: kbuild-all@01.org, tglx@linutronix.de, mingo@redhat.com,
hpa@zytor.com, x86@kernel.org, linux-kernel@vger.kernel.org,
linux-mm@kvack.org, kernel-hardening@lists.openwall.com,
daniel@iogearbox.net, jannh@google.com, keescook@chromium.org,
alexei.starovoitov@gmail.com, kristen@linux.intel.com,
dave.hansen@intel.com, arjan@linux.intel.com,
Rick Edgecombe <rick.p.edgecombe@intel.com>
Subject: Re: [PATCH v5 4/4] Kselftest for module text allocation benchmarking
Date: Fri, 14 Sep 2018 05:50:13 +0800 [thread overview]
Message-ID: <201809140508.rTZIUWFA%fengguang.wu@intel.com> (raw)
In-Reply-To: <1536792940-8294-5-git-send-email-rick.p.edgecombe@intel.com>
[-- Attachment #1: Type: text/plain, Size: 3889 bytes --]
Hi Rick,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on linus/master]
[also build test ERROR on v4.19-rc3 next-20180913]
[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/Rick-Edgecombe/KASLR-feature-to-randomize-each-loadable-module/20180913-172302
config: openrisc-allyesconfig (attached as .config)
compiler: or1k-linux-gcc (GCC) 6.0.0 20160327 (experimental)
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=openrisc
All errors (new ones prefixed by >>):
lib/test_mod_alloc.c: In function 'do_check':
>> lib/test_mod_alloc.c:129:15: error: 'MODULES_VADDR' undeclared (first use in this function)
if (start < MODULES_VADDR ||
^~~~~~~~~~~~~
lib/test_mod_alloc.c:129:15: note: each undeclared identifier is reported only once for each function it appears in
>> lib/test_mod_alloc.c:130:26: error: 'MODULES_LEN' undeclared (first use in this function)
end > MODULES_VADDR + MODULES_LEN) {
^~~~~~~~~~~
lib/test_mod_alloc.c: In function 'device_file_write':
lib/test_mod_alloc.c:404:2: warning: ignoring return value of 'copy_from_user', declared with attribute warn_unused_result [-Wunused-result]
copy_from_user(buf, user_buf, count);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
lib/test_mod_alloc.c:407:3: warning: ignoring return value of 'kstrtol', declared with attribute warn_unused_result [-Wunused-result]
kstrtol(buf+1, 10, &new_mod_cnt);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
lib/test_mod_alloc.c:422:3: warning: ignoring return value of 'kstrtol', declared with attribute warn_unused_result [-Wunused-result]
kstrtol(buf + 1, 10, &iter);
^~~~~~~~~~~~~~~~~~~~~~~~~~~
vim +/MODULES_VADDR +129 lib/test_mod_alloc.c
89
90 static int do_check(void *ptr, unsigned long size)
91 {
92 int i;
93 unsigned long start = (unsigned long) ptr;
94 unsigned long end = calc_end(ptr, size);
95 unsigned long sum = 0;
96 unsigned long addr;
97
98 if (!start)
99 return 1;
100
101 for (i = 0; i < check_alloc_cnt; i++) {
102 struct check_alloc *cur_alloc = &(check_allocs[i]);
103
104 /* overlap end */
105 if (start >= cur_alloc->start && start < cur_alloc->vm_end) {
106 pr_info("overlap end\n");
107 return 1;
108 }
109
110 /* overlap start */
111 if (end >= cur_alloc->start && end < cur_alloc->start) {
112 pr_info("overlap start\n");
113 return 1;
114 }
115
116 /* overlap whole thing */
117 if (start <= cur_alloc->start && end > cur_alloc->vm_end) {
118 pr_info("overlap whole thing\n");
119 return 1;
120 }
121
122 /* inside */
123 if (start >= cur_alloc->start && end < cur_alloc->vm_end) {
124 pr_info("inside\n");
125 return 1;
126 }
127
128 /* bounds */
> 129 if (start < MODULES_VADDR ||
> 130 end > MODULES_VADDR + MODULES_LEN) {
131 pr_info("out of bounds\n");
132 return 1;
133 }
134 for (addr = cur_alloc->start;
135 addr < cur_alloc->real_end;
136 addr += PAGE_SIZE) {
137 sum += *((unsigned long *) addr);
138 }
139 if (sum != 0)
140 pr_info("Memory was not zeroed\n");
141
142 kasan_check_read((void *)cur_alloc->start,
143 cur_alloc->vm_end - cur_alloc->start - PAGE_SIZE);
144 }
145 return 0;
146 }
147
---
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: 46452 bytes --]
prev parent reply other threads:[~2018-09-13 21:51 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-12 22:55 [PATCH v5 0/4] KASLR feature to randomize each loadable module Rick Edgecombe
2018-09-12 22:55 ` [PATCH v5 1/4] vmalloc: Add __vmalloc_node_try_addr function Rick Edgecombe
2018-09-12 22:55 ` [PATCH v5 2/4] x86/modules: Increase randomization for modules Rick Edgecombe
2018-09-12 22:55 ` [PATCH v5 3/4] vmalloc: Add debugfs modfraginfo Rick Edgecombe
2018-09-12 22:55 ` [PATCH v5 4/4] Kselftest for module text allocation benchmarking Rick Edgecombe
2018-09-13 10:36 ` kbuild test robot
2018-09-13 21:50 ` 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=201809140508.rTZIUWFA%fengguang.wu@intel.com \
--to=lkp@intel.com \
--cc=alexei.starovoitov@gmail.com \
--cc=arjan@linux.intel.com \
--cc=daniel@iogearbox.net \
--cc=dave.hansen@intel.com \
--cc=hpa@zytor.com \
--cc=jannh@google.com \
--cc=kbuild-all@01.org \
--cc=keescook@chromium.org \
--cc=kernel-hardening@lists.openwall.com \
--cc=kristen@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mingo@redhat.com \
--cc=rick.p.edgecombe@intel.com \
--cc=tglx@linutronix.de \
--cc=x86@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).