Checking executables before running them in L4re/fiasco

Masti Ramya Jayaram rmasti at inf.ethz.ch
Mon Sep 8 09:13:14 CEST 2014


Hey Adam,

Yes, I explicitly made sure that there are no extra characters by setting the entire page of 4096 bytes to zero before copying over the new config. I am not sure what you mean by changed the target - I simply replace the config file. So I thought it picks up the size information from the MBI header.

I will try the MODE option as you mentioned it. I misunderstood it earlier.

Thanks,
Ramya
________________________________________
From: l4-hackers [l4-hackers-bounces at os.inf.tu-dresden.de] on behalf of Adam Lackorzynski [adam at os.inf.tu-dresden.de]
Sent: 08 September 2014 00:03
To: l4-hackers at os.inf.tu-dresden.de
Subject: Re: Checking executables before running them in L4re/fiasco

Hi,

On Fri Sep 05, 2014 at 12:29:15 +0000, Masti  Ramya Jayaram wrote:
> Thanks for the information. I have two issues/questions:
>
> a. I looked at the move_modules (which does not do much in my case) and I tried to replace the linux.cfg from
>
> Compiled in version:
> --------------------------------------------------
> ------vim:set ft=lua:
>
> L4.default_loader:start({ caps = {
>       log = L4.Env.log:m("rws"),
>     },
>     l4re_dbg = L4.Dbg.Warn,
>     log = { "l4linux", "yellow" },
>   }, "rom/vmlinuz mem=128M console=ttyLv0,115200 l4x_rd=rom/ramdisk-x86.rd root=1:0 ramdisk_size=4000 l4ser.vkey_enable=1");
>
>
> Replaced version: (just the memory changes but this results in a difference in the length!)
> ---------------------------------------------------
> --vim:set ft=lua:
> L4.default_loader:start({ caps = {
>       log = L4.Env.log:m("rws"),
>     },
>     l4re_dbg = L4.Dbg.Warn,
>     log = { "l4linux", "yellow" },
>   }, "rom/vmlinuz mem=64M console=ttyLv0,115200 l4x_rd=rom/ramdisk-x86.rd root=1:0 ramdisk_size=4000 l4ser.vkey_enable=1");
>
>
> I achieve this with the following code that runs immediately after construct_mbi:
>
> a. Copy the placed version into the start address of the linux_cfg
> module (this happens correctly as I can see the memory dump).
> b. Change the compressed and uncompressed lengths in mod_info to
> reflect the smaller size.
>
> The process runs until ned  which fails to parse the config file
> (unexpected symbol error) and the problem seems to be the difference
> in length of the two configs. For example, if the 2nd config is
> "mem=064M" instead of "mem=64M", then it works. I change the length
> appropriately in mod_info of the mbi. What am I missing?

When you already changed the target, changing the size variables
probably won't make a difference. Did you clear out the old contents? I
think you have remaining characters in the file that are interpreted and
causing the error.

> a. The "MODE = sigma0" suggestion: I tried this by changing
> bootstrap/server/src/Make.rules but I get an error saying: "ld: cannot
> find -ll4util". The relevant part in the linker line that differs from
> the default working build (with "MODE = lib") is:

Wait. I meant the MODE=sigma0 for newly created programs. If you want to
make bootstrap smaller, you need to remove code/features from it.




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

_______________________________________________
l4-hackers mailing list
l4-hackers at os.inf.tu-dresden.de
http://os.inf.tu-dresden.de/mailman/listinfo/l4-hackers




More information about the l4-hackers mailing list