Thread (247 messages) 247 messages, 7 authors, 2021-03-18

Re: [RFC v8 08/20] um: lkl: memory handling

From: Hajime Tazaki <hidden>
Date: 2021-03-16 01:19:11
Also in: linux-um

On Mon, 15 Mar 2021 01:53:01 +0900,
Johannes Berg wrote:
quoted
+#else
+
+#include <asm-generic/nommu_context.h>
+
+extern void force_flush_all(void);
nit: no need for "extern"
thanks, will fix this.
quoted
+#define CONFIG_KERNEL_RAM_BASE_ADDRESS memory_start
+#include <asm-generic/page.h>
+
+#define __va_space (8*1024*1024)
+
+#ifndef __ASSEMBLY__
+#include <mem.h>
Is that <shared/mem.h>? I think we should start including only with that
prefix.
okay, will fix it.
quoted
+
+void *uml_kmalloc(int size, int flags)
+{
+	return kmalloc(size, flags);
+}
That could probably still be shared?
This function is a stub of arch/um/kernel/mem.c, which LKL doesn't
use for the build.  Thus we defined here.

Or are you suggesting to not stubbing this function, but extracting
the function from mem.c ?
quoted
+int set_memory_ro(unsigned long addr, int numpages)
+{
+	return -EOPNOTSUPP;
+}
+
+int set_memory_rw(unsigned long addr, int numpages)
+{
+	return -EOPNOTSUPP;
+}
+
+int set_memory_nx(unsigned long addr, int numpages)
+{
+	return -EOPNOTSUPP;
+}
+
+int set_memory_x(unsigned long addr, int numpages)
+{
+	return -EOPNOTSUPP;
+}
UML for now no longer has these either.
Ah, I see the changes.  Will fix them.

-- Hajime
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help