From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Andrew Morton <akpm@osdl.org>
Cc: Linus Torvalds <torvalds@osdl.org>,
Linux Kernel list <linux-kernel@vger.kernel.org>
Subject: [PATCH] ppc64: syscall error test incorrect for 64 bits results
Date: Mon, 29 Mar 2004 18:56:00 +1000 [thread overview]
Message-ID: <1080550559.1385.11.camel@gaston> (raw)
Hi !
The syscall return path on ppc64 checks if the error is between
-LAST_ERRNO and 0, if it is, does the usual inversion along with
setting a CR bit indicating to glibc that an error occured.
However, we had an interesting bug where we used a 32 bits logica
(unsigned) comparison, thus possibly doing false positives for
valid 64 bits unsigned values whose low 32 bits happen to be in
the error range.
This patch fixes that.
===== arch/ppc64/kernel/entry.S 1.32 vs edited =====
--- 1.32/arch/ppc64/kernel/entry.S Fri Mar 19 16:59:29 2004
+++ edited/arch/ppc64/kernel/entry.S Fri Mar 26 17:56:07 2004
@@ -139,7 +139,7 @@
91:
#endif
li r10,-_LAST_ERRNO
- cmpl 0,r3,r10
+ cmpld 0,r3,r10
blt 30f
neg r3,r3
22: ld r10,_CCR(r1) /* Set SO bit in CR */
reply other threads:[~2004-03-29 8:56 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=1080550559.1385.11.camel@gaston \
--to=benh@kernel.crashing.org \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@osdl.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