Re: [PATCH] arm64: kprobe: make page to RO mode when allocate it

2018-10-29 Thread Will Deacon
On Mon, Oct 29, 2018 at 01:11:24PM +0100, Arnd Bergmann wrote: > On 10/29/18, Will Deacon wrote: > > On Mon, Oct 15, 2018 at 01:16:00PM +0200, Anders Roxell wrote: > > >> -static int __kprobes patch_text(kprobe_opcode_t *addr, u32 opcode) > >> +void *alloc_insn_page(void) > >> { > >> - void

Re: [PATCH] arm64: kprobe: make page to RO mode when allocate it

2018-10-29 Thread Will Deacon
On Mon, Oct 29, 2018 at 01:11:24PM +0100, Arnd Bergmann wrote: > On 10/29/18, Will Deacon wrote: > > On Mon, Oct 15, 2018 at 01:16:00PM +0200, Anders Roxell wrote: > > >> -static int __kprobes patch_text(kprobe_opcode_t *addr, u32 opcode) > >> +void *alloc_insn_page(void) > >> { > >> - void

Re: [PATCH] arm64: kprobe: make page to RO mode when allocate it

2018-10-29 Thread Arnd Bergmann
On 10/29/18, Will Deacon wrote: > On Mon, Oct 15, 2018 at 01:16:00PM +0200, Anders Roxell wrote: >> -static int __kprobes patch_text(kprobe_opcode_t *addr, u32 opcode) >> +void *alloc_insn_page(void) >> { >> -void *addrs[1]; >> -u32 insns[1]; >> +void *page; >> >> -addrs[0] =

Re: [PATCH] arm64: kprobe: make page to RO mode when allocate it

2018-10-29 Thread Arnd Bergmann
On 10/29/18, Will Deacon wrote: > On Mon, Oct 15, 2018 at 01:16:00PM +0200, Anders Roxell wrote: >> -static int __kprobes patch_text(kprobe_opcode_t *addr, u32 opcode) >> +void *alloc_insn_page(void) >> { >> -void *addrs[1]; >> -u32 insns[1]; >> +void *page; >> >> -addrs[0] =

Re: [PATCH] arm64: kprobe: make page to RO mode when allocate it

2018-10-29 Thread Will Deacon
Hi Anders, On Mon, Oct 15, 2018 at 01:16:00PM +0200, Anders Roxell wrote: > Commit 1404d6f13e47 ("arm64: dump: Add checking for writable and exectuable > pages") > has successfully identified code that leaves a page with W+X > permissions. > > [3.245140] arm64/mm: Found insecure W+X mapping

Re: [PATCH] arm64: kprobe: make page to RO mode when allocate it

2018-10-29 Thread Will Deacon
Hi Anders, On Mon, Oct 15, 2018 at 01:16:00PM +0200, Anders Roxell wrote: > Commit 1404d6f13e47 ("arm64: dump: Add checking for writable and exectuable > pages") > has successfully identified code that leaves a page with W+X > permissions. > > [3.245140] arm64/mm: Found insecure W+X mapping

Re: [PATCH] arm64: kprobe: make page to RO mode when allocate it

2018-10-22 Thread Laura Abbott
On 10/15/2018 04:16 AM, Anders Roxell wrote: Commit 1404d6f13e47 ("arm64: dump: Add checking for writable and exectuable pages") has successfully identified code that leaves a page with W+X permissions. [3.245140] arm64/mm: Found insecure W+X mapping at address

Re: [PATCH] arm64: kprobe: make page to RO mode when allocate it

2018-10-22 Thread Laura Abbott
On 10/15/2018 04:16 AM, Anders Roxell wrote: Commit 1404d6f13e47 ("arm64: dump: Add checking for writable and exectuable pages") has successfully identified code that leaves a page with W+X permissions. [3.245140] arm64/mm: Found insecure W+X mapping at address

Re: [PATCH] arm64: kprobe: make page to RO mode when allocate it

2018-10-15 Thread Masami Hiramatsu
On Mon, 15 Oct 2018 13:22:12 +0200 Ard Biesheuvel wrote: > (+ Masami) > > On 15 October 2018 at 13:16, Anders Roxell wrote: > > Commit 1404d6f13e47 ("arm64: dump: Add checking for writable and exectuable > > pages") > > has successfully identified code that leaves a page with W+X > >

Re: [PATCH] arm64: kprobe: make page to RO mode when allocate it

2018-10-15 Thread Masami Hiramatsu
On Mon, 15 Oct 2018 13:22:12 +0200 Ard Biesheuvel wrote: > (+ Masami) > > On 15 October 2018 at 13:16, Anders Roxell wrote: > > Commit 1404d6f13e47 ("arm64: dump: Add checking for writable and exectuable > > pages") > > has successfully identified code that leaves a page with W+X > >

Re: [PATCH] arm64: kprobe: make page to RO mode when allocate it

2018-10-15 Thread Ard Biesheuvel
(+ Masami) On 15 October 2018 at 13:16, Anders Roxell wrote: > Commit 1404d6f13e47 ("arm64: dump: Add checking for writable and exectuable > pages") > has successfully identified code that leaves a page with W+X > permissions. > > [3.245140] arm64/mm: Found insecure W+X mapping at address

Re: [PATCH] arm64: kprobe: make page to RO mode when allocate it

2018-10-15 Thread Ard Biesheuvel
(+ Masami) On 15 October 2018 at 13:16, Anders Roxell wrote: > Commit 1404d6f13e47 ("arm64: dump: Add checking for writable and exectuable > pages") > has successfully identified code that leaves a page with W+X > permissions. > > [3.245140] arm64/mm: Found insecure W+X mapping at address

[PATCH] arm64: kprobe: make page to RO mode when allocate it

2018-10-15 Thread Anders Roxell
Commit 1404d6f13e47 ("arm64: dump: Add checking for writable and exectuable pages") has successfully identified code that leaves a page with W+X permissions. [3.245140] arm64/mm: Found insecure W+X mapping at address (ptrval)/0x00d9 [3.245771] WARNING: CPU: 0 PID: 1

[PATCH] arm64: kprobe: make page to RO mode when allocate it

2018-10-15 Thread Anders Roxell
Commit 1404d6f13e47 ("arm64: dump: Add checking for writable and exectuable pages") has successfully identified code that leaves a page with W+X permissions. [3.245140] arm64/mm: Found insecure W+X mapping at address (ptrval)/0x00d9 [3.245771] WARNING: CPU: 0 PID: 1