errorr "_create_session: Operation not permitted" on recent
mol snapshots
Martin
mol-general@lists.maconlinux.org
Wed, 18 Feb 2004 02:38:08 +0100
I just compiled a recent mol-rsync snapshot and when I run startmol I get:
rs6000:/etc/mol# startmol --test
Mac-on-Linux 0.9.70-rc2 [Feb 18 2004 01:51]
Copyright (C) 1997-2004 Samuel Rydh
Starting MOL session 0
_create_session: Operation not permitted
I also tried mol-0.9.70-rc2 but it gives me the same error.
Machine is a rs6000 with 604 processor running debian. I have run mol 0.95 and mol 0.98 succesfully on it although I never got osx 10.0 or 10.1 to work.
Which parameters I give it (--test --osx --cdboot) don't seem to matter.
I narrowed the problem down to where I think it happens in the source(see below), but I don't know why.
Does anybody have a clue?
greetings,
Martin
I have added the lines <<errormessage appears here I Think>> and
<<problem is here I think>> in the code below.
src/cpu/ppc/init.c line 150:
int
open_session( void )
{
struct timeval tv;
check_kmod_version();
gettimeofday( &tv, NULL );
srandom( tv.tv_usec + get_tbl() );
if( _create_session(g_session_id) < 0 ) {
switch( errno ) {
if( _create_session(g_session_id) < 0 ) {
switch( errno ) {
case EMOLINUSE:
printm("---> Session %d is already running (needs to be killed?)\n", g_session_id);
break;
case EMOLINVAL:
printm("The session number (%d) is out of bounds\n", g_session_id );
break;
case EMOLSECURITY:
printm("*****************************************************\n"
"* SECURITY ALERT. Somebody (other than MOL) has\n"
"* tried to utilize the MOL infrastructure. Due to\n"
"* security reasons, a reboot is necessary in order to\n"
"* get MOL working again.\n"
"*****************************************************\n");
break;
case EMOLGENERAL:
printm("_create_session() failed due to an unspecified error\n");
break;
default:
<<errormessage appears here I think>> perrorm("_create_session");
break;
}
return 1;
}
src/include/wrapper.h line 40:
static inline int _create_session( int sessnum ) {
return mol_ioctl( MOL_IOCTL_CREATE_SESSION, sessnum, 0, 0 ); }
src/kmod/Linux/dev.c line 249:
static int
mol_ioctl( struct inode *inode, struct file *file, unsigned int cmd, unsigned long arg )
{
mol_ioctl_pb_t pb;
kernel_vars_t *kv;
int ret;
/* fast path */
if( cmd == MOL_IOCTL_SMP_SEND_IPI ) {
send_ipi();
return 0;
}
if( copy_from_user(&pb, (void*)arg, sizeof(pb)) )
return -EFAULT;
switch( cmd ) {
case MOL_IOCTL_GET_INFO:
return get_info( (mol_kmod_info_t*)pb.arg1, pb.arg2 );
case MOL_IOCTL_CREATE_SESSION:
<<problem is here I think>> if( !(file->f_mode & FMODE_WRITE) || !capable(CAP_SYS_ADMIN) )
<<problem is here I think>> return -EPERM;
ret = -EINVAL;
down( &initmutex );
if( (uint)pb.arg1 < MAX_NUM_SESSIONS && !file->private_data ) {
if( !(ret=initialize_session(pb.arg1)) ) {
kv = g_sesstab->kvars[pb.arg1];
init_MUTEX( &kv->ioctl_sem );
file->private_data = kv;
}
}
up( &initmutex );
return ret;