linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Ingo Molnar <mingo@elte.hu>, Thomas Gleixner <tglx@linutronix.de>,
	LKML <linux-kernel@vger.kernel.org>,
	David Holmes - Sun Microsystems <David.Holmes@Sun.COM>,
	Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH] fix for futex_wait signal stack corruption
Date: Tue, 4 Dec 2007 20:23:49 -0500 (EST)	[thread overview]
Message-ID: <Pine.LNX.4.58.0712042016540.18042@gandalf.stny.rr.com> (raw)
In-Reply-To: <alpine.LFD.0.9999.0712041436100.13796@woody.linux-foundation.org>


On Tue, 4 Dec 2007, Linus Torvalds wrote:

> On Tue, 4 Dec 2007, Steven Rostedt wrote:
> >
> > Seems that arg3 is not used here and since the timer is 64 bits, we can
> > store the bottom 32 bits in arg2 and the top in arg3 (this will work for
> > both 32 and 64 bit archs).
>
> Yes. That should work fine.

Unfortunately, looking closer at the code, arg3 _is_ used. arg3 is used to
set a flag whether or not the mmap_sem is shared.
(I blame lack of food for not noticing this in the first place).

[...]

> So far, using "unsigned long" has been good enough, in that it's big
> enough for a pointer and all normal arguments, but if something really
> deeply wants another format or a guaranteed 64-bit word regardless of
> architecture, we could make one or more of the arguments be "u64" instead.
>
> But in this case, since there is already unused argument space, I think
> that doing the "32 high bits + 32 low bits" is probably the best option.

Since arg3 is out, which do you prefer? Creating an arg4 (and perhaps
more) in the block or having a u64 arg?  Changing all the args to u64 may
be the best. This way we don't need to worry about passing 64bit
arguments, and we don't waste more space on 64 bit archs by adding more
args of unsigned long.

Thoughts?

-- Steve


  reply	other threads:[~2007-12-05  1:24 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-04 20:57 [PATCH] fix for futex_wait signal stack corruption Steven Rostedt
2007-12-04 21:09 ` Linus Torvalds
2007-12-04 21:39   ` Steven Rostedt
2007-12-04 22:43     ` Linus Torvalds
2007-12-05  1:23       ` Steven Rostedt [this message]
2007-12-05  1:46         ` Linus Torvalds
2007-12-05  3:17           ` [PATCH -v2] " Steven Rostedt
2007-12-05  3:41             ` Linus Torvalds
2007-12-05  3:47               ` Randy Dunlap
2007-12-05  3:53                 ` Steven Rostedt
2007-12-05  5:33               ` David Holmes - Sun Microsystems
2007-12-05  6:06                 ` Linus Torvalds
2007-12-05  6:14                   ` David Holmes - Sun Microsystems
2007-12-05  5:54               ` Thomas Gleixner
2007-12-05 10:31                 ` Ingo Molnar

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=Pine.LNX.4.58.0712042016540.18042@gandalf.stny.rr.com \
    --to=rostedt@goodmis.org \
    --cc=David.Holmes@Sun.COM \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=tglx@linutronix.de \
    --cc=torvalds@linux-foundation.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).