All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Dumazet <dada1@cosmosbay.com>
To: Robert Richter <robert.richter@amd.com>
Cc: Ingo Molnar <mingo@elte.hu>, LKML <linux-kernel@vger.kernel.org>,
	Andi Kleen <ak@linux.intel.com>
Subject: Re: [git pull] OProfile fixes for v2.6.28
Date: Mon, 10 Nov 2008 09:05:37 +0100	[thread overview]
Message-ID: <4917EB51.9020304@cosmosbay.com> (raw)
In-Reply-To: <20081107171339.GQ9785@erda.amd.com>

[-- Attachment #1: Type: text/plain, Size: 1542 bytes --]

Robert Richter a écrit :
> Hi Ingo,
> 
> please pull oprofile fixes for 2.6.28 for tip regression:
> 
> git://git.kernel.org/pub/scm/linux/kernel/git/rric/oprofile.git oprofile-for-tip
> 
> Thanks,
> 
> -Robert
> 
> Andi Kleen (1):
>       oprofile: Fix p6 counter overflow check
> 
> Carl Love (2):
>       Cell OProfile: Incorrect local array size in activate spu profiling function
>       Cell OProfile: Incorrect local array size in activate spu profiling function
> 
> Jesper Dangaard Brouer (1):
>       Change UTF8 chars in Kconfig help text about Oprofile AMD barcelona
> 
> Nick Piggin (1):
>       oprofile: fix memory ordering
> 
> Robert Richter (1):
>       Revert "Cell OProfile: Incorrect local array size in activate spu profiling function"
> 

Hi Robert

I am still trying to find why oprofile stops after some millions of samples on my machine.

(All versions of linux supporting oprofile/NMI on this machine have this problem)
Note : I am using a 32bit kernel.

While doing code review I found this bug.

Impact: 32bit kernels, memory corruption

[PATCH] oprofile: fix an overflow in ppro code

reset_value was changed from long to u64 in commit b99170288421c79f0c2efa8b33e26e65f4bb7fb8
(oprofile: Implement Intel architectural perfmon support)

But dynamic allocation of this array use a wrong type (long instead of u64)

Signed-off-by: Eric Dumazet <dada1@cosmosbay.com>
---
 arch/x86/oprofile/op_model_ppro.c |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)


[-- Attachment #2: oprofile_ppro.patch --]
[-- Type: text/plain, Size: 481 bytes --]

diff --git a/arch/x86/oprofile/op_model_ppro.c b/arch/x86/oprofile/op_model_ppro.c
index 3f1b81a..716d26f 100644
--- a/arch/x86/oprofile/op_model_ppro.c
+++ b/arch/x86/oprofile/op_model_ppro.c
@@ -69,7 +69,7 @@ static void ppro_setup_ctrs(struct op_msrs const * const msrs)
 	int i;
 
 	if (!reset_value) {
-		reset_value = kmalloc(sizeof(unsigned) * num_counters,
+		reset_value = kmalloc(sizeof(reset_value[0]) * num_counters,
 					GFP_ATOMIC);
 		if (!reset_value)
 			return;

  parent reply	other threads:[~2008-11-10  8:06 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-07 17:13 [git pull] OProfile fixes for v2.6.28 Robert Richter
2008-11-07 18:22 ` Ingo Molnar
2008-11-10  8:05 ` Eric Dumazet [this message]
2008-11-10  8:43   ` Andi Kleen
2008-11-10  9:01     ` Eric Dumazet
2008-11-10 14:23     ` [PATCH] oprofile: re-arm APIC_DM_NMI in ppro_check_ctrs() Eric Dumazet
2008-11-10 15:49       ` Andi Kleen
2008-11-10 15:50         ` Eric Dumazet
2008-11-10 17:46           ` Andi Kleen
2008-11-11  8:32         ` Eric Dumazet
2008-11-17 17:33           ` Robert Richter
2008-11-17 18:25             ` Andi Kleen
2008-11-18  8:57               ` Robert Richter
2008-11-10 16:11       ` Cyrill Gorcunov
2008-11-10 16:19         ` Eric Dumazet
2008-11-10 16:31           ` Cyrill Gorcunov
2008-11-17 17:57   ` [git pull] OProfile fixes for v2.6.28 Robert Richter
  -- strict thread matches above, loose matches on Subject: below --
2008-11-23 11:06 Robert Richter
2008-11-23 11:18 ` Ingo Molnar
2008-12-03 17:16 Robert Richter
2008-12-03 17:53 ` Ingo Molnar

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=4917EB51.9020304@cosmosbay.com \
    --to=dada1@cosmosbay.com \
    --cc=ak@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=robert.richter@amd.com \
    /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 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.