Welcome to Linux Forums!

With a comprehensive Linux Forum, information on various types of Linux software and many Linux Reviews articles, we have all the knowledge you need a click away, or accessible via our knowledgeable members.

Linux Forum ArticlesLinux ForumsLinux Forum DownloadsLinux Hosts
Home|Register|FAQ|Member List|Calendar|Unanswered Posts|Forum Rules|Today's Posts|Advanced Search|
SEARCH FOR IN
Go Back   Linux Forums > GNU Linux Zone > The Linux Kernel
Reload this Page check my view on syscall, asmlinkage?
Linux Forums
Linux Forums
Welcome To The Linux Forums!
Welcome to Linux Forums. We pride ourselves in being one of the largest Linux communities on the web, we encourage you to REGISTER on our forums and participate in the community. There are over 150,000 members ready to answer your questions. JOINING US today will allow you to make new posts, get support, send messages to other members and submit downloads to our downloads directory and many other great features!

The Linux Kernel Compiling, theory, programming or other discussion about the linux kernel

Reply
 
Thread Tools Display Modes
Old 05-13-2008   #1 (permalink)
nju_yang
Just Joined!
 
Join Date: Apr 2008
Posts: 1
Smile check my view on syscall, asmlinkage?

please review my statement to check out whether it is right or not? thanks.

this topic is about syscall.
when i invoke a syscall, the parameters are passed through at most 5 registers. so we call access parameters through registers. but, all the syscall implementations routines (sys.c) are started with asmlinkage, which means the functions should get parameters from cpu stack rather than registers. so, are all the parameters in registers pushed into cpu stack when the syscall enters enter.S or somewhere?

anything special about asmlikage?
nju_yang is offline   Reply With Quote
Old 05-15-2008   #2 (permalink)
matt_kleviar
Just Joined!
 
Join Date: May 2008
Posts: 24
I think when you make syscall, kernel also has to switch to its kernel mode stack too.
matt_kleviar is offline   Reply With Quote
Old 05-15-2008   #3 (permalink)
matt_kleviar
Just Joined!
 
Join Date: May 2008
Posts: 24
in case of more than 5 params, I think register ebx will be pointing to the memory where parameters can be found, I think that could be stack.
matt_kleviar is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


All times are GMT. The time now is 10:36 PM.

Powered by vBulletin 3.6.8 ©2000 - 2007, content relevant URLs by vBSEO, Property of Core Root.

Content Relevant URLs by vBSEO 3.0.0