All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: dhowells@redhat.com
Cc: dvomlehn@cisco.com, to@dvomlehn-lnx2.corp.sa.net,
	linux-arch@vger.kernel.org, akpm@linux-foundation.org,
	linux-kernel@vger.kernel.org,
	maint_arch@dvomlehn-lnx2.corp.sa.net
Subject: Re: [PATCH 1/23] Make register values available to panic notifiers
Date: Wed, 14 Apr 2010 16:58:51 -0700 (PDT)	[thread overview]
Message-ID: <20100414.165851.144419620.davem@davemloft.net> (raw)
In-Reply-To: <28376.1271289134@redhat.com>

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[...];

  reply	other threads:[~2010-04-14 23:58 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-12  6:06 [PATCH 1/23] Make register values available to panic notifiers David VomLehn
2010-04-12  6:06 ` David VomLehn
2010-04-12  6:24 ` Mike Frysinger
2010-04-12  6:24   ` Mike Frysinger
2010-04-12 11:16 ` David Howells
2010-04-12 11:16   ` David Howells
2010-04-14 20:41   ` David VomLehn
2010-04-14 20:42   ` David VomLehn
2010-04-14 23:52   ` David Howells
2010-04-14 23:58     ` David Miller [this message]
2010-04-12 12:03 ` Heiko Carstens
2010-04-12 12:03   ` Heiko Carstens
2010-04-12 12:24   ` Russell King
2010-04-12 12:24     ` Russell King
2010-04-14 20:47   ` David VomLehn
2010-04-12 12:20 ` David Howells
2010-04-12 12:20   ` David Howells
2010-04-12 12:27 ` Russell King
2010-04-12 12:27   ` Russell King
2010-04-12 13:35   ` Martin Schwidefsky
2010-04-12 13:35     ` Martin Schwidefsky
2010-04-14 21:09     ` David VomLehn
2010-04-14 21:00   ` David VomLehn
2010-04-12 12:45 ` David Howells
2010-04-14 21:04   ` David VomLehn
2010-04-15  2:54 ` Paul Mundt
  -- strict thread matches above, loose matches on Subject: below --
2010-04-12  6:03 David VomLehn
2010-04-12 21:57 ` Andrew Morton
2010-04-14 22:02   ` David VomLehn

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100414.165851.144419620.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=akpm@linux-foundation.org \
    --cc=dhowells@redhat.com \
    --cc=dvomlehn@cisco.com \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maint_arch@dvomlehn-lnx2.corp.sa.net \
    --cc=to@dvomlehn-lnx2.corp.sa.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.