From: kbuild test robot <lkp@intel.com>
To: Tycho Andersen <tycho@docker.com>
Cc: kbuild-all@01.org, linux-kernel@vger.kernel.org,
linux-mm@kvack.org, kernel-hardening@lists.openwall.com,
Marco Benatto <marco.antonio.780@gmail.com>,
Juerg Haefliger <juerg.haefliger@canonical.com>,
Juerg Haefliger <juerg.haefliger@hpe.com>
Subject: Re: [PATCH v5 10/10] lkdtm: Add test for XPFO
Date: Sun, 13 Aug 2017 05:05:23 +0800 [thread overview]
Message-ID: <201708130545.e1CG6Ins%fengguang.wu@intel.com> (raw)
In-Reply-To: <20170809200755.11234-11-tycho@docker.com>
[-- Attachment #1: Type: text/plain, Size: 3230 bytes --]
Hi Juerg,
[auto build test ERROR on arm64/for-next/core]
[also build test ERROR on v4.13-rc4]
[cannot apply to next-20170811]
[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/Tycho-Andersen/Add-support-for-eXclusive-Page-Frame-Ownership/20170813-035705
base: https://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-next/core
config: xtensa-allmodconfig (attached as .config)
compiler: xtensa-linux-gcc (GCC) 4.9.0
reproduce:
wget https://raw.githubusercontent.com/01org/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=xtensa
All error/warnings (new ones prefixed by >>):
drivers//misc/lkdtm_xpfo.c: In function 'read_user_with_flags':
drivers//misc/lkdtm_xpfo.c:31:2: error: implicit declaration of function 'user_virt_to_phys' [-Werror=implicit-function-declaration]
phys_addr = user_virt_to_phys(user_addr);
^
>> drivers//misc/lkdtm_xpfo.c:37:2: error: implicit declaration of function 'phys_to_virt' [-Werror=implicit-function-declaration]
virt_addr = phys_to_virt(phys_addr);
^
>> drivers//misc/lkdtm_xpfo.c:37:12: warning: assignment makes pointer from integer without a cast
virt_addr = phys_to_virt(phys_addr);
^
>> drivers//misc/lkdtm_xpfo.c:38:2: error: implicit declaration of function 'virt_to_phys' [-Werror=implicit-function-declaration]
if (phys_addr != virt_to_phys(virt_addr)) {
^
cc1: some warnings being treated as errors
vim +/phys_to_virt +37 drivers//misc/lkdtm_xpfo.c
10
11 void read_user_with_flags(unsigned long flags)
12 {
13 unsigned long user_addr, user_data = 0xdeadbeef;
14 phys_addr_t phys_addr;
15 void *virt_addr;
16
17 user_addr = vm_mmap(NULL, 0, PAGE_SIZE,
18 PROT_READ | PROT_WRITE | PROT_EXEC,
19 flags, 0);
20 if (user_addr >= TASK_SIZE) {
21 pr_warn("Failed to allocate user memory\n");
22 return;
23 }
24
25 if (copy_to_user((void __user *)user_addr, &user_data,
26 sizeof(user_data))) {
27 pr_warn("copy_to_user failed\n");
28 goto free_user;
29 }
30
> 31 phys_addr = user_virt_to_phys(user_addr);
32 if (!phys_addr) {
33 pr_warn("Failed to get physical address of user memory\n");
34 goto free_user;
35 }
36
> 37 virt_addr = phys_to_virt(phys_addr);
> 38 if (phys_addr != virt_to_phys(virt_addr)) {
39 pr_warn("Physical address of user memory seems incorrect\n");
40 goto free_user;
41 }
42
43 pr_info("Attempting bad read from kernel address %p\n", virt_addr);
44 if (*(unsigned long *)virt_addr == user_data)
45 pr_info("Huh? Bad read succeeded?!\n");
46 else
47 pr_info("Huh? Bad read didn't fail but data is incorrect?!\n");
48
49 free_user:
50 vm_munmap(user_addr, PAGE_SIZE);
51 }
52
---
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: 50926 bytes --]
next prev parent reply other threads:[~2017-08-12 21:05 UTC|newest]
Thread overview: 55+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-09 20:07 [PATCH v5 00/10] Add support for eXclusive Page Frame Ownership Tycho Andersen
2017-08-09 20:07 ` [PATCH v5 01/10] mm: add MAP_HUGETLB support to vm_mmap Tycho Andersen
2017-08-09 20:07 ` [PATCH v5 02/10] mm, x86: Add support for eXclusive Page Frame Ownership (XPFO) Tycho Andersen
2017-08-14 18:51 ` Laura Abbott
2017-08-14 22:30 ` Laura Abbott
2017-08-15 3:47 ` Tycho Andersen
2017-08-15 3:51 ` Tycho Andersen
2017-08-09 20:07 ` [PATCH v5 03/10] swiotlb: Map the buffer if it was unmapped by XPFO Tycho Andersen
2017-08-10 13:01 ` Konrad Rzeszutek Wilk
2017-08-10 16:22 ` Tycho Andersen
2017-09-20 16:19 ` Dave Hansen
2017-09-20 22:47 ` Tycho Andersen
2017-09-20 23:25 ` Dave Hansen
2017-08-09 20:07 ` [PATCH v5 04/10] arm64: Add __flush_tlb_one() Tycho Andersen
2017-08-12 11:26 ` [kernel-hardening] " Mark Rutland
2017-08-14 16:35 ` Tycho Andersen
2017-08-14 16:50 ` Mark Rutland
2017-08-14 17:01 ` Tycho Andersen
2017-08-23 16:58 ` Tycho Andersen
2017-08-23 17:04 ` Mark Rutland
2017-08-23 17:13 ` Tycho Andersen
2017-08-24 15:45 ` Mark Rutland
2017-08-29 17:24 ` Tycho Andersen
2017-08-30 5:31 ` Juerg Haefliger
2017-08-30 16:47 ` Tycho Andersen
2017-08-31 9:43 ` Juerg Haefliger
2017-08-31 9:47 ` Mark Rutland
2017-08-31 21:21 ` Tycho Andersen
2017-08-09 20:07 ` [PATCH v5 05/10] arm64/mm: Add support for XPFO Tycho Andersen
2017-08-11 18:01 ` [kernel-hardening] " Laura Abbott
2017-08-11 20:19 ` Tycho Andersen
2017-08-09 20:07 ` [PATCH v5 06/10] arm64/mm: Disable section mappings if XPFO is enabled Tycho Andersen
2017-08-11 17:25 ` [kernel-hardening] " Laura Abbott
2017-08-11 21:13 ` Tycho Andersen
2017-08-11 21:52 ` Tycho Andersen
2017-08-12 11:17 ` Mark Rutland
2017-08-14 16:22 ` Tycho Andersen
2017-08-14 18:42 ` Laura Abbott
2017-08-14 20:28 ` Tycho Andersen
2017-08-09 20:07 ` [PATCH v5 07/10] arm64/mm: Don't flush the data cache if the page is unmapped by XPFO Tycho Andersen
2017-08-12 11:57 ` [kernel-hardening] " Mark Rutland
2017-08-14 16:54 ` Mark Rutland
2017-08-14 20:27 ` Tycho Andersen
2017-08-15 9:39 ` Mark Rutland
2017-08-09 20:07 ` [PATCH v5 08/10] arm64/mm: Add support for XPFO to swiotlb Tycho Andersen
2017-08-10 13:11 ` Konrad Rzeszutek Wilk
2017-08-10 16:35 ` Tycho Andersen
2017-08-09 20:07 ` [PATCH v5 09/10] mm: add a user_virt_to_phys symbol Tycho Andersen
2017-08-09 20:07 ` [PATCH v5 10/10] lkdtm: Add test for XPFO Tycho Andersen
2017-08-12 20:24 ` kbuild test robot
2017-08-14 16:21 ` Tycho Andersen
2017-08-12 21:05 ` kbuild test robot [this message]
2017-08-14 19:10 ` Kees Cook
2017-08-14 20:29 ` Tycho Andersen
2017-08-11 23:35 ` [kernel-hardening] [PATCH v5 00/10] Add support for eXclusive Page Frame Ownership Laura Abbott
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=201708130545.e1CG6Ins%fengguang.wu@intel.com \
--to=lkp@intel.com \
--cc=juerg.haefliger@canonical.com \
--cc=juerg.haefliger@hpe.com \
--cc=kbuild-all@01.org \
--cc=kernel-hardening@lists.openwall.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=marco.antonio.780@gmail.com \
--cc=tycho@docker.com \
/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