Re: Modifying Minix 3.4 message size

225 views
Skip to first unread message
Message has been deleted

Jean-Baptiste Boric

unread,
May 2, 2019, 11:35:06 AM5/2/19
to minix3
Hi,

Wouldn't it be much simpler to keep messages intact and carry the MAC data separately, like how memory grant tables are handled with SYS_SETGRANT? That is, informing the kernel of the memory location of an userland data structure so that it can refer to it as needed.

Nemovonneumann

unread,
May 3, 2019, 7:20:52 AM5/3/19
to minix3
Hi, 

It would be simpler but it's not really my intention. I try to authenticate each system call and if I use SYS_SETGRANT, the procedure will be authenticated but not the system call itself... I would like to find a way to pass a MAC as input each time the function "int _syscall(endpoint_t _who, int _syscallnr, message *_msgptr);" is called. 

David van Moolenbroek

unread,
May 3, 2019, 1:02:13 PM5/3/19
to minix3
Hello,

The reason that the compilation breaks is that some newly installed utilities will start using the new message size before the system layer supports that new size. There is no way to avoid that. As such, the message size can be changed only by means of cross compilation, as we did for the 3.3.0 message increase "flag day".

Regards,
David

Pablo Pessolani

unread,
May 3, 2019, 2:03:31 PM5/3/19
to min...@googlegroups.com
Hi.
   How can we make the mentioned cross-compilation?
Regards.
PAP

--
You received this message because you are subscribed to the Google Groups "minix3" group.
To unsubscribe from this group and stop receiving emails from it, send an email to minix3+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

stux...@gmail.com

unread,
May 5, 2019, 1:37:36 PM5/5/19
to minix3
Hi PAP,

Check out the following wiki article:
You will likely have to install a brand-new instance of Minix from the generated ISO.

-stux


On Friday, May 3, 2019 at 2:03:31 PM UTC-4, ppessolani wrote:
Hi.
   How can we make the mentioned cross-compilation?
Regards.
PAP

El vie., 3 may. 2019 a las 14:02, David van Moolenbroek (<da...@minix3.org>) escribió:
Hello,

The reason that the compilation breaks is that some newly installed utilities will start using the new message size before the system layer supports that new size. There is no way to avoid that. As such, the message size can be changed only by means of cross compilation, as we did for the 3.3.0 message increase "flag day".

Regards,
David

--
You received this message because you are subscribed to the Google Groups "minix3" group.
To unsubscribe from this group and stop receiving emails from it, send an email to min...@googlegroups.com.

HOUNMENOU Féliciano

unread,
May 5, 2019, 2:08:29 PM5/5/19
to min...@googlegroups.com
We have solved the problem without changing the message size.
Suppose you want to sent a structure of userspace to the Kernel through servers.
1. Define your structure in a .h file that can be imported both from the user-space and kernel
2. Define your own message . A structure for the server and one for the kernel in ipc.h
Example:
typedef struct {
vir_bytes ctx; /* mcontext_t * */
uint8_t padding[52];
} mess_lc_pm_mcontext;
_ASSERT_MSG_SIZE(mess_lc_pm_mcontext);

typedef struct {
endpoint_t endpt;
vir_bytes ctx_ptr;
uint8_t padding[48];
} mess_lsys_krn_sys_getmcontext;
_ASSERT_MSG_SIZE(mess_lsys_krn_sys_getmcontext);

3. Your user space function will take as a parameter of type pointer
Example:
int function_test_newstruct(mystruct * var){
....
}

4. The function that is the bridge between the server and the kernel must take two parameters.
Example:
int sys_mcehandler(endpoint_t proc,vir_bytes vars) 
{
....
}
5. In the Kernel, Use this function to make the copy.
int data_copy(endpoint_t from, vir_bytes from_addr, endpoint_t to, vir_bytes to_addr, size_t bytes);

Note: The same principle is used to copy data from the Kernel to user space through the servers.

Pablo Pessolani

unread,
May 7, 2019, 3:24:45 PM5/7/19
to min...@googlegroups.com
Thanks Stux.
Regards.
PAP


De: min...@googlegroups.com <min...@googlegroups.com> en nombre de stux...@gmail.com <stux...@gmail.com>
Enviado: domingo, 5 de mayo de 2019 14:37
Para: minix3
Asunto: Re: [minix3] Re: Modifying Minix 3.4 message size
 
To unsubscribe from this group and stop receiving emails from it, send an email to minix3+un...@googlegroups.com.
Message has been deleted

Walid Hanafy

unread,
Mar 26, 2020, 10:15:20 PM3/26/20
to minix3
Can You share this code with me?
Reply all
Reply to author
Forward
0 new messages