* [PATCH] powerpc/oprofile: fix potential buffer overrun in op_model_cell.c
@ 2010-06-01 19:43 Denis Kirjanov
2010-06-02 20:12 ` Carl Love
2010-06-04 9:58 ` Robert Richter
0 siblings, 2 replies; 3+ messages in thread
From: Denis Kirjanov @ 2010-06-01 19:43 UTC (permalink / raw)
To: arnd, benh, paulus, jkosina
Cc: robert.richter, linuxppc-dev, oprofile-list, cel
Fix potential initial_lfsr buffer overrun.
Writing past the end of the buffer could happen when index == ENTRIES
Signed-off-by: Denis Kirjanov <dkirjanov@kernel.org>
---
arch/powerpc/oprofile/op_model_cell.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/arch/powerpc/oprofile/op_model_cell.c b/arch/powerpc/oprofile/op_model_cell.c
index 2c9e522..7fd90d0 100644
--- a/arch/powerpc/oprofile/op_model_cell.c
+++ b/arch/powerpc/oprofile/op_model_cell.c
@@ -1077,7 +1077,7 @@ static int calculate_lfsr(int n)
index = ENTRIES-1;
/* make sure index is valid */
- if ((index > ENTRIES) || (index < 0))
+ if ((index >= ENTRIES) || (index < 0))
index = ENTRIES-1;
return initial_lfsr[index];
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] powerpc/oprofile: fix potential buffer overrun in op_model_cell.c
2010-06-01 19:43 [PATCH] powerpc/oprofile: fix potential buffer overrun in op_model_cell.c Denis Kirjanov
@ 2010-06-02 20:12 ` Carl Love
2010-06-04 9:58 ` Robert Richter
1 sibling, 0 replies; 3+ messages in thread
From: Carl Love @ 2010-06-02 20:12 UTC (permalink / raw)
To: Denis Kirjanov; +Cc: arnd, linuxppc-dev, paulus, jkosina, oprofile-list
[-- Attachment #1.1: Type: text/plain, Size: 2614 bytes --]
Denis:
I have reviewed the change and agree to it. Thanks for catching that.
Carl Love
Denis Kirjanov
<dkirjanov@hera.k
ernel.org> To
arnd@arndb.de,
06/01/2010 12:43 benh@kernel.crashing.org,
PM paulus@samba.org, jkosina@suse.cz
cc
linuxppc-dev@ozlabs.org,
oprofile-list@lists.sf.net
Subject
[PATCH] powerpc/oprofile: fix
potential buffer overrun in
op_model_cell.c
Fix potential initial_lfsr buffer overrun.
Writing past the end of the buffer could happen when index == ENTRIES
Signed-off-by: Denis Kirjanov <dkirjanov@kernel.org>
---
arch/powerpc/oprofile/op_model_cell.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/arch/powerpc/oprofile/op_model_cell.c
b/arch/powerpc/oprofile/op_model_cell.c
index 2c9e522..7fd90d0 100644
--- a/arch/powerpc/oprofile/op_model_cell.c
+++ b/arch/powerpc/oprofile/op_model_cell.c
@@ -1077,7 +1077,7 @@ static int calculate_lfsr(int n)
index = ENTRIES-1;
/* make sure index is valid */
- if ((index > ENTRIES) || (index < 0))
+ if ((index >= ENTRIES) || (index < 0))
index = ENTRIES-1;
return initial_lfsr[index];
------------------------------------------------------------------------------
_______________________________________________
oprofile-list mailing list
oprofile-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oprofile-list
[-- Attachment #1.2: Type: text/html, Size: 3786 bytes --]
[-- Attachment #2: graycol.gif --]
[-- Type: image/gif, Size: 105 bytes --]
[-- Attachment #3: pic11538.gif --]
[-- Type: image/gif, Size: 1255 bytes --]
[-- Attachment #4: ecblank.gif --]
[-- Type: image/gif, Size: 45 bytes --]
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH] powerpc/oprofile: fix potential buffer overrun in op_model_cell.c
2010-06-01 19:43 [PATCH] powerpc/oprofile: fix potential buffer overrun in op_model_cell.c Denis Kirjanov
2010-06-02 20:12 ` Carl Love
@ 2010-06-04 9:58 ` Robert Richter
1 sibling, 0 replies; 3+ messages in thread
From: Robert Richter @ 2010-06-04 9:58 UTC (permalink / raw)
To: Denis Kirjanov
Cc: arnd@arndb.de, linuxppc-dev@ozlabs.org, paulus@samba.org,
jkosina@suse.cz, oprofile-list@lists.sf.net, cel@us.ibm.com
On 01.06.10 15:43:34, Denis Kirjanov wrote:
> Fix potential initial_lfsr buffer overrun.
> Writing past the end of the buffer could happen when index == ENTRIES
>
> Signed-off-by: Denis Kirjanov <dkirjanov@kernel.org>
Patch applied to
git://git.kernel.org/pub/scm/linux/kernel/git/rric/oprofile.git urgent
Thanks Denis.
-Robert
--
Advanced Micro Devices, Inc.
Operating System Research Center
email: robert.richter@amd.com
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-06-04 10:13 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-06-01 19:43 [PATCH] powerpc/oprofile: fix potential buffer overrun in op_model_cell.c Denis Kirjanov
2010-06-02 20:12 ` Carl Love
2010-06-04 9:58 ` Robert Richter
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.