|
Message-ID: <201605130422.vLicKyYg%fengguang.wu@intel.com>
Date: Fri, 13 May 2016 04:18:43 +0800
From: kbuild test robot <lkp@...el.com>
To: Thomas Garnier <thgarnie@...gle.com>
Cc: kbuild-all@...org, "H . Peter Anvin" <hpa@...or.com>,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...e.de>,
Andy Lutomirski <luto@...nel.org>,
Thomas Garnier <thgarnie@...gle.com>,
Dmitry Vyukov <dvyukov@...gle.com>,
Paolo Bonzini <pbonzini@...hat.com>,
Dan Williams <dan.j.williams@...el.com>,
Kees Cook <keescook@...omium.org>,
Stephen Smalley <sds@...ho.nsa.gov>,
Kefeng Wang <wangkefeng.wang@...wei.com>,
Jonathan Corbet <corbet@....net>,
Matt Fleming <matt@...eblueprint.co.uk>,
Toshi Kani <toshi.kani@....com>,
Alexander Kuleshov <kuleshovmail@...il.com>,
Alexander Popov <alpopov@...ecurity.com>,
Joerg Roedel <jroedel@...e.de>, Dave Young <dyoung@...hat.com>,
Baoquan He <bhe@...hat.com>,
Dave Hansen <dave.hansen@...ux.intel.com>,
Mark Salter <msalter@...hat.com>,
Boris Ostrovsky <boris.ostrovsky@...cle.com>, x86@...nel.org,
linux-kernel@...r.kernel.org, linux-doc@...r.kernel.org,
gthelen@...gle.com, kernel-hardening@...ts.openwall.com
Subject: Re: [PATCH v5 1/4] x86, boot: Refactor KASLR entropy functions
Hi,
[auto build test WARNING on next-20160512]
[cannot apply to tip/x86/core v4.6-rc7 v4.6-rc6 v4.6-rc5 v4.6-rc7]
[if your patch is applied to the wrong git tree, please drop us a note to help improving the system]
url: https://github.com/0day-ci/linux/commits/Thomas-Garnier/x86-boot-KASLR-memory-randomization/20160513-033333
config: i386-randconfig-i1-05121127 (attached as .config)
compiler: gcc-6 (Debian 6.1.1-1) 6.1.1 20160430
reproduce:
# save the attached .config to linux build tree
make ARCH=i386
All warnings (new ones prefixed by >>):
arch/x86/boot/compressed/kaslr.c: In function 'find_random_virt_addr':
>> arch/x86/boot/compressed/kaslr.c:390:16: warning: implicit declaration of function 'get_random_long' [-Wimplicit-function-declaration]
random_addr = get_random_long("Virtual") % slots;
^~~~~~~~~~~~~~~
vim +/get_random_long +390 arch/x86/boot/compressed/kaslr.c
071a7493 Baoquan He 2016-05-09 374 {
071a7493 Baoquan He 2016-05-09 375 unsigned long slots, random_addr;
071a7493 Baoquan He 2016-05-09 376
071a7493 Baoquan He 2016-05-09 377 /* Make sure minimum is aligned. */
071a7493 Baoquan He 2016-05-09 378 minimum = ALIGN(minimum, CONFIG_PHYSICAL_ALIGN);
071a7493 Baoquan He 2016-05-09 379 /* Align image_size for easy slot calculations. */
071a7493 Baoquan He 2016-05-09 380 image_size = ALIGN(image_size, CONFIG_PHYSICAL_ALIGN);
071a7493 Baoquan He 2016-05-09 381
071a7493 Baoquan He 2016-05-09 382 /*
071a7493 Baoquan He 2016-05-09 383 * There are how many CONFIG_PHYSICAL_ALIGN-sized slots
071a7493 Baoquan He 2016-05-09 384 * that can hold image_size within the range of minimum to
071a7493 Baoquan He 2016-05-09 385 * KERNEL_IMAGE_SIZE?
071a7493 Baoquan He 2016-05-09 386 */
071a7493 Baoquan He 2016-05-09 387 slots = (KERNEL_IMAGE_SIZE - minimum - image_size) /
071a7493 Baoquan He 2016-05-09 388 CONFIG_PHYSICAL_ALIGN + 1;
071a7493 Baoquan He 2016-05-09 389
d2d3462f Kees Cook 2016-05-09 @390 random_addr = get_random_long("Virtual") % slots;
071a7493 Baoquan He 2016-05-09 391
071a7493 Baoquan He 2016-05-09 392 return random_addr * CONFIG_PHYSICAL_ALIGN + minimum;
071a7493 Baoquan He 2016-05-09 393 }
071a7493 Baoquan He 2016-05-09 394
549f90db Borislav Petkov 2016-05-06 395 /*
549f90db Borislav Petkov 2016-05-06 396 * Since this function examines addresses much more numerically,
549f90db Borislav Petkov 2016-05-06 397 * it takes the input and output pointers as 'unsigned long'.
549f90db Borislav Petkov 2016-05-06 398 */
:::::: The code at line 390 was first introduced by commit
:::::: d2d3462f9f08da364c8fbd41e8e32229d610d49d x86/KASLR: Clarify purpose of each get_random_long()
:::::: TO: Kees Cook <keescook@...omium.org>
:::::: CC: Ingo Molnar <mingo@...nel.org>
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
Download attachment ".config.gz" of type "application/octet-stream" (22725 bytes)
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.