Re: [PATCH 2/3] arm64: use PAGE_KERNEL_ROX directly in alloc_insn_page

2020-06-27 Thread Ard Biesheuvel
On Sat, 27 Jun 2020 at 09:57, Christoph Hellwig wrote: > > On Sat, Jun 27, 2020 at 09:34:42AM +0200, Ard Biesheuvel wrote: > > > + return __vmalloc_node_range(PAGE_SIZE, 1, VMALLOC_START, > > > VMALLOC_END, > > > + GFP_KERNEL, PAGE_KERNEL_ROX, VM_FLUSH_RESET_PERMS, > >

Re: [PATCH 2/3] arm64: use PAGE_KERNEL_ROX directly in alloc_insn_page

2020-06-27 Thread Christoph Hellwig
On Sat, Jun 27, 2020 at 09:34:42AM +0200, Ard Biesheuvel wrote: > > + return __vmalloc_node_range(PAGE_SIZE, 1, VMALLOC_START, > > VMALLOC_END, > > + GFP_KERNEL, PAGE_KERNEL_ROX, VM_FLUSH_RESET_PERMS, > > + NUMA_NO_NODE, __func__); > > Why is this

Re: [PATCH 2/3] arm64: use PAGE_KERNEL_ROX directly in alloc_insn_page

2020-06-27 Thread Ard Biesheuvel
On Thu, 18 Jun 2020 at 08:44, Christoph Hellwig wrote: > > Use PAGE_KERNEL_ROX directly instead of allocating RWX and setting the > page read-only just after the allocation. > > Signed-off-by: Christoph Hellwig > --- > arch/arm64/kernel/probes/kprobes.c | 12 +++- > 1 file changed, 3 ins

Re: [PATCH 2/3] arm64: use PAGE_KERNEL_ROX directly in alloc_insn_page

2020-06-23 Thread Will Deacon
On Tue, Jun 23, 2020 at 11:37:14AM +0200, Peter Zijlstra wrote: > On Tue, Jun 23, 2020 at 10:07:58AM +0100, Will Deacon wrote: > > On Tue, Jun 23, 2020 at 11:05:05AM +0200, Christoph Hellwig wrote: > > > On Sat, Jun 20, 2020 at 07:16:16PM -0700, Andrew Morton wrote: > > > > On Thu, 18 Jun 2020 08:4

Re: [PATCH 2/3] arm64: use PAGE_KERNEL_ROX directly in alloc_insn_page

2020-06-23 Thread Peter Zijlstra
On Tue, Jun 23, 2020 at 10:07:58AM +0100, Will Deacon wrote: > On Tue, Jun 23, 2020 at 11:05:05AM +0200, Christoph Hellwig wrote: > > On Sat, Jun 20, 2020 at 07:16:16PM -0700, Andrew Morton wrote: > > > On Thu, 18 Jun 2020 08:43:06 +0200 Christoph Hellwig wrote: > > > > > > > Use PAGE_KERNEL_ROX

Re: [PATCH 2/3] arm64: use PAGE_KERNEL_ROX directly in alloc_insn_page

2020-06-23 Thread Will Deacon
On Tue, Jun 23, 2020 at 11:05:05AM +0200, Christoph Hellwig wrote: > On Sat, Jun 20, 2020 at 07:16:16PM -0700, Andrew Morton wrote: > > On Thu, 18 Jun 2020 08:43:06 +0200 Christoph Hellwig wrote: > > > > > Use PAGE_KERNEL_ROX directly instead of allocating RWX and setting the > > > page read-only

Re: [PATCH 2/3] arm64: use PAGE_KERNEL_ROX directly in alloc_insn_page

2020-06-23 Thread Christoph Hellwig
On Sat, Jun 20, 2020 at 07:16:16PM -0700, Andrew Morton wrote: > On Thu, 18 Jun 2020 08:43:06 +0200 Christoph Hellwig wrote: > > > Use PAGE_KERNEL_ROX directly instead of allocating RWX and setting the > > page read-only just after the allocation. > > > > --- a/arch/arm64/kernel/probes/kprobes.c

Re: [PATCH 2/3] arm64: use PAGE_KERNEL_ROX directly in alloc_insn_page

2020-06-20 Thread Andrew Morton
On Thu, 18 Jun 2020 08:43:06 +0200 Christoph Hellwig wrote: > Use PAGE_KERNEL_ROX directly instead of allocating RWX and setting the > page read-only just after the allocation. > > --- a/arch/arm64/kernel/probes/kprobes.c > +++ b/arch/arm64/kernel/probes/kprobes.c > @@ -120,15 +120,9 @@ int __kp

Re: [PATCH 2/3] arm64: use PAGE_KERNEL_ROX directly in alloc_insn_page

2020-06-18 Thread Christoph Hellwig
On Thu, Jun 18, 2020 at 12:35:06PM +0200, Peter Zijlstra wrote: > On Thu, Jun 18, 2020 at 10:55:58AM +0200, David Hildenbrand wrote: > > On 18.06.20 08:43, Christoph Hellwig wrote: > > > Use PAGE_KERNEL_ROX directly instead of allocating RWX and setting the > > > page read-only just after the alloc

Re: [PATCH 2/3] arm64: use PAGE_KERNEL_ROX directly in alloc_insn_page

2020-06-18 Thread Peter Zijlstra
On Thu, Jun 18, 2020 at 10:55:58AM +0200, David Hildenbrand wrote: > On 18.06.20 08:43, Christoph Hellwig wrote: > > Use PAGE_KERNEL_ROX directly instead of allocating RWX and setting the > > page read-only just after the allocation. > > > > Signed-off-by: Christoph Hellwig > > --- > > arch/arm6

Re: [PATCH 2/3] arm64: use PAGE_KERNEL_ROX directly in alloc_insn_page

2020-06-18 Thread Peter Zijlstra
On Thu, Jun 18, 2020 at 08:43:06AM +0200, Christoph Hellwig wrote: > Use PAGE_KERNEL_ROX directly instead of allocating RWX and setting the > page read-only just after the allocation. > > Signed-off-by: Christoph Hellwig > --- > arch/arm64/kernel/probes/kprobes.c | 12 +++- > 1 file chan

Re: [PATCH 2/3] arm64: use PAGE_KERNEL_ROX directly in alloc_insn_page

2020-06-18 Thread David Hildenbrand
On 18.06.20 08:43, Christoph Hellwig wrote: > Use PAGE_KERNEL_ROX directly instead of allocating RWX and setting the > page read-only just after the allocation. > > Signed-off-by: Christoph Hellwig > --- > arch/arm64/kernel/probes/kprobes.c | 12 +++- > 1 file changed, 3 insertions(+), 9

[PATCH 2/3] arm64: use PAGE_KERNEL_ROX directly in alloc_insn_page

2020-06-17 Thread Christoph Hellwig
Use PAGE_KERNEL_ROX directly instead of allocating RWX and setting the page read-only just after the allocation. Signed-off-by: Christoph Hellwig --- arch/arm64/kernel/probes/kprobes.c | 12 +++- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/arch/arm64/kernel/probes/kprob