public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [git pull] OProfile fixes for v2.6.28
@ 2008-11-07 17:13 Robert Richter
  2008-11-07 18:22 ` Ingo Molnar
  2008-11-10  8:05 ` Eric Dumazet
  0 siblings, 2 replies; 10+ messages in thread
From: Robert Richter @ 2008-11-07 17:13 UTC (permalink / raw)
  To: Ingo Molnar; +Cc: LKML

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"

-- 
Advanced Micro Devices, Inc.
Operating System Research Center
email: robert.richter@amd.com


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [git pull] OProfile fixes for v2.6.28
  2008-11-07 17:13 Robert Richter
@ 2008-11-07 18:22 ` Ingo Molnar
  2008-11-10  8:05 ` Eric Dumazet
  1 sibling, 0 replies; 10+ messages in thread
From: Ingo Molnar @ 2008-11-07 18:22 UTC (permalink / raw)
  To: Robert Richter; +Cc: LKML


* Robert Richter <robert.richter@amd.com> wrote:

> 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,

pulled, thanks Robert!

	Ingo

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [git pull] OProfile fixes for v2.6.28
  2008-11-07 17:13 Robert Richter
  2008-11-07 18:22 ` Ingo Molnar
@ 2008-11-10  8:05 ` Eric Dumazet
  2008-11-10  8:43   ` Andi Kleen
  2008-11-17 17:57   ` Robert Richter
  1 sibling, 2 replies; 10+ messages in thread
From: Eric Dumazet @ 2008-11-10  8:05 UTC (permalink / raw)
  To: Robert Richter; +Cc: Ingo Molnar, LKML, Andi Kleen

[-- 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;

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [git pull] OProfile fixes for v2.6.28
  2008-11-10  8:05 ` Eric Dumazet
@ 2008-11-10  8:43   ` Andi Kleen
  2008-11-10  9:01     ` Eric Dumazet
  2008-11-17 17:57   ` Robert Richter
  1 sibling, 1 reply; 10+ messages in thread
From: Andi Kleen @ 2008-11-10  8:43 UTC (permalink / raw)
  To: Eric Dumazet; +Cc: Robert Richter, Ingo Molnar, LKML

Eric Dumazet <dada1@cosmosbay.com> writes:

> 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,

Thanks for tracking this down.

But that still doesn't explain why 2.6.27 fails too?

-Andi

-- 
ak@linux.intel.com

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [git pull] OProfile fixes for v2.6.28
  2008-11-10  8:43   ` Andi Kleen
@ 2008-11-10  9:01     ` Eric Dumazet
  0 siblings, 0 replies; 10+ messages in thread
From: Eric Dumazet @ 2008-11-10  9:01 UTC (permalink / raw)
  To: Andi Kleen; +Cc: Robert Richter, Ingo Molnar, LKML

Andi Kleen a écrit :
> Eric Dumazet <dada1@cosmosbay.com> writes:
> 
>> 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,
> 
> Thanks for tracking this down.
> 
> But that still doesn't explain why 2.6.27 fails too?

No :(

In fact 2.6.24 fails too. Oprofile never worked correctly.

Still investigating...


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [git pull] OProfile fixes for v2.6.28
  2008-11-10  8:05 ` Eric Dumazet
  2008-11-10  8:43   ` Andi Kleen
@ 2008-11-17 17:57   ` Robert Richter
  1 sibling, 0 replies; 10+ messages in thread
From: Robert Richter @ 2008-11-17 17:57 UTC (permalink / raw)
  To: Eric Dumazet; +Cc: Ingo Molnar, LKML, Andi Kleen

On 10.11.08 09:05:37, Eric Dumazet wrote:
> [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>

Applied to oprofile/oprofile-for-tip. Thanks Eric.

-Robert

-- 
Advanced Micro Devices, Inc.
Operating System Research Center
email: robert.richter@amd.com


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [git pull] OProfile fixes for v2.6.28
@ 2008-11-23 11:06 Robert Richter
  2008-11-23 11:18 ` Ingo Molnar
  0 siblings, 1 reply; 10+ messages in thread
From: Robert Richter @ 2008-11-23 11:06 UTC (permalink / raw)
  To: Ingo Molnar; +Cc: LKML

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

There is only one fix:

Eric Dumazet (1):
      oprofile: fix an overflow in ppro code

Thanks,

-Robert

-- 
Advanced Micro Devices, Inc.
Operating System Research Center
email: robert.richter@amd.com


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [git pull] OProfile fixes for v2.6.28
  2008-11-23 11:06 Robert Richter
@ 2008-11-23 11:18 ` Ingo Molnar
  0 siblings, 0 replies; 10+ messages in thread
From: Ingo Molnar @ 2008-11-23 11:18 UTC (permalink / raw)
  To: Robert Richter; +Cc: LKML


* Robert Richter <robert.richter@amd.com> wrote:

> 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
> 
> There is only one fix:
> 
> Eric Dumazet (1):
>       oprofile: fix an overflow in ppro code
> 
> Thanks,

Pulled into tip/x86/urgent, thanks Robert!

	Ingo

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [git pull] OProfile fixes for v2.6.28
@ 2008-12-03 17:16 Robert Richter
  2008-12-03 17:53 ` Ingo Molnar
  0 siblings, 1 reply; 10+ messages in thread
From: Robert Richter @ 2008-12-03 17:16 UTC (permalink / raw)
  To: Ingo Molnar; +Cc: LKML

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

There are these fixes:

Eric Dumazet (1):
      oprofile: fix CPU unplug panic in ppro_stop()

William Cohen (1):
      x86/oprofile: fix Intel cpu family 6 detection

Thanks,

-Robert

-- 
Advanced Micro Devices, Inc.
Operating System Research Center
email: robert.richter@amd.com


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [git pull] OProfile fixes for v2.6.28
  2008-12-03 17:16 [git pull] OProfile fixes for v2.6.28 Robert Richter
@ 2008-12-03 17:53 ` Ingo Molnar
  0 siblings, 0 replies; 10+ messages in thread
From: Ingo Molnar @ 2008-12-03 17:53 UTC (permalink / raw)
  To: Robert Richter; +Cc: LKML


* Robert Richter <robert.richter@amd.com> wrote:

> 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
> 
> There are these fixes:
> 
> Eric Dumazet (1):
>       oprofile: fix CPU unplug panic in ppro_stop()
> 
> William Cohen (1):
>       x86/oprofile: fix Intel cpu family 6 detection

pulled into tip/x86/urgent, thanks Robert!

	Ingo

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2008-12-03 17:54 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-12-03 17:16 [git pull] OProfile fixes for v2.6.28 Robert Richter
2008-12-03 17:53 ` Ingo Molnar
  -- strict thread matches above, loose matches on Subject: below --
2008-11-23 11:06 Robert Richter
2008-11-23 11:18 ` Ingo Molnar
2008-11-07 17:13 Robert Richter
2008-11-07 18:22 ` Ingo Molnar
2008-11-10  8:05 ` Eric Dumazet
2008-11-10  8:43   ` Andi Kleen
2008-11-10  9:01     ` Eric Dumazet
2008-11-17 17:57   ` Robert Richter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox