bug-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Reinventing the Hurd server bootstrap


From: Samuel Thibault
Subject: Re: Reinventing the Hurd server bootstrap
Date: Mon, 2 Feb 2015 10:03:16 +0100
User-agent: Mutt/1.5.21+34 (58baf7c9f32f) (2010-12-30)

Hello,

Justus Winter, le Sat 27 Dec 2014 12:32:21 +0100, a écrit :
> Quoting Richard Braun (2014-12-27 12:20:17)
> > On Fri, Dec 26, 2014 at 06:32:33PM +0100, Justus Winter wrote:
> > > Quoting Richard Braun (2014-12-26 17:10:19)
> > > > What kind of non-elf files ?
> > > 
> > > Any file.  I created this patch in an attempt to use a dead task
> > > (i.e. a task w/o a thread) as a ramdisk.  Now I'm (ab)using this patch
> > > to load the script that my interpreter runs:
> > 
> > But how does Mach handle the loading of a non-elf file ?
> 
> This isn't ready for inclusion, but for now it's mainly:
> 
> @@ -746,9 +756,20 @@ static void user_bootstrap(void)
> exec_info_t boot_exec_info;
> int err;
> char **av;
> +  boolean_t executable = TRUE;
> 
> /* Load this task up from the executable file in the module.  */
> err = exec_load(boot_read, read_exec, info->mod, &boot_exec_info);
> +  if (err == EX_NOT_EXECUTABLE)
> +    {
> +      struct multiboot_module *mod = info->mod;
> +      printf("reading %d bytes into map %p\n", mod->mod_end - 
> mod->mod_start, current_task()->map);

I'd rather avoid such kind of autodetection: if the payload happens
to be an ELF file, gnumach will do things with it that we didn't
necessarily wanted. Some time ago (5 Sep 2011), while working on the
initrd part for the Debian installer, I thought about introducing a
data-task-create command, which would tell gnumach to just load the file
into a task at vaddr 0, without doing anything else about it. That way,
userland would be able to just kill the task when it does not need the
data any more.  AIUI this is the same kind of usage that you'd have,
what do you think?

Samuel



reply via email to

[Prev in Thread] Current Thread [Next in Thread]