Checking executables before running them in L4re/fiasco

Adam Lackorzynski adam at os.inf.tu-dresden.de
Mon Sep 1 00:14:44 CEST 2014


On Sat Aug 30, 2014 at 14:02:41 +0000, Masti  Ramya Jayaram wrote:
> I am using fiasco/l4re to run applications (say hello world) and
> L4linux. The module list in the two cases looks like this:
> 
> entry hello-cfg
> kernel fiasco -serial_esc -freq=533000
> roottask moe rom/hello.cfg
> module l4re
> module ned
> module hello.cfg
> module hello
> 
> entry l4linux
> kernel fiasco -serial_esc -freq=533000
> roottask moe rom/l4linux.cfg
> module l4re
> module ned
> module l4linux.cfg
> module io
> module vmlinuz
> module ramdisk-x86.rd
> 
> I would like to add some functionality that performs a few checks on
> hello and vmlinuz before they are executed. In this context, I have
> the following questions:
> 
> a. Where is it best to implement such functionality - moe or ned? Or
> should I implement a separate server and do this?

You can just write your own program for that. In this program, just do
normal open()/read()/mmap() on path "rom/hello" / "rom/vmlinuz".

> b. I need access to an special range of  IO memory when I perform the
> checks. i guess I could always use the io module and do
> "l4io_request_iomem()" . Would that be the right way to do it from
> moe/ned?

Yes, just do l4io_request_iomem() to get the IOMEM, however, not from
moe nor ned. Ned is just starting io, so you do not have access to io
easily from within ned. No problem in a separate program.

> c. Is there a way to allocate/reserve a dedicated range of physical
> memory to these applications (hello/vmlinuz) so that they get
> allocated the same chunk everytime (of physical memory)?

You mean for the images? They are placed in memory by the bootloader
(and/or bootstrap), so they'll have the same memory location everytime
given the bootloader is doing it the same way everytime. They're not
moved around afterwards.



Adam
-- 
Adam                 adam at os.inf.tu-dresden.de
  Lackorzynski         http://os.inf.tu-dresden.de/~adam/



More information about the l4-hackers mailing list