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

Hajime Tazaki thehajime at gmail.com
Tue Mar 16 01:18:22 GMT 2021


On Mon, 15 Mar 2021 01:53:01 +0900,
Johannes Berg wrote:
> 
> 
> > 
> > +#else
> > +
> > +#include <asm-generic/nommu_context.h>
> > +
> > +extern void force_flush_all(void);
> > 
> nit: no need for "extern"

thanks, will fix this.

> > +#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.

> > +
> > +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 ?

> > +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



More information about the linux-um mailing list