From: Arnd Bergmann <arnd@arndb•de>
To: linuxppc-dev@ozlabs•org, benh@kernel•crashing.org
Cc: Roel Kluin <12o3l@tiscali•nl>,
oprofile-list@lists•sf.net, Carl Love <cel@us•ibm.com>
Subject: [PATCH] powerpc/cell/oprofile: vma_map: fix test on overlay_tbl_offset
Date: Tue, 7 Oct 2008 10:38:33 +0200 [thread overview]
Message-ID: <200810071038.34085.arnd@arndb.de> (raw)
In-Reply-To: <1223357268.8157.38.camel@pasglop>
From: Roel Kluin <12o3l@tiscali•nl>
Offset is unsigned and when an address isn't found in the vma map
vma_map_lookup() returns the vma physical address + 0x10000000.
vma_map_lookup used to return 0xffffffff on a failed lookup, but
a change was made to return the vma physical address + 0x10000000
There are two callers of vam_map_lookup: one of them correctly
deals with this new return value, but the other (below) did not.
Signed-off-by: Roel Kluin <12o3l@tiscali•nl>
Acked-by: Maynard Johnson <maynardj@us•ibm.com>
Signed-off-by: Arnd Bergmann <arnd@arndb•de>
Cc: oprofile-list@lists•sf.net
Cc: Carl Love <cel@us•ibm.com>
--- a/arch/powerpc/oprofile/cell/vma_map.c
+++ b/arch/powerpc/oprofile/cell/vma_map.c
@@ -229,7 +229,7 @@ struct vma_to_fileoffset_map *create_vma_map(const struct spu *aSpu,
*/
overlay_tbl_offset = vma_map_lookup(map, ovly_table_sym,
aSpu, &grd_val);
- if (overlay_tbl_offset < 0) {
+ if (overlay_tbl_offset > 0x10000000) {
printk(KERN_ERR "SPU_PROF: "
"%s, line %d: Error finding SPU overlay table\n",
__func__, __LINE__);
next prev parent reply other threads:[~2008-10-07 8:38 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-07 5:27 powerpc.git status Benjamin Herrenschmidt
2008-10-07 8:38 ` Arnd Bergmann [this message]
2008-10-13 15:21 ` [PATCH] powerpc/cell/oprofile: vma_map: fix test on overlay_tbl_offset Robert Richter
2008-10-13 20:51 ` Benjamin Herrenschmidt
2008-10-07 12:29 ` powerpc.git status Kumar Gala
2008-10-07 18:57 ` Benjamin Herrenschmidt
2008-10-08 5:55 ` Kumar Gala
2008-10-08 9:29 ` Benjamin Herrenschmidt
2008-10-08 12:10 ` Kumar Gala
2008-10-08 19:16 ` Benjamin Herrenschmidt
2008-10-08 21:00 ` Kumar Gala
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=200810071038.34085.arnd@arndb.de \
--to=arnd@arndb$(echo .)de \
--cc=12o3l@tiscali$(echo .)nl \
--cc=benh@kernel$(echo .)crashing.org \
--cc=cel@us$(echo .)ibm.com \
--cc=linuxppc-dev@ozlabs$(echo .)org \
--cc=oprofile-list@lists$(echo .)sf.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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