kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
* Unimplemented system call
@ 2019-03-06  0:08 Umair Khan
  2019-03-06  0:26 ` valdis.kletnieks
  0 siblings, 1 reply; 4+ messages in thread
From: Umair Khan @ 2019-03-06  0:08 UTC (permalink / raw)
  To: Kernel Newbies

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Unimplemented system call
  2019-03-06  0:08 Unimplemented system call Umair Khan
@ 2019-03-06  0:26 ` valdis.kletnieks
  2019-03-06  0:52   ` Umair Khan
  0 siblings, 1 reply; 4+ messages in thread
From: valdis.kletnieks @ 2019-03-06  0:26 UTC (permalink / raw)
  To: Umair Khan; +Cc: Kernel Newbies

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Unimplemented system call
  2019-03-06  0:26 ` valdis.kletnieks
@ 2019-03-06  0:52   ` Umair Khan
  2019-03-06  4:25     ` valdis.kletnieks
  0 siblings, 1 reply; 4+ messages in thread
From: Umair Khan @ 2019-03-06  0:52 UTC (permalink / raw)
  To: Valdis Kletnieks; +Cc: Kernel Newbies

On Tue, Mar 5, 2019 at 7:26 PM <valdis.kletnieks@vt.edu> 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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Unimplemented system call
  2019-03-06  0:52   ` Umair Khan
@ 2019-03-06  4:25     ` valdis.kletnieks
  0 siblings, 0 replies; 4+ messages in thread
From: valdis.kletnieks @ 2019-03-06  4:25 UTC (permalink / raw)
  To: Umair Khan; +Cc: Kernel Newbies

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-03-06  4:26 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-06  0:08 Unimplemented system call Umair Khan
2019-03-06  0:26 ` valdis.kletnieks
2019-03-06  0:52   ` Umair Khan
2019-03-06  4:25     ` valdis.kletnieks

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).