All of lore.kernel.org
 help / color / mirror / Atom feed
* + arm64-use-page_kernel_rox-directly-in-alloc_insn_page.patch added to -mm tree
@ 2020-06-21  2:19 akpm
  0 siblings, 0 replies; only message in thread
From: akpm @ 2020-06-21  2:19 UTC (permalink / raw)
  To: mm-commits, will, wei.liu, vkuznets, peterz, jeyu, decui, david,
	catalin.marinas, hch


The patch titled
     Subject: arm64: use PAGE_KERNEL_ROX directly in alloc_insn_page
has been added to the -mm tree.  Its filename is
     arm64-use-page_kernel_rox-directly-in-alloc_insn_page.patch

This patch should soon appear at
    http://ozlabs.org/~akpm/mmots/broken-out/arm64-use-page_kernel_rox-directly-in-alloc_insn_page.patch
and later at
    http://ozlabs.org/~akpm/mmotm/broken-out/arm64-use-page_kernel_rox-directly-in-alloc_insn_page.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***

The -mm tree is included into linux-next and is updated
there every 3-4 working days

------------------------------------------------------
From: Christoph Hellwig <hch@lst.de>
Subject: arm64: use PAGE_KERNEL_ROX directly in alloc_insn_page

Use PAGE_KERNEL_ROX directly instead of allocating RWX and setting the
page read-only just after the allocation.

Link: http://lkml.kernel.org/r/20200618064307.32739-3-hch@lst.de
Signed-off-by: Christoph Hellwig <hch@lst.de>
Acked-by: David Hildenbrand <david@redhat.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Dexuan Cui <decui@microsoft.com>
Cc: Jessica Yu <jeyu@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Vitaly Kuznetsov <vkuznets@redhat.com>
Cc: Wei Liu <wei.liu@kernel.org>
Cc: Will Deacon <will@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 arch/arm64/kernel/probes/kprobes.c |   12 +++---------
 1 file changed, 3 insertions(+), 9 deletions(-)

--- a/arch/arm64/kernel/probes/kprobes.c~arm64-use-page_kernel_rox-directly-in-alloc_insn_page
+++ a/arch/arm64/kernel/probes/kprobes.c
@@ -120,15 +120,9 @@ int __kprobes arch_prepare_kprobe(struct
 
 void *alloc_insn_page(void)
 {
-	void *page;
-
-	page = vmalloc_exec(PAGE_SIZE);
-	if (page) {
-		set_memory_ro((unsigned long)page, 1);
-		set_vm_flush_reset_perms(page);
-	}

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-06-21  2:19 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-21  2:19 + arm64-use-page_kernel_rox-directly-in-alloc_insn_page.patch added to -mm tree akpm

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.