linux-hyperv.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* fix a hyperv W^X violation and remove vmalloc_exec
@ 2020-06-18  6:43 Christoph Hellwig
  2020-06-18  6:43 ` [PATCH 1/3] x86/hyperv: allocate the hypercall page with only read and execute bits Christoph Hellwig
                   ` (3 more replies)
  0 siblings, 4 replies; 19+ messages in thread
From: Christoph Hellwig @ 2020-06-18  6:43 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Dexuan Cui, Vitaly Kuznetsov, Peter Zijlstra, Catalin Marinas,
	Will Deacon, Jessica Yu, x86, linux-arm-kernel, linux-kernel,
	linux-hyperv, linux-mm

Hi all,

Dexuan reported a W^X violation due to the fact that the hyper hypercall
page due switching it to be allocated using vmalloc_exec.  The problem
is that PAGE_KERNEL_EXEC as used by vmalloc_exec actually sets writable
permissions in the pte.  This series fixes the issue by switching to the
low-level __vmalloc_node_range interface that allows specifing more
detailed permissions instead.  It then also open codes the other two
callers and removes the somewhat confusing vmalloc_exec interface.

Peter noted that the hyper hypercall page allocation also has another
long standing issue in that it shouldn't use the full vmalloc but just
the module space.  This issue is so far theoretical as the allocation is
done early in the boot process.  I plan to fix it with another bigger
series for 5.9.

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

end of thread, other threads:[~2020-06-27  7:58 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-18  6:43 fix a hyperv W^X violation and remove vmalloc_exec Christoph Hellwig
2020-06-18  6:43 ` [PATCH 1/3] x86/hyperv: allocate the hypercall page with only read and execute bits Christoph Hellwig
2020-06-18 11:47   ` Wei Liu
2020-06-18  6:43 ` [PATCH 2/3] arm64: use PAGE_KERNEL_ROX directly in alloc_insn_page Christoph Hellwig
2020-06-18  8:55   ` David Hildenbrand
2020-06-18 10:35     ` Peter Zijlstra
2020-06-18 13:50       ` Christoph Hellwig
2020-06-18  9:27   ` Peter Zijlstra
2020-06-21  2:16   ` Andrew Morton
2020-06-23  9:05     ` Christoph Hellwig
2020-06-23  9:07       ` Will Deacon
2020-06-23  9:37         ` Peter Zijlstra
2020-06-23  9:57           ` Will Deacon
2020-06-27  7:34   ` Ard Biesheuvel
2020-06-27  7:56     ` Christoph Hellwig
2020-06-27  7:57       ` Ard Biesheuvel
2020-06-18  6:43 ` [PATCH 3/3] mm: remove vmalloc_exec Christoph Hellwig
2020-06-18  8:53   ` David Hildenbrand
2020-06-18  9:28 ` fix a hyperv W^X violation and " Peter Zijlstra

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).