Re: Checking executables before running them in L4re/fiasco

Adam Lackorzynski <[email protected]>
Newsgroups gmane.comp.micro-kernel.l4.devel
Message-ID <[email protected]>
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                 [email protected]
  Lackorzynski         http://os.inf.tu-dresden.de/~adam/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.