From: kbuild test robot <lkp@intel.com>
To: Andrey Ryabinin <aryabinin@virtuozzo.com>
Cc: kbuild-all@01.org, Andrew Morton <akpm@linux-foundation.org>,
Dave Chinner <david@fromorbit.com>,
kasan-dev@googlegroups.com, linux-kernel@vger.kernel.org,
linux-mm@kvack.org, Dan Williams <dan.j.williams@intel.com>,
Dmitry Vyukov <dvyukov@google.com>,
Alexander Potapenko <glider@google.com>
Subject: Re: [PATCH] kernel/memremap, kasan: Make ZONE_DEVICE with work with KASAN
Date: Tue, 26 Jun 2018 03:51:59 +0800 [thread overview]
Message-ID: <201806260235.aJEs8rqZ%fengguang.wu@intel.com> (raw)
In-Reply-To: <20180625170259.30393-1-aryabinin@virtuozzo.com>
[-- Attachment #1: Type: text/plain, Size: 4009 bytes --]
Hi Andrey,
I love your patch! Yet something to improve:
[auto build test ERROR on linus/master]
[also build test ERROR on v4.18-rc2]
[cannot apply to next-20180625]
[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/Andrey-Ryabinin/kernel-memremap-kasan-Make-ZONE_DEVICE-with-work-with-KASAN/20180626-023131
config: xtensa-allyesconfig (attached as .config)
compiler: xtensa-linux-gcc (GCC) 8.1.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=8.1.0 make.cross ARCH=xtensa
All error/warnings (new ones prefixed by >>):
mm/kasan/kasan_init.c: In function 'kasan_populate_zero_shadow':
>> mm/kasan/kasan_init.c:267:9: error: implicit declaration of function 'p4d_alloc_one'; did you mean 'pud_alloc_one'? [-Werror=implicit-function-declaration]
p = p4d_alloc_one(&init_mm, addr);
^~~~~~~~~~~~~
pud_alloc_one
>> mm/kasan/kasan_init.c:267:7: warning: assignment to 'pgd_t *' {aka 'struct <anonymous> *'} from 'int' makes pointer from integer without a cast [-Wint-conversion]
p = p4d_alloc_one(&init_mm, addr);
^
cc1: some warnings being treated as errors
vim +267 mm/kasan/kasan_init.c
211
212 /**
213 * kasan_populate_zero_shadow - populate shadow memory region with
214 * kasan_zero_page
215 * @shadow_start - start of the memory range to populate
216 * @shadow_end - end of the memory range to populate
217 */
218 int __ref kasan_populate_zero_shadow(const void *shadow_start,
219 const void *shadow_end)
220 {
221 unsigned long addr = (unsigned long)shadow_start;
222 unsigned long end = (unsigned long)shadow_end;
223 pgd_t *pgd = pgd_offset_k(addr);
224 unsigned long next;
225
226 do {
227 next = pgd_addr_end(addr, end);
228
229 if (IS_ALIGNED(addr, PGDIR_SIZE) && end - addr >= PGDIR_SIZE) {
230 p4d_t *p4d;
231 pud_t *pud;
232 pmd_t *pmd;
233
234 /*
235 * kasan_zero_pud should be populated with pmds
236 * at this moment.
237 * [pud,pmd]_populate*() below needed only for
238 * 3,2 - level page tables where we don't have
239 * puds,pmds, so pgd_populate(), pud_populate()
240 * is noops.
241 *
242 * The ifndef is required to avoid build breakage.
243 *
244 * With 5level-fixup.h, pgd_populate() is not nop and
245 * we reference kasan_zero_p4d. It's not defined
246 * unless 5-level paging enabled.
247 *
248 * The ifndef can be dropped once all KASAN-enabled
249 * architectures will switch to pgtable-nop4d.h.
250 */
251 #ifndef __ARCH_HAS_5LEVEL_HACK
252 pgd_populate(&init_mm, pgd, lm_alias(kasan_zero_p4d));
253 #endif
254 p4d = p4d_offset(pgd, addr);
255 p4d_populate(&init_mm, p4d, lm_alias(kasan_zero_pud));
256 pud = pud_offset(p4d, addr);
257 pud_populate(&init_mm, pud, lm_alias(kasan_zero_pmd));
258 pmd = pmd_offset(pud, addr);
259 pmd_populate_kernel(&init_mm, pmd, lm_alias(kasan_zero_pte));
260 continue;
261 }
262
263 if (pgd_none(*pgd)) {
264 p4d_t *p;
265
266 if (slab_is_available())
> 267 p = p4d_alloc_one(&init_mm, addr);
268 else
269 p = early_alloc(PAGE_SIZE, NUMA_NO_NODE);
270 if (!p)
271 return -ENOMEM;
272
273 pgd_populate(&init_mm, pgd, p);
274 }
275 zero_p4d_populate(pgd, addr, next);
276 } while (pgd++, addr = next, addr != end);
277
278 return 0;
279 }
280
---
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: 54165 bytes --]
next prev parent reply other threads:[~2018-06-25 19:52 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-25 17:02 Andrey Ryabinin
2018-06-25 19:51 ` kbuild test robot [this message]
2018-06-25 20:15 ` kbuild test robot
2018-06-29 16:49 ` [PATCH v2] " Andrey Ryabinin
2018-06-29 17:13 ` Dan Williams
2018-06-30 2:33 ` Andrew Morton
2018-06-30 3:19 ` Dan Williams
2018-07-02 17:22 ` Andrey Ryabinin
2018-07-02 17:28 ` Dan Williams
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=201806260235.aJEs8rqZ%fengguang.wu@intel.com \
--to=lkp@intel.com \
--cc=akpm@linux-foundation.org \
--cc=aryabinin@virtuozzo.com \
--cc=dan.j.williams@intel.com \
--cc=david@fromorbit.com \
--cc=dvyukov@google.com \
--cc=glider@google.com \
--cc=kasan-dev@googlegroups.com \
--cc=kbuild-all@01.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.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