Re: Unimplemented system call

2019-03-05 Thread valdis . kletnieks
On Tue, 05 Mar 2019 19:52:13 -0500, Umair Khan said:

> I was just wondering why are these system calls not implemented?

Ah. So now we get to the question you *should* have asked. :)

Depends on the system call and the hardware and the kernel config.
Often, on embedded systems, you know from the start that your system
won't be needed certain optional features, so you can build the kernel
without those features to save space.

However, if some program tries to issue a syscall that's related to those
optional features, you have to return *some* sort of error. So 'not implemented'
it is

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: Unimplemented system call

2019-03-05 Thread Umair Khan
On Tue, Mar 5, 2019 at 7:26 PM  wrote:
>
> On Tue, 05 Mar 2019 19:08:20 -0500, Umair Khan said:
>
> > I was just roaming around the linux source code when I stumbled upon
> > this line - 
> > https://github.com/torvalds/linux/blob/master/include/linux/syscalls.h#L1200
> >
> > May I know what is the use of this system call?
>
> /*
>  * Not a real system call, but a placeholder for syscalls which are
>  * not implemented -- see kernel/sys_ni.c
>  */
> asmlinkage long sys_ni_syscall(void);
>
> Well, did you go look at kernel/sys_ni.c like it told you to?  Because if you
> bothered reading the first 2 dozen lines of that file, you would find:

Yes I looked at this file actually.

> /*
>  * Non-implemented system calls get redirected here.
>  */
> asmlinkage long sys_ni_syscall(void)
> {
> return -ENOSYS;
> }
>
> Are there any remining questions?

I was just wondering why are these system calls not implemented?

-Umair

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: Unimplemented system call

2019-03-05 Thread valdis . kletnieks
On Tue, 05 Mar 2019 19:08:20 -0500, Umair Khan said:

> I was just roaming around the linux source code when I stumbled upon
> this line - 
> https://github.com/torvalds/linux/blob/master/include/linux/syscalls.h#L1200
>
> May I know what is the use of this system call?

/*
 * Not a real system call, but a placeholder for syscalls which are
 * not implemented -- see kernel/sys_ni.c
 */
asmlinkage long sys_ni_syscall(void);

Well, did you go look at kernel/sys_ni.c like it told you to?  Because if you
bothered reading the first 2 dozen lines of that file, you would find:

/*
 * Non-implemented system calls get redirected here.
 */
asmlinkage long sys_ni_syscall(void)
{
return -ENOSYS;
}

Are there any remining questions?

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Unimplemented system call

2019-03-05 Thread Umair Khan
Hello,

I was just roaming around the linux source code when I stumbled upon
this line - 
https://github.com/torvalds/linux/blob/master/include/linux/syscalls.h#L1200

May I know what is the use of this system call?

Thank you,
Umair

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies