mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* Re: Re: [PATCH RESEND] arm64: add alignment fault hanling
@ 2016-02-15 11:44 EunTaik Lee
  0 siblings, 0 replies; 2+ messages in thread
From: EunTaik Lee @ 2016-02-15 11:44 UTC (permalink / raw)
  To: Catalin Marinas
  Cc: will.deacon, vladimir.murzin, suzuki.poulose, riandrews,
	james.morse, salyzyn, Dave.Martin, linux-arm-kernel,
	linux-kernel

> How do you end up with Device nGnRnE in user space? I thought we should
> have got some guard page.
I guess it is a device file that is mmaped in the user space and later remapped in the kernel
 using pgprot_noncached(). 
I can't find the code that inserts a guard page in between vma's can you please help me find that code?

> do_strncpy_from_user() relies on unsafe_get_user() not being able to
> read 8 bytes. The problem now is that it doesn't get a page fault but an
> alignment one is isn't handled.
Yes.

> Why addr >= TASK_SIZE? addr here should be the fault address, not pc.
You're right. I should have used user_mode(regs).

> The simplest would be to use do_bad_area() here without any additional
> function.
Yes, I should've probably used do_bad_area(). I just wanted to do the minimal stuff.

^ permalink raw reply	[flat|nested] 2+ messages in thread
* Re: Re: [PATCH RESEND] arm64: add alignment fault hanling
@ 2016-02-15 11:48 EunTaik Lee
  0 siblings, 0 replies; 2+ messages in thread
From: EunTaik Lee @ 2016-02-15 11:48 UTC (permalink / raw)
  To: Catalin Marinas
  Cc: EunTaik Lee, will.deacon, vladimir.murzin, suzuki.poulose,
	riandrews, james.morse, salyzyn, Dave.Martin, linux-arm-kernel,
	linux-kernel


 
> How do you end up with Device nGnRnE in user space? I thought we should
> have got some guard page.
I guess it is a device file that is mmaped in the user space and later remapped in the kernel
using pgprot_noncached(). 
I can't find the code that inserts a guard page in between vma's can you please help me find that code?

> do_strncpy_from_user() relies on unsafe_get_user() not being able to
> read 8 bytes. The problem now is that it doesn't get a page fault but an
> alignment one is isn't handled.
Yes.

> Why addr >= TASK_SIZE? addr here should be the fault address, not pc.
You're right. I should have used user_mode(regs).

> The simplest would be to use do_bad_area() here without any additional
> function.
Yes, I should've probably used do_bad_area(). I just wanted to do the minimal stuff.

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

end of thread, other threads:[~2016-02-15 11:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-15 11:44 Re: [PATCH RESEND] arm64: add alignment fault hanling EunTaik Lee
2016-02-15 11:48 EunTaik Lee

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®