* [PATCH] powerpc: fsl_pci: cast the regs->nip to void * when passing it to probe_kernel_address()
@ 2015-09-21 9:22 Kevin Hao
2015-09-22 2:08 ` Michael Ellerman
2015-09-22 2:16 ` Scott Wood
0 siblings, 2 replies; 6+ messages in thread
From: Kevin Hao @ 2015-09-21 9:22 UTC (permalink / raw)
To: linuxppc-dev; +Cc: Scott Wood
With the reimplementation of probe_kernel_address() in commit
ecc83243e1d4 ("uaccess: reimplement probe_kernel_address() using
probe_kernel_read()"), the explication of the cast for the addr
parameter has been dropped. So we have to explicitly cast the
regs->nip to void * when passing it to probe_kernel_address() in
order to fix the following build error:
arch/powerpc/sysdev/fsl_pci.c: In function 'fsl_pci_mcheck_exception':
arch/powerpc/sysdev/fsl_pci.c:1002:4: error: passing argument 2 of 'probe_kernel_read' makes pointer from integer without a cast [-Werror]
ret = probe_kernel_address(regs->nip, inst);
^
Signed-off-by: Kevin Hao <haokexin@gmail.com>
---
This is against linux-next.
arch/powerpc/sysdev/fsl_pci.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/powerpc/sysdev/fsl_pci.c b/arch/powerpc/sysdev/fsl_pci.c
index ebc1f412cf49..13b9bcf5485e 100644
--- a/arch/powerpc/sysdev/fsl_pci.c
+++ b/arch/powerpc/sysdev/fsl_pci.c
@@ -999,7 +999,7 @@ int fsl_pci_mcheck_exception(struct pt_regs *regs)
ret = get_user(regs->nip, &inst);
pagefault_enable();
} else {
- ret = probe_kernel_address(regs->nip, inst);
+ ret = probe_kernel_address((void *)regs->nip, inst);
}
if (mcheck_handle_load(regs, inst)) {
--
2.4.3
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] powerpc: fsl_pci: cast the regs->nip to void * when passing it to probe_kernel_address()
2015-09-21 9:22 [PATCH] powerpc: fsl_pci: cast the regs->nip to void * when passing it to probe_kernel_address() Kevin Hao
@ 2015-09-22 2:08 ` Michael Ellerman
2015-09-22 2:11 ` Kevin Hao
2015-09-22 2:16 ` Scott Wood
1 sibling, 1 reply; 6+ messages in thread
From: Michael Ellerman @ 2015-09-22 2:08 UTC (permalink / raw)
To: Kevin Hao; +Cc: linuxppc-dev, Scott Wood
On Mon, 2015-09-21 at 17:22 +0800, Kevin Hao wrote:
> With the reimplementation of probe_kernel_address() in commit
> ecc83243e1d4 ("uaccess: reimplement probe_kernel_address() using
> probe_kernel_read()"), the explication of the cast for the addr
> parameter has been dropped. So we have to explicitly cast the
> regs->nip to void * when passing it to probe_kernel_address() in
> order to fix the following build error:
> arch/powerpc/sysdev/fsl_pci.c: In function 'fsl_pci_mcheck_exception':
> arch/powerpc/sysdev/fsl_pci.c:1002:4: error: passing argument 2 of 'probe_kernel_read' makes pointer from integer without a cast [-Werror]
> ret = probe_kernel_address(regs->nip, inst);
> ^
>
> Signed-off-by: Kevin Hao <haokexin@gmail.com>
> ---
>
> This is against linux-next.
You should be sending this to Andrew Morton, the author of the patch that
caused the breakage. Or at the very least CC'ing him.
cheers
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] powerpc: fsl_pci: cast the regs->nip to void * when passing it to probe_kernel_address()
2015-09-22 2:08 ` Michael Ellerman
@ 2015-09-22 2:11 ` Kevin Hao
0 siblings, 0 replies; 6+ messages in thread
From: Kevin Hao @ 2015-09-22 2:11 UTC (permalink / raw)
To: Michael Ellerman; +Cc: linuxppc-dev, Scott Wood
[-- Attachment #1: Type: text/plain, Size: 1084 bytes --]
On Tue, Sep 22, 2015 at 12:08:17PM +1000, Michael Ellerman wrote:
> On Mon, 2015-09-21 at 17:22 +0800, Kevin Hao wrote:
> > With the reimplementation of probe_kernel_address() in commit
> > ecc83243e1d4 ("uaccess: reimplement probe_kernel_address() using
> > probe_kernel_read()"), the explication of the cast for the addr
> > parameter has been dropped. So we have to explicitly cast the
> > regs->nip to void * when passing it to probe_kernel_address() in
> > order to fix the following build error:
> > arch/powerpc/sysdev/fsl_pci.c: In function 'fsl_pci_mcheck_exception':
> > arch/powerpc/sysdev/fsl_pci.c:1002:4: error: passing argument 2 of 'probe_kernel_read' makes pointer from integer without a cast [-Werror]
> > ret = probe_kernel_address(regs->nip, inst);
> > ^
> >
> > Signed-off-by: Kevin Hao <haokexin@gmail.com>
> > ---
> >
> > This is against linux-next.
>
> You should be sending this to Andrew Morton, the author of the patch that
> caused the breakage. Or at the very least CC'ing him.
OK, will repost.
Thanks,
Kevin
[-- Attachment #2: Type: application/pgp-signature, Size: 473 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] powerpc: fsl_pci: cast the regs->nip to void * when passing it to probe_kernel_address()
2015-09-21 9:22 [PATCH] powerpc: fsl_pci: cast the regs->nip to void * when passing it to probe_kernel_address() Kevin Hao
2015-09-22 2:08 ` Michael Ellerman
@ 2015-09-22 2:16 ` Scott Wood
2015-09-22 2:25 ` Kevin Hao
2015-09-22 5:17 ` Michael Ellerman
1 sibling, 2 replies; 6+ messages in thread
From: Scott Wood @ 2015-09-22 2:16 UTC (permalink / raw)
To: Kevin Hao; +Cc: linuxppc-dev
On Mon, 2015-09-21 at 17:22 +0800, Kevin Hao wrote:
> With the reimplementation of probe_kernel_address() in commit
> ecc83243e1d4 ("uaccess: reimplement probe_kernel_address() using
> probe_kernel_read()"), the explication of the cast for the addr
> parameter has been dropped. So we have to explicitly cast the
> regs->nip to void * when passing it to probe_kernel_address() in
> order to fix the following build error:
> arch/powerpc/sysdev/fsl_pci.c: In function 'fsl_pci_mcheck_exception':
> arch/powerpc/sysdev/fsl_pci.c:1002:4: error: passing argument 2 of
> 'probe_kernel_read' makes pointer from integer without a cast [-Werror]
> ret = probe_kernel_address(regs->nip, inst);
> ^
>
> Signed-off-by: Kevin Hao <haokexin@gmail.com>
> ---
>
> This is against linux-next.
I don't see ecc83243e1d4 in linux-next. What tree is it in?
-Scott
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] powerpc: fsl_pci: cast the regs->nip to void * when passing it to probe_kernel_address()
2015-09-22 2:16 ` Scott Wood
@ 2015-09-22 2:25 ` Kevin Hao
2015-09-22 5:17 ` Michael Ellerman
1 sibling, 0 replies; 6+ messages in thread
From: Kevin Hao @ 2015-09-22 2:25 UTC (permalink / raw)
To: Scott Wood; +Cc: linuxppc-dev
[-- Attachment #1: Type: text/plain, Size: 1299 bytes --]
On Mon, Sep 21, 2015 at 09:16:59PM -0500, Scott Wood wrote:
> On Mon, 2015-09-21 at 17:22 +0800, Kevin Hao wrote:
> > With the reimplementation of probe_kernel_address() in commit
> > ecc83243e1d4 ("uaccess: reimplement probe_kernel_address() using
> > probe_kernel_read()"), the explication of the cast for the addr
> > parameter has been dropped. So we have to explicitly cast the
> > regs->nip to void * when passing it to probe_kernel_address() in
> > order to fix the following build error:
> > arch/powerpc/sysdev/fsl_pci.c: In function 'fsl_pci_mcheck_exception':
> > arch/powerpc/sysdev/fsl_pci.c:1002:4: error: passing argument 2 of
> > 'probe_kernel_read' makes pointer from integer without a cast [-Werror]
> > ret = probe_kernel_address(regs->nip, inst);
> > ^
> >
> > Signed-off-by: Kevin Hao <haokexin@gmail.com>
> > ---
> >
> > This is against linux-next.
>
> I don't see ecc83243e1d4 in linux-next. What tree is it in?
It's a patch from Andrew Morton. But it seems that the patches commit id
from Andrew's tree are not constant. Anyway I just fetched the latest
linux-next tree and found this issue was already fixed by commit 3a5f4236fec1
("uaccess-reimplement-probe_kernel_address-using-probe_kernel_read-fix-fix").
Thanks,
Kevin
[-- Attachment #2: Type: application/pgp-signature, Size: 473 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] powerpc: fsl_pci: cast the regs->nip to void * when passing it to probe_kernel_address()
2015-09-22 2:16 ` Scott Wood
2015-09-22 2:25 ` Kevin Hao
@ 2015-09-22 5:17 ` Michael Ellerman
1 sibling, 0 replies; 6+ messages in thread
From: Michael Ellerman @ 2015-09-22 5:17 UTC (permalink / raw)
To: Scott Wood; +Cc: Kevin Hao, linuxppc-dev
On Mon, 2015-09-21 at 21:16 -0500, Scott Wood wrote:
> On Mon, 2015-09-21 at 17:22 +0800, Kevin Hao wrote:
> > With the reimplementation of probe_kernel_address() in commit
> > ecc83243e1d4 ("uaccess: reimplement probe_kernel_address() using
> > probe_kernel_read()"), the explication of the cast for the addr
> > parameter has been dropped. So we have to explicitly cast the
> > regs->nip to void * when passing it to probe_kernel_address() in
> > order to fix the following build error:
> > arch/powerpc/sysdev/fsl_pci.c: In function 'fsl_pci_mcheck_exception':
> > arch/powerpc/sysdev/fsl_pci.c:1002:4: error: passing argument 2 of
> > 'probe_kernel_read' makes pointer from integer without a cast [-Werror]
> > ret = probe_kernel_address(regs->nip, inst);
> > ^
> >
> > Signed-off-by: Kevin Hao <haokexin@gmail.com>
> > ---
> >
> > This is against linux-next.
>
> I don't see ecc83243e1d4 in linux-next. What tree is it in?
It was in linux-next:
commit ecc83243e1d4f67015906017e420435aff1104c9
Author: Andrew Morton <akpm@linux-foundation.org>
AuthorDate: Thu Sep 17 10:19:09 2015 +1000
Commit: Stephen Rothwell <sfr@canb.auug.org.au>
CommitDate: Thu Sep 17 10:19:09 2015 +1000
uaccess: reimplement probe_kernel_address() using probe_kernel_read()
But Andrew's tree comes as patches that Stephen commits, so the commit ids
change when Andrew pushes new patches, so in today's linux-next it's:
commit d2cf644bea102203f9fc221a819f2dcb6a15b8ad
Author: Andrew Morton <akpm@linux-foundation.org>
AuthorDate: Sat Sep 19 11:36:21 2015 +1000
Commit: Stephen Rothwell <sfr@canb.auug.org.au>
CommitDate: Sat Sep 19 11:36:21 2015 +1000
uaccess: reimplement probe_kernel_address() using probe_kernel_read()
cheers
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2015-09-22 5:17 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-21 9:22 [PATCH] powerpc: fsl_pci: cast the regs->nip to void * when passing it to probe_kernel_address() Kevin Hao
2015-09-22 2:08 ` Michael Ellerman
2015-09-22 2:11 ` Kevin Hao
2015-09-22 2:16 ` Scott Wood
2015-09-22 2:25 ` Kevin Hao
2015-09-22 5:17 ` Michael Ellerman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).