LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Neil Brown <neilb@suse.de>
To: Andi Kleen <ak@suse.de>
Cc: Neil Brown <neilb@suse.de>, Sean Reifschneider <jafo@tummy.com>,
linux-kernel@vger.kernel.org
Subject: Re: PATCH - x86-64 signed-compare bug, was Re: select() setting ERESTARTNOHAND (514).
Date: Thu, 11 Jan 2007 12:02:53 +1100 [thread overview]
Message-ID: <17829.36029.240912.274302@notabene.brown> (raw)
In-Reply-To: message from Andi Kleen on Thursday January 11
On Thursday January 11, ak@suse.de wrote:
> > Just a 'me too' at this point.
> > The X server on my shiny new notebook (Core 2 Duo) occasionally dies
> > with 'select' repeatedly returning ERESTARTNOHAND. It is most
> > annoying!
>
> Normally it should be only visible in strace. Did you see it without
> strace?
No, only in strace.
>
> >
> > You don't mention in the Email which kernel version you use but I see
> > from the web page you reference it is 2.6.19.1. I'm using
> > 2.6.18.something.
> >
> > I thought I'd have a quick look at the code, comparing i386 to x86-64
> > and guess what I found.....
> >
> > On x86-64, regs->rax is "unsigned long", so the following is
> > needed....
>
> regs->rax is unsigned long.
> I don't think your patch will make any difference. What do you think
> it will change?
If regs->rax is unsigned long, then I would think the compiler would
be allowed to convert
switch (regs->rax) {
case -514 : whatever;
}
to a no-op, as regs->rax will never have a negative value.
However it appears that the current compiler doesn't make that
optimisation so I guess I was too hasty.
Still, I think it would be safer to have the cast, in case the compiler
decided to be clever.... or does the C standard ensure against that?
Sorry for the noise,
NeilBrown
next prev parent reply other threads:[~2007-01-11 1:03 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-01-10 23:42 Sean Reifschneider
2007-01-11 0:27 ` David Miller
2007-01-11 1:04 ` Sean Reifschneider
2007-01-11 1:15 ` David Miller
2007-01-11 8:25 ` Sean Reifschneider
2007-01-11 22:22 ` bert hubert
2007-01-24 0:50 ` Sean Reifschneider
2007-01-11 0:37 ` PATCH - x86-64 signed-compare bug, was " Neil Brown
2007-01-11 0:40 ` Andi Kleen
2007-01-11 1:02 ` Neil Brown [this message]
2007-01-11 1:37 ` Andi Kleen
2007-01-11 4:09 ` Sean Reifschneider
2007-01-11 19:38 ` Denis Vlasenko
2007-01-11 0:43 ` David Miller
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=17829.36029.240912.274302@notabene.brown \
--to=neilb@suse.de \
--cc=ak@suse.de \
--cc=jafo@tummy.com \
--cc=linux-kernel@vger.kernel.org \
--subject='Re: PATCH - x86-64 signed-compare bug, was Re: select() setting ERESTARTNOHAND (514).' \
/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
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).