LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > LinuxQuestions.org > Linux - News > Syndicated Linux News
User Name
Password
Syndicated Linux News This forum is for the discussion of Syndicated Linux News stories.

Notices

Reply
 
Search this Thread
Old 04-26-2006, 06:21 PM   #1
LXer
LXer NewsBot
 
Registered: Dec 2005
Posts: 76,230

Rep: Reputation: 87
LXer: Linux: Who Owns The Stack?


Published at LXer:

In a short thread on thelkml, Linux creator Linus Torvalds discussedrecentlyadded hacks to prevent gcc from overwriting the argument stack inasmlinkage functions on the x86 platform. The existing fix involves usingprevent_tail_call() to prevent the gcc tail call optimization, though Linus notes, "the problem isn't even really fundamentally tailcalls, that just is the detail that happens to trigger the problem (but I could imagine other situations triggering it _too_". Tail calls are when the last line of one function returns a call to another function, somethingcommonly optimized by compilers.Linus acknowledged that the current hack in the kernel code is ugly, suggesting that the proper fix is for the gcc team to add an attribute allowing code to tell gcc it doesn't own the argument stack, "I'd much rather have 'asmlinkage' tell gcc directly that it doesn't own the stack, but no such attribute exists, so we're stuck with our hacky manual 'prevent_tail_call()' macro once more (we've had the same issue before with sys_waitpid() and sys_wait4())." He then went on to propose a cleaner hack to solve the same problem in a more generic way, not specific to the tail call optimization.

Read More...
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Multimedia stack targets Linux mobile phones LXer Syndicated Linux News 0 02-11-2006 07:46 AM
LXer: Trolltech, Teleca partner on Linux phone stack LXer Syndicated Linux News 0 02-09-2006 02:31 PM
LXer: Mobile phone stack developer seeks Linux partners LXer Syndicated Linux News 0 02-07-2006 06:16 PM
LXer: Linux mobile phone stack gains 3G A/V codecs LXer Syndicated Linux News 0 01-04-2006 06:01 AM
LXer: Can we still say that nobody owns the Internet? LXer Syndicated Linux News 0 12-17-2005 11:16 PM


All times are GMT -5. The time now is 06:29 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration