mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] perf: fix perf_event_attr layout
@ 2009-12-15 18:36 Peter Zijlstra
  2009-12-15 18:43 ` [PATCH] perf: fix perf_event_attr layout -v2 Peter Zijlstra
  0 siblings, 1 reply; 3+ messages in thread
From: Peter Zijlstra @ 2009-12-15 18:36 UTC (permalink / raw)
  To: Ingo Molnar; +Cc: Frédéric Weisbecker, Paul Mackerras, lkml

[now with lkml added too]

The miss-alignment of bp_addr created a 32bit hole, causing different
structure packings on 32 and 64 bit machines.

Fix that by moving __reserve_2 into that hole.

Further, remove the useless struct and redundant __bp_reserve muck.

Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
---
 include/linux/perf_event.h |   12 +++---------
 1 file changed, 3 insertions(+), 9 deletions(-)

Index: linux-2.6/include/linux/perf_event.h
===================================================================
--- linux-2.6.orig/include/linux/perf_event.h
+++ linux-2.6/include/linux/perf_event.h
@@ -211,17 +211,11 @@ struct perf_event_attr {
 		__u32		wakeup_watermark; /* bytes before wakeup   */
 	};
 
-	struct { /* Hardware breakpoint info */
-		__u64		bp_addr;
-		__u32		bp_type;
-		__u32		bp_len;
-		__u64		__bp_reserved_1;
-		__u64		__bp_reserved_2;
-	};
-
 	__u32			__reserved_2;
 
-	__u64			__reserved_3;
+	__u64			bp_addr;
+	__u32			bp_type;
+	__u32			bp_len;
 };
 
 /*




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

end of thread, other threads:[~2009-12-15 19:25 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-12-15 18:36 [PATCH] perf: fix perf_event_attr layout Peter Zijlstra
2009-12-15 18:43 ` [PATCH] perf: fix perf_event_attr layout -v2 Peter Zijlstra
2009-12-15 19:24   ` [tip:perf/urgent] perf_events: Fix perf_event_attr layout tip-bot for Peter Zijlstra

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

Powered by JetHome