Messages in this thread | | | Date | Wed, 14 Apr 2010 16:58:51 -0700 (PDT) | Subject | Re: [PATCH 1/23] Make register values available to panic notifiers | From | David Miller <> |
| |
From: David Howells <dhowells@redhat.com> Date: Thu, 15 Apr 2010 00:52:14 +0100
> David VomLehn <dvomlehn@cisco.com> wrote: > >> > Can the use of va_start() clobber lots of registers, thereby rendering the >> > exercise pointless on some arches? >> > >> >> The implementations I'm familiar with only need one or two registers. What >> it *does* do is to force the contents of registers being used to pass >> argument values onto the stack. This is roughly what gcc does for asm() >> statements when you tell it registers are clobbered. > > How about something like Sparc, where you can pass up to 8 arguments (if I > remember correctly) in registers. I'm not sure how Sparc handles varargs > functions, though.
6 arguments, and all arguments get popped onto the stack into the argument save area when doing varargs so you can access them as an array.
Stack looks like:
struct register_window window; unsigned long args[...];
| |