From: kbuild test robot <lkp@intel.com>
To: Christophe Leroy <christophe.leroy@c-s.fr>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org,
Paul Mackerras <paulus@samba.org>,
linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH v2 1/7] powerpc/mm: Implement set_memory() routines
Date: Mon, 3 Feb 2020 11:45:49 +0800 [thread overview]
Message-ID: <202002031111.8KSGRJlj%lkp@intel.com> (raw)
In-Reply-To: <84be5ad6a996adf5693260749dcb4d8c69182073.1580477672.git.christophe.leroy@c-s.fr>
[-- Attachment #1: Type: text/plain, Size: 3739 bytes --]
Hi Christophe,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on powerpc/next]
[also build test ERROR on next-20200131]
[cannot apply to v5.5]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]
url: https://github.com/0day-ci/linux/commits/Christophe-Leroy/powerpc-mm-Implement-set_memory-routines/20200203-060234
base: https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git next
config: powerpc-ppc64_defconfig (attached as .config)
compiler: powerpc64-linux-gcc (GCC) 7.5.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=7.5.0 make.cross ARCH=powerpc
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
arch/powerpc/mm/pageattr.c: In function 'change_page_attr':
>> arch/powerpc/mm/pageattr.c:32:15: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
int action = (int)data;
^
arch/powerpc/mm/pageattr.c: In function 'change_memory_attr':
>> arch/powerpc/mm/pageattr.c:73:68: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
return apply_to_page_range(&init_mm, start, sz, change_page_attr, (void *)action);
^
cc1: all warnings being treated as errors
vim +32 arch/powerpc/mm/pageattr.c
15
16
17 /*
18 * Updates the attributes of a page in three steps:
19 *
20 * 1. invalidate the page table entry
21 * 2. flush the TLB
22 * 3. install the new entry with the updated attributes
23 *
24 * This is unsafe if the caller is attempting to change the mapping of the
25 * page it is executing from, or if another CPU is concurrently using the
26 * page being altered.
27 *
28 * TODO make the implementation resistant to this.
29 */
30 static int change_page_attr(pte_t *ptep, unsigned long addr, void *data)
31 {
> 32 int action = (int)data;
33 pte_t pte;
34
35 spin_lock(&init_mm.page_table_lock);
36
37 /* invalidate the PTE so it's safe to modify */
38 pte = ptep_get_and_clear(&init_mm, addr, ptep);
39 flush_tlb_kernel_range(addr, addr + PAGE_SIZE);
40
41 /* modify the PTE bits as desired, then apply */
42 switch (action) {
43 case SET_MEMORY_RO:
44 pte = pte_wrprotect(pte);
45 break;
46 case SET_MEMORY_RW:
47 pte = pte_mkwrite(pte);
48 break;
49 case SET_MEMORY_NX:
50 pte = pte_exprotect(pte);
51 break;
52 case SET_MEMORY_X:
53 pte = pte_mkexec(pte);
54 break;
55 default:
56 break;
57 }
58
59 set_pte_at(&init_mm, addr, ptep, pte);
60 spin_unlock(&init_mm.page_table_lock);
61
62 return 0;
63 }
64
65 int change_memory_attr(unsigned long addr, int numpages, int action)
66 {
67 unsigned long start = ALIGN_DOWN(addr, PAGE_SIZE);
68 unsigned long sz = numpages * PAGE_SIZE;
69
70 if (!numpages)
71 return 0;
72
> 73 return apply_to_page_range(&init_mm, start, sz, change_page_attr, (void *)action);
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 25677 bytes --]
prev parent reply other threads:[~2020-02-03 3:47 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-31 13:34 [PATCH v2 1/7] powerpc/mm: Implement set_memory() routines Christophe Leroy
2020-01-31 13:34 ` [PATCH v2 2/7] powerpc/kprobes: Mark newly allocated probes as RO Christophe Leroy
2020-02-03 4:50 ` Russell Currey
2020-02-03 7:00 ` Christophe Leroy
2020-01-31 13:34 ` [PATCH v2 3/7] powerpc/mm/ptdump: debugfs handler for W+X checks at runtime Christophe Leroy
2020-01-31 13:34 ` [PATCH v2 4/7] powerpc: Set ARCH_HAS_STRICT_MODULE_RWX Christophe Leroy
2020-01-31 13:34 ` [PATCH v2 5/7] powerpc/configs: Enable STRICT_MODULE_RWX in skiroot_defconfig Christophe Leroy
2020-01-31 13:34 ` [PATCH v2 6/7] powerpc/mm: implement set_memory_attr() Christophe Leroy
2020-01-31 13:34 ` [PATCH v2 7/7] powerpc/32: use set_memory_attr() Christophe Leroy
2020-02-03 3:45 ` 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=202002031111.8KSGRJlj%lkp@intel.com \
--to=lkp@intel.com \
--cc=christophe.leroy@c-s.fr \
--cc=kbuild-all@lists.01.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=paulus@samba.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