Allow user processes to send messages to kernel

This patch allows user processes to send messages to kernel. Without
this change, trying to do a system call for using message queues like
sys_mq_open will fail with ECALLDENIED error number -210.
This commit is contained in:
Sanchayan Maity 2016-03-16 23:30:06 +05:30
parent 58ce9ca12b
commit d2fb3a4b8a
1 changed files with 5 additions and 5 deletions

View File

@ -108,11 +108,11 @@ static int kernel_call_dispatch(struct proc * caller, message *msg)
printf("SYSTEM: illegal request %d from %d.\n",
call_nr,msg->m_source);
result = EBADREQUEST; /* illegal message type */
}
else if (!GET_BIT(priv(caller)->s_k_call_mask, call_nr)) {
printf("SYSTEM: denied request %d from %d.\n",
call_nr,msg->m_source);
result = ECALLDENIED; /* illegal message type */
// } /* We have to allow user processes to send messages to kernel */
// else if (!GET_BIT(priv(caller)->s_k_call_mask, call_nr)) {
// printf("SYSTEM: denied request %d from %d.\n",
// call_nr,msg->m_source);
// result = ECALLDENIED; /* illegal message type */
} else {
/* handle the system call */
if (call_vec[call_nr])