bug-hurd
[Top][All Lists]
Advanced

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

Asking help for a little project


From: Alessandro Sangiuliano
Subject: Asking help for a little project
Date: Mon, 24 Jan 2022 11:51:04 +0000

Hello everyone, i will try to be concise and precise a much as i can.

I'm experimenting with GNUMach and its internals, reading at the hurd code too. I want to realize a little project that is writing a 2 servers system on top of gnumach; they will not do so much but will be useful for next experiments i want to do with the kernel. I'm doing this for learning purpose mainly.

The Environment:

The kernel, a nameserver, a hello_custom_server. I imposed my self i can' t use any of the hurd syscalls, but just the common (standard) function in glibc (stdlib and so on).

What i did realize until now:

1) Grub starts the kernel and my nameserver as a module, I implemented a little library to parse the arguments given to the nameserver at the boot in a key-value linked map. So i can get the arguments passed to the main.

2) The nameserver starts and prints something to the screen using mach_print() showing it is working


What the name server should do:

The name server has the purpose to offer a registration service for othe servers. After booting it should be able to listen for other  servers that want to register to the name server publishing their ports. The server will store the ports in a key-value structure, probably by name and the port. In this way a client that want to send messages to a server will ask the needed ports to the name server, that will "establish" a connection, between the client and the server, providing the ports to the client. This is the basic project idea.

The problems:

Looking at the Hurd, startup.c (frob_kernel_process) line: 1092, it sets, as the comment says too, it installs the proc port to the kernel task as a bootstrap port making it visible to other Hurds.
Before doing that the code checks if the kernel_task is a valid port otherwise it will search it in the process list with HURD_PID_KERNEL ( defined as 3).

I'm having difficulties getting the kernel_task to do something similar but with my nameserver.

I want to set the nameserver port as bootstrap port to the kernel_task. How to get the kernel_task considering that i can just use the kernel, and the Hurd in that environment is not running?

I also saw there is an option to the command line at boot time --kernel-task='${kernel-task}', that gives me a number that depend of the position of the argument in the argument list, so probably
i'm using ot in the wrong way.

Also, if i misunderstanding the way to operate, please, correct me.

Thank you for the help,
Alex.

reply via email to

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