shared dataspace for l4re_kernel/ registering additional caps in ned

Stark, Josef j.stark at
Tue Aug 12 17:55:11 CEST 2014

Hello all,

for a project, I want to be able to load (elf-)binaries not only from the filesystem, but also from the network (receive binary, then start it.) For this, I will write a L4 app (let's call it "manager" for now) which handles the network part and then tells ned to start the received binary via a special "filename". I already modified ned so that its LUA-interface is exposed to other apps via a capability. 

But here comes the first problem: Normally you specify the capability table of a task and an IPC channel in the lua-config file, which ned reads. Ned then prepares the channel and the caps table and starts the task, which then can register the capability. Otherwise, registering fails (the example would do a printf("Could not register my service, is there a 'calc_server' in the caps table?\n");)
So... how do I specify which capabilities ned itself can have/register? Currently, I need to have a lua-config which tells ned to start another instance of ned with the required permission to register the capability. But is there any way to avoid having two ned instances and making the first (and only) instance able to register the cap?

Second problem: I found out, that ned (also moe) doesn't start the desired app directly but instead starts the l4re binary (source located in src/l4/pkg/l4re_kernel), passing it the filename of the desired binary. l4re, once started, gets the dataspace of this file and then ultimately starts the app. For my purpose, I would modify l4re_kernel so that if it detects the special "filename" mentioned above, it does not read the file from the filesystem but loads the binary that the "manager" received over the network. To get the data from the manager to the l4re_kernel instance, I thought that a shared dataspace or a shared memory area l4shmc_area_t like in prdocons.c example would be suitable. However, again, both of these things normally require special parameters in the lua config file (as can be seen in the examples), but I have no clue how to do this to l4re_kernel since it is not loaded from such a file, but loaded implicitly each time a new task is started. (so I guess this makes it even harder than the problem with ned since ned is only started once.)

Does anyone have ideas on how to solve these?
If someone finds that I phrased this too opaque, please let me know.

Best regards,

Josef Stark

More information about the l4-hackers mailing list