kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
* X86 : system call
@ 2021-12-12  7:04 Muni Sekhar
  2021-12-12  8:12 ` Greg KH
  0 siblings, 1 reply; 2+ messages in thread
From: Muni Sekhar @ 2021-12-12  7:04 UTC (permalink / raw)
  To: kernelnewbies, tglx, Ingo Molnar, hpa, x86; +Cc: LKML

Hi all,

32-bit system call numbers and entry vectors are defined in the format
"<number> <abi> <name> <entry point> <compat entry point>". What is
the difference between <entry point> and <compat entry point>?

The abi is always "i386" for arch/x86/entry/syscalls/syscall_32.tbl,
whereas for 64-bit(arch/x86/entry/syscalls/syscall_64.tbl) it is used
as "common" and "64", "x32". What is the difference between "common"
and "64", "x32"?

While adding a new system call(for example: mlock) to kernel,
/kernel/sys_ni.c file modified as mentioned below:
+cond_syscall(sys_mlock2);

Why do we pass <entry point> to cond_syscall()?

Also, could someone please point me to a document which explains about
"how to add a new system call" and the "system call flow from user
space to kernel space" in X86 ARCHITECTURE (32-BIT AND 64-BIT).


-- 
Thanks,
Sekhar

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

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

* Re: X86 : system call
  2021-12-12  7:04 X86 : system call Muni Sekhar
@ 2021-12-12  8:12 ` Greg KH
  0 siblings, 0 replies; 2+ messages in thread
From: Greg KH @ 2021-12-12  8:12 UTC (permalink / raw)
  To: Muni Sekhar; +Cc: kernelnewbies, x86, LKML, Ingo Molnar, hpa, tglx

On Sun, Dec 12, 2021 at 12:34:54PM +0530, Muni Sekhar wrote:
> Also, could someone please point me to a document which explains about
> "how to add a new system call" and the "system call flow from user
> space to kernel space" in X86 ARCHITECTURE (32-BIT AND 64-BIT).

There are many documents online that show both of these already.  Have
you used a search engine first?

Both of these are usually questions that students are asked for
assignments, good luck in class!

greg k-h

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

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

end of thread, other threads:[~2021-12-12  8:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-12-12  7:04 X86 : system call Muni Sekhar
2021-12-12  8:12 ` Greg KH

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).