0

I was running a test suite for testing IPC related functionality in android kernel. while I was testing msgrcv system call , it return error function not implemented.

So is it true msgrcv() system call not implemented in android-kernel, if so why and which system call in android kernel serve purpose of msgrcv() system call.

I got related statement which says System V IPCs (including message queues) are not implemented on Bionic. but not sure what does it mean.

Update : I am able to find definition of msgrcv in android kernel , but not sure why it is returning error function not implemented.

Below code snippet :

SYSCALL_DEFINE5(msgrcv, int, msqid, struct msgbuf __user *, msgp, size_t, msgsz,
                long, msgtyp, int, msgflg)
{
        return do_msgrcv(msqid, msgp, msgsz, msgtyp, msgflg, do_msg_fill);
}

Please comment if information seems incomplete or vague ,Help is appreciated.

Pradeep Goswami
  • 1,785
  • 1
  • 15
  • 24

1 Answers1

1

System V IPC may be available in the kernel but system call interfaces are not implemented in Bionic lib C. For Example, /bionic/libc/arch-arm/syscalls/ contains all system call implementations with respect to ARM.

digitizedx
  • 386
  • 5
  • 16
  • Thanks for input, What about if I tried to bypass bionic interfaces and try to call syscall directly ,is it possible. – Pradeep Goswami Jan 08 '16 at 06:51
  • 1
    I am not sure if I understand what you meant. The right way to is to implement the msgrecv syscall in bionic lib c. Find the system call number for msgrecv from kernel and follow this link from line number 139, http://androidxref.com/6.0.0_r1/xref/bionic/. You can implement this in your code also. But I am not sure about licensing violations in both cases. – digitizedx Jan 08 '16 at 07:02
  • @PradeepGoswami You can implement syscalls yourself (enough examples on SO) however with Android getting security tighter and tighter it is possible that they don't or won't allow that call via SELinux mechanisms. – auselen Jan 08 '16 at 07:31
  • 1
    @PradeepGoswami something like this http://stackoverflow.com/questions/12946958/system-call-in-arm – auselen Jan 08 '16 at 07:33
  • this seems to be interesting – Pradeep Goswami Jan 08 '16 at 09:57