All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] fsl_pci: Correct fsl_pci_mcheck_exception
@ 2017-09-05 11:59 Joakim Tjernlund
  2017-09-06 15:34 ` York Sun
  0 siblings, 1 reply; 6+ messages in thread
From: Joakim Tjernlund @ 2017-09-05 11:59 UTC (permalink / raw)
  To: linuxppc-dev linuxppc-dev, York Sun

get_user() had it args reversed causing NIP to be NULL:ed instead
of fixing up the PCI access.

Note: This still hangs my P1020 Freescale CPU hard, but at least
I get a NIP now.

Signed-off-by: Joakim Tjernlund <joakim.tjernlund@infinera.com>
---
 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 7c8b779c329a..9e64c12dff6a 100644
--- a/arch/powerpc/sysdev/fsl_pci.c
+++ b/arch/powerpc/sysdev/fsl_pci.c
@@ -996,7 +996,7 @@ int fsl_pci_mcheck_exception(struct pt_regs *regs)
 	if (is_in_pci_mem_space(addr)) {
 		if (user_mode(regs)) {
 			pagefault_disable();
-			ret = get_user(regs->nip, &inst);
+			ret = get_user(inst, (__u32 __user *)regs->nip);
 			pagefault_enable();
 		} else {
 			ret = probe_kernel_address(regs->nip, inst);
-- 
2.13.5

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] fsl_pci: Correct fsl_pci_mcheck_exception
  2017-09-05 11:59 [PATCH] fsl_pci: Correct fsl_pci_mcheck_exception Joakim Tjernlund
@ 2017-09-06 15:34 ` York Sun
  2017-09-06 19:19   ` Leo Li
  0 siblings, 1 reply; 6+ messages in thread
From: York Sun @ 2017-09-06 15:34 UTC (permalink / raw)
  To: Leo Li; +Cc: Joakim Tjernlund, linuxppc-dev linuxppc-dev

On 09/05/2017 04:59 AM, Joakim Tjernlund wrote:=0A=
> get_user() had it args reversed causing NIP to be NULL:ed instead=0A=
> of fixing up the PCI access.=0A=
> =0A=
> Note: This still hangs my P1020 Freescale CPU hard, but at least=0A=
> I get a NIP now.=0A=
> =0A=
> Signed-off-by: Joakim Tjernlund <joakim.tjernlund@infinera.com>=0A=
> ---=0A=
>   arch/powerpc/sysdev/fsl_pci.c | 2 +-=0A=
>   1 file changed, 1 insertion(+), 1 deletion(-)=0A=
> =0A=
> diff --git a/arch/powerpc/sysdev/fsl_pci.c b/arch/powerpc/sysdev/fsl_pci.=
c=0A=
> index 7c8b779c329a..9e64c12dff6a 100644=0A=
> --- a/arch/powerpc/sysdev/fsl_pci.c=0A=
> +++ b/arch/powerpc/sysdev/fsl_pci.c=0A=
> @@ -996,7 +996,7 @@ int fsl_pci_mcheck_exception(struct pt_regs *regs)=0A=
>   	if (is_in_pci_mem_space(addr)) {=0A=
>   		if (user_mode(regs)) {=0A=
>   			pagefault_disable();=0A=
> -			ret =3D get_user(regs->nip, &inst);=0A=
> +			ret =3D get_user(inst, (__u32 __user *)regs->nip);=0A=
>   			pagefault_enable();=0A=
>   		} else {=0A=
>   			ret =3D probe_kernel_address(regs->nip, inst);=0A=
> =0A=
=0A=
Leo,=0A=
=0A=
Can you take a look, or assign it to someone who is familiar with this code=
?=0A=
=0A=
York=0A=

^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: [PATCH] fsl_pci: Correct fsl_pci_mcheck_exception
  2017-09-06 15:34 ` York Sun
@ 2017-09-06 19:19   ` Leo Li
  2017-11-21 17:17     ` Joakim Tjernlund
  0 siblings, 1 reply; 6+ messages in thread
From: Leo Li @ 2017-09-06 19:19 UTC (permalink / raw)
  To: York Sun; +Cc: Joakim Tjernlund, linuxppc-dev linuxppc-dev



> -----Original Message-----
> From: York Sun
> Sent: Wednesday, September 06, 2017 10:34 AM
> To: Leo Li <leoyang.li@nxp.com>
> Cc: Joakim Tjernlund <Joakim.Tjernlund@infinera.com>; linuxppc-dev linuxp=
pc-
> dev <linuxppc-dev@lists.ozlabs.org>
> Subject: Re: [PATCH] fsl_pci: Correct fsl_pci_mcheck_exception
>=20
> On 09/05/2017 04:59 AM, Joakim Tjernlund wrote:
> > get_user() had it args reversed causing NIP to be NULL:ed instead of
> > fixing up the PCI access.
> >
> > Note: This still hangs my P1020 Freescale CPU hard, but at least I get
> > a NIP now.
> >
> > Signed-off-by: Joakim Tjernlund <joakim.tjernlund@infinera.com>
> > ---
> >   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 7c8b779c329a..9e64c12dff6a
> > 100644
> > --- a/arch/powerpc/sysdev/fsl_pci.c
> > +++ b/arch/powerpc/sysdev/fsl_pci.c
> > @@ -996,7 +996,7 @@ int fsl_pci_mcheck_exception(struct pt_regs *regs)
> >   	if (is_in_pci_mem_space(addr)) {
> >   		if (user_mode(regs)) {
> >   			pagefault_disable();
> > -			ret =3D get_user(regs->nip, &inst);
> > +			ret =3D get_user(inst, (__u32 __user *)regs->nip);
> >   			pagefault_enable();
> >   		} else {
> >   			ret =3D probe_kernel_address(regs->nip, inst);
> >
>=20
> Leo,
>=20
> Can you take a look, or assign it to someone who is familiar with this co=
de?

Acked-by: Li Yang <leoyang.li@nxp.com>

Regards,
Leo

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] fsl_pci: Correct fsl_pci_mcheck_exception
  2017-09-06 19:19   ` Leo Li
@ 2017-11-21 17:17     ` Joakim Tjernlund
  2017-12-05 15:16       ` Leo Li
  0 siblings, 1 reply; 6+ messages in thread
From: Joakim Tjernlund @ 2017-11-21 17:17 UTC (permalink / raw)
  To: leoyang.li, york.sun; +Cc: linuxppc-dev

On Wed, 2017-09-06 at 19:19 +0000, Leo Li wrote:
> > -----Original Message-----
> > From: York Sun
> > Sent: Wednesday, September 06, 2017 10:34 AM
> > To: Leo Li <leoyang.li@nxp.com>
> > Cc: Joakim Tjernlund <Joakim.Tjernlund@infinera.com>; linuxppc-dev linu=
xppc-
> > dev <linuxppc-dev@lists.ozlabs.org>
> > Subject: Re: [PATCH] fsl_pci: Correct fsl_pci_mcheck_exception
> >=20
> > On 09/05/2017 04:59 AM, Joakim Tjernlund wrote:
> > > get_user() had it args reversed causing NIP to be NULL:ed instead of
> > > fixing up the PCI access.
> > >=20
> > > Note: This still hangs my P1020 Freescale CPU hard, but at least I ge=
t
> > > a NIP now.
> > >=20
> > > Signed-off-by: Joakim Tjernlund <joakim.tjernlund@infinera.com>
> > > ---
> > >   arch/powerpc/sysdev/fsl_pci.c | 2 +-
> > >   1 file changed, 1 insertion(+), 1 deletion(-)
> > >=20
> > > diff --git a/arch/powerpc/sysdev/fsl_pci.c
> > > b/arch/powerpc/sysdev/fsl_pci.c index 7c8b779c329a..9e64c12dff6a
> > > 100644
> > > --- a/arch/powerpc/sysdev/fsl_pci.c
> > > +++ b/arch/powerpc/sysdev/fsl_pci.c
> > > @@ -996,7 +996,7 @@ int fsl_pci_mcheck_exception(struct pt_regs *regs=
)
> > >   	if (is_in_pci_mem_space(addr)) {
> > >   		if (user_mode(regs)) {
> > >   			pagefault_disable();
> > > -			ret =3D get_user(regs->nip, &inst);
> > > +			ret =3D get_user(inst, (__u32 __user *)regs->nip);
> > >   			pagefault_enable();
> > >   		} else {
> > >   			ret =3D probe_kernel_address(regs->nip, inst);
> > >=20
> >=20
> > Leo,
> >=20
> > Can you take a look, or assign it to someone who is familiar with this =
code?
>=20
> Acked-by: Li Yang <leoyang.li@nxp.com>
>=20
> Regards,
> Leo

I think this is forgotten, cannot se it in Linus tree.=

^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: [PATCH] fsl_pci: Correct fsl_pci_mcheck_exception
  2017-11-21 17:17     ` Joakim Tjernlund
@ 2017-12-05 15:16       ` Leo Li
  2017-12-05 20:10         ` Scott Wood
  0 siblings, 1 reply; 6+ messages in thread
From: Leo Li @ 2017-12-05 15:16 UTC (permalink / raw)
  To: oss, Joakim Tjernlund, York Sun; +Cc: linuxppc-dev



> -----Original Message-----
> From: Joakim Tjernlund [mailto:Joakim.Tjernlund@infinera.com]
> Sent: Tuesday, November 21, 2017 11:17 AM
> To: Leo Li <leoyang.li@nxp.com>; York Sun <york.sun@nxp.com>
> Cc: linuxppc-dev@lists.ozlabs.org
> Subject: Re: [PATCH] fsl_pci: Correct fsl_pci_mcheck_exception
>=20
> On Wed, 2017-09-06 at 19:19 +0000, Leo Li wrote:
> > > -----Original Message-----
> > > From: York Sun
> > > Sent: Wednesday, September 06, 2017 10:34 AM
> > > To: Leo Li <leoyang.li@nxp.com>
> > > Cc: Joakim Tjernlund <Joakim.Tjernlund@infinera.com>; linuxppc-dev
> > > linuxppc- dev <linuxppc-dev@lists.ozlabs.org>
> > > Subject: Re: [PATCH] fsl_pci: Correct fsl_pci_mcheck_exception
> > >
> > > On 09/05/2017 04:59 AM, Joakim Tjernlund wrote:
> > > > get_user() had it args reversed causing NIP to be NULL:ed instead
> > > > of fixing up the PCI access.
> > > >
> > > > Note: This still hangs my P1020 Freescale CPU hard, but at least I
> > > > get a NIP now.
> > > >
> > > > Signed-off-by: Joakim Tjernlund <joakim.tjernlund@infinera.com>
> > > > ---
> > > >   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 7c8b779c329a..9e64c12dff6a
> > > > 100644
> > > > --- a/arch/powerpc/sysdev/fsl_pci.c
> > > > +++ b/arch/powerpc/sysdev/fsl_pci.c
> > > > @@ -996,7 +996,7 @@ int fsl_pci_mcheck_exception(struct pt_regs
> *regs)
> > > >   	if (is_in_pci_mem_space(addr)) {
> > > >   		if (user_mode(regs)) {
> > > >   			pagefault_disable();
> > > > -			ret =3D get_user(regs->nip, &inst);
> > > > +			ret =3D get_user(inst, (__u32 __user *)regs->nip);
> > > >   			pagefault_enable();
> > > >   		} else {
> > > >   			ret =3D probe_kernel_address(regs->nip, inst);
> > > >
> > >
> > > Leo,
> > >
> > > Can you take a look, or assign it to someone who is familiar with thi=
s
> code?
> >
> > Acked-by: Li Yang <leoyang.li@nxp.com>
> >
> > Regards,
> > Leo
>=20
> I think this is forgotten, cannot se it in Linus tree.

Hi Scott,

Could you help to review this patch and pick it up?  Thanks.

Regards,
Leo

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] fsl_pci: Correct fsl_pci_mcheck_exception
  2017-12-05 15:16       ` Leo Li
@ 2017-12-05 20:10         ` Scott Wood
  0 siblings, 0 replies; 6+ messages in thread
From: Scott Wood @ 2017-12-05 20:10 UTC (permalink / raw)
  To: Leo Li, Joakim Tjernlund, York Sun; +Cc: linuxppc-dev

On Tue, 2017-12-05 at 15:16 +0000, Leo Li wrote:
> > -----Original Message-----
> > From: Joakim Tjernlund [mailto:Joakim.Tjernlund@infinera.com]
> > Sent: Tuesday, November 21, 2017 11:17 AM
> > To: Leo Li <leoyang.li@nxp.com>; York Sun <york.sun@nxp.com>
> > Cc: linuxppc-dev@lists.ozlabs.org
> > Subject: Re: [PATCH] fsl_pci: Correct fsl_pci_mcheck_exception
> > 
> > On Wed, 2017-09-06 at 19:19 +0000, Leo Li wrote:
> > > > -----Original Message-----
> > > > From: York Sun
> > > > Sent: Wednesday, September 06, 2017 10:34 AM
> > > > To: Leo Li <leoyang.li@nxp.com>
> > > > Cc: Joakim Tjernlund <Joakim.Tjernlund@infinera.com>; linuxppc-dev
> > > > linuxppc- dev <linuxppc-dev@lists.ozlabs.org>
> > > > Subject: Re: [PATCH] fsl_pci: Correct fsl_pci_mcheck_exception
> > > > 
> > > > On 09/05/2017 04:59 AM, Joakim Tjernlund wrote:
> > > > > get_user() had it args reversed causing NIP to be NULL:ed instead
> > > > > of fixing up the PCI access.
> > > > > 
> > > > > Note: This still hangs my P1020 Freescale CPU hard, but at least I
> > > > > get a NIP now.
> > > > > 
> > > > > Signed-off-by: Joakim Tjernlund <joakim.tjernlund@infinera.com>
> > > > > ---
> > > > >   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 7c8b779c329a..9e64c12dff6a
> > > > > 100644
> > > > > --- a/arch/powerpc/sysdev/fsl_pci.c
> > > > > +++ b/arch/powerpc/sysdev/fsl_pci.c
> > > > > @@ -996,7 +996,7 @@ int fsl_pci_mcheck_exception(struct pt_regs
> > 
> > *regs)
> > > > >   	if (is_in_pci_mem_space(addr)) {
> > > > >   		if (user_mode(regs)) {
> > > > >   			pagefault_disable();
> > > > > -			ret = get_user(regs->nip, &inst);
> > > > > +			ret = get_user(inst, (__u32 __user *)regs-
> > > > > >nip);
> > > > >   			pagefault_enable();
> > > > >   		} else {
> > > > >   			ret = probe_kernel_address(regs->nip,
> > > > > inst);
> > > > > 
> > > > 
> > > > Leo,
> > > > 
> > > > Can you take a look, or assign it to someone who is familiar with this
> > 
> > code?
> > > 
> > > Acked-by: Li Yang <leoyang.li@nxp.com>
> > > 
> > > Regards,
> > > Leo
> > 
> > I think this is forgotten, cannot se it in Linus tree.
> 
> Hi Scott,
> 
> Could you help to review this patch and pick it up?  Thanks.

Sure... In the future please CC me on patches you want me to pick up.

-Scott

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2017-12-05 20:42 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-05 11:59 [PATCH] fsl_pci: Correct fsl_pci_mcheck_exception Joakim Tjernlund
2017-09-06 15:34 ` York Sun
2017-09-06 19:19   ` Leo Li
2017-11-21 17:17     ` Joakim Tjernlund
2017-12-05 15:16       ` Leo Li
2017-12-05 20:10         ` Scott Wood

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.