Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back > Forums > Linux Forums > Linux - News > Syndicated Linux News
User Name
Syndicated Linux News This forum is for the discussion of Syndicated Linux News stories.


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

Rep: Reputation: 96
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.



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 > Forums > Linux Forums > Linux - News > Syndicated Linux News

All times are GMT -5. The time now is 02:42 PM.

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