From: Ralf Baechle <ralf@linux-mips.org>
To: kbuild test robot <fengguang.wu@intel.com>
Cc: James Hogan <james.hogan@imgtec.com>,
kbuild-all@01.org, linux-mips@linux-mips.org
Subject: Re: [mips-sjhill:mips-for-linux-next 58/62] arch/mips/kernel/uprobes.c:304:15: error: variable or field 'kstart' declared void
Date: Mon, 26 Sep 2016 12:24:38 +0200 [thread overview]
Message-ID: <20160926102437.GB12981@linux-mips.org> (raw)
In-Reply-To: <201609240204.arLAdO5Z%fengguang.wu@intel.com>
On Sat, Sep 24, 2016 at 02:06:11AM +0800, kbuild test robot wrote:
> From: kbuild test robot <fengguang.wu@intel.com>
> To: James Hogan <james.hogan@imgtec.com>
> Cc: kbuild-all@01.org, linux-mips@linux-mips.org, Ralf Baechle
> <ralf@linux-mips.org>
> Subject: [mips-sjhill:mips-for-linux-next 58/62]
> arch/mips/kernel/uprobes.c:304:15: error: variable or field 'kstart'
> declared void
> Content-Type: multipart/mixed; boundary="5mCyUwZo2JvN/JJP"
>
> tree: git://git.linux-mips.org/pub/scm/sjhill/linux-sjhill.git mips-for-linux-next
> head: 3cd97a2d95ac84bf17d4d538960d3e17585a791c
> commit: a0b7ccb92e7b57f3c4cf5bf8a875fe7ecf00fe2c [58/62] MIPS: uprobes: Flush icache via kernel address
> config: mips-allmodconfig (attached as .config)
> compiler: mips-linux-gnu-gcc (Debian 6.1.1-9) 6.1.1 20160705
> reproduce:
> wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross
> chmod +x ~/bin/make.cross
> git checkout a0b7ccb92e7b57f3c4cf5bf8a875fe7ecf00fe2c
> # save the attached .config to linux build tree
> make.cross ARCH=mips
>
> All error/warnings (new ones prefixed by >>):
>
> arch/mips/kernel/uprobes.c: In function 'arch_uprobe_copy_ixol':
> >> arch/mips/kernel/uprobes.c:304:15: error: variable or field 'kstart' declared void
> void *kaddr, kstart;
> ^~~~~~
> >> arch/mips/kernel/uprobes.c:308:9: warning: assignment makes integer from pointer without a cast [-Wint-conversion]
> kstart = kaddr + (vaddr & ~PAGE_MASK);
> ^
> >> arch/mips/kernel/uprobes.c:309:9: warning: passing argument 1 of 'memcpy' makes pointer from integer without a cast [-Wint-conversion]
> memcpy(kstart, src, len);
> ^~~~~~
> In file included from include/linux/string.h:18:0,
> from include/linux/bitmap.h:8,
> from include/linux/cpumask.h:11,
> from arch/mips/include/asm/processor.h:15,
> from arch/mips/include/asm/thread_info.h:15,
> from include/linux/thread_info.h:54,
> from include/asm-generic/preempt.h:4,
> from ./arch/mips/include/generated/asm/preempt.h:1,
> from include/linux/preempt.h:59,
> from include/linux/spinlock.h:50,
> from include/linux/wait.h:8,
> from include/linux/fs.h:5,
> from include/linux/highmem.h:4,
> from arch/mips/kernel/uprobes.c:1:
> arch/mips/include/asm/string.h:138:14: note: expected 'void *' but argument is of type 'int'
> extern void *memcpy(void *__to, __const__ void *__from, size_t __n);
> ^~~~~~
>
> vim +/kstart +304 arch/mips/kernel/uprobes.c
>
> 298 *(uprobe_opcode_t *)&auprobe->orig_inst[0].word);
> 299 }
> 300
> 301 void __weak arch_uprobe_copy_ixol(struct page *page, unsigned long vaddr,
> 302 void *src, unsigned long len)
> 303 {
> > 304 void *kaddr, kstart;
> 305
> 306 /* Initialize the slot */
> 307 kaddr = kmap_atomic(page);
> > 308 kstart = kaddr + (vaddr & ~PAGE_MASK);
> > 309 memcpy(kstart, src, len);
> 310 flush_icache_range(kstart, kstart + len);
> 311 kunmap_atomic(kaddr);
> 312 }
Something like below patch should do the trick. James?
Ralf
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
arch/mips/kernel/uprobes.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/arch/mips/kernel/uprobes.c b/arch/mips/kernel/uprobes.c
index 9a507ab..a896417 100644
--- a/arch/mips/kernel/uprobes.c
+++ b/arch/mips/kernel/uprobes.c
@@ -301,14 +301,14 @@ int set_orig_insn(struct arch_uprobe *auprobe, struct mm_struct *mm,
void __weak arch_uprobe_copy_ixol(struct page *page, unsigned long vaddr,
void *src, unsigned long len)
{
- void *kaddr, kstart;
+ unsigned long kaddr, kstart;
/* Initialize the slot */
- kaddr = kmap_atomic(page);
+ kaddr = (unsigned long)kmap_atomic(page);
kstart = kaddr + (vaddr & ~PAGE_MASK);
- memcpy(kstart, src, len);
+ memcpy((void *)kstart, src, len);
flush_icache_range(kstart, kstart + len);
- kunmap_atomic(kaddr);
+ kunmap_atomic((void *)kaddr);
}
/**
next prev parent reply other threads:[~2016-09-26 10:24 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-23 18:06 [mips-sjhill:mips-for-linux-next 58/62] arch/mips/kernel/uprobes.c:304:15: error: variable or field 'kstart' declared void kbuild test robot
2016-09-26 10:24 ` Ralf Baechle [this message]
2016-09-26 13:07 ` James Hogan
2016-09-26 15:29 ` Ralf Baechle
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=20160926102437.GB12981@linux-mips.org \
--to=ralf@linux-mips.org \
--cc=fengguang.wu@intel.com \
--cc=james.hogan@imgtec.com \
--cc=kbuild-all@01.org \
--cc=linux-mips@linux-mips.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