From: Joseph Parmelee <jparmele@wildbear.com>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: Darren Hart <dvhltc@us.ibm.com>,
Peter Zijlstra <peterz@infradead.org>,
Ingo Molnar <mingo@elte.hu>,
Eric Dumazet <eric.dumazet@gmail.com>,
Dinakar Guniguntala <dino@in.ibm.com>,
linux-kernel@vger.kernel.org
Subject: Re: futex_cmpxchg_enabled not set in futex_init on pentium3
Date: Sat, 05 Dec 2009 17:24:46 -0600 (CST) [thread overview]
Message-ID: <alpine.LNX.2.00.0912051509210.879@bruno> (raw)
In-Reply-To: <alpine.LFD.2.00.0912012236120.24119@localhost.localdomain>
Hello again:
Did some more testing and developed a bit more data, possibly relevant:
1. Using gdb on /proc/kcore, 2.6.32 no longer allows access to 0xc0000000,
which could be accessed in 2.6.31.x, presumably showing the 16-bit real-mode
interrupt address table set up by the BIOS at physical address zero. But
.... (see 3).
2. Disabling the AMI BIOS corruption prevention in 2.6.32 had no effect on
the behavior described in 3 below.
3. In 2.6.31.x the following inserted in futex_atomic_cmpxchg_inatomic() in
futex.h caused an oops. It now works in 2.6.32.
printk(KERN_INFO "*uaddr=%x, oldval=%x, newval=%x",
*uaddr, oldval, newval);
Producing in dmesg:
[ 0.149408] *uaddr=f0006aa0, oldval=0, newval=0
The following also works in futex_init in futex.c:
unsigned int testval, *nullptr=NULL;
testval=*(unsigned int *)NULL;
printk(KERN_INFO "curval=%x testval=%x", curval, testval);
printk(KERN_INFO "An explicit null dereference=%x", *(unsigned int *)NULL);
printk(KERN_INFO "An implicit null dereference=%x", *nullptr);
Producing in dmesg:
[ 0.149466] curval=f0006aa0 testval=f0006aa0
[ 0.149557] An explicit null dereference=f0006aa0
[ 0.149648] An implicit null dereference=f0006aa0
Thus it is completely clear that the virtual zero page is mapped, probably
to physical zero, during this phase of kernel initialization.
I have used 2.6.32 for only one day, but so far see no ill effects from this
other than the lack of those futex functions which rely on a null pointer
dereference fault to set futex_cmpxchg_enabled. If zero-page mapping is now
"normal", the test in futex.c for cmpxchg functionality must be changed.
I have "fixed" this on our intel machines by simply commenting out the test
of curval in futex_init, thus causing futex_cmpxchg_enabled to be
unconditionally set. Not suitable for prime-time obviously, but "it works
for us" until somebody with more savvy comes up with a real fix.
Yours,
Joseph
next prev parent reply other threads:[~2009-12-05 23:24 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-29 17:46 Joseph Parmelee
2009-11-30 21:36 ` Darren Hart
2009-11-30 22:26 ` Thomas Gleixner
2009-12-01 4:27 ` Joseph Parmelee
2009-12-01 20:44 ` Joseph Parmelee
2009-12-01 21:39 ` Thomas Gleixner
2009-12-01 21:52 ` Joseph Parmelee
2009-12-01 22:55 ` H. Peter Anvin
2009-12-02 0:53 ` Joseph Parmelee
2009-12-02 1:40 ` H. Peter Anvin
2009-12-05 23:24 ` Joseph Parmelee [this message]
2009-12-05 0:46 ` Joseph Parmelee
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=alpine.LNX.2.00.0912051509210.879@bruno \
--to=jparmele@wildbear.com \
--cc=dino@in.ibm.com \
--cc=dvhltc@us.ibm.com \
--cc=eric.dumazet@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
/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
all inboxes | Powered by JetHome®