Skip to contentSkip to conversation

S390-HWBKPT v3: Modify ptrace to use Hardware Breakpoint interfaces.

PATCH Mahesh Jagannath Salgaonkar 2 participants 3 messages Jan 21, 2010 – Jan 25, 2010 3 messages not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

#3 lore raw
Quoted 21 lines · Heiko Carstens
Quoted 2 lines · Mahesh Salgaonkar

Modify the ptrace code to use the hardware breakpoint interfaces for user-space

I didn't look too deep into this one. So actually only one trivial comment:

Quoted 15 lines
include/linux/perf_event.h +4 -0
index 9a1d276..cb74f24 100644
@@ -215,7 +215,11 @@ struct perf_event_attr {
 
 	__u64			bp_addr;
 	__u32			bp_type;
+#ifdef __s390x__
+	__u64			bp_len;
+#else
 	__u32			bp_len;
+#endif
 };
 
Quoted 6 lines

include/linux/perf_event.h struct perf_event_attr { · line 225

Quoted 2 lines
include/linux/perf_event.h +0 -0
 /*

Any chance to change common code to change that to an __u64 (unconditional) or at least an unsigned long?
I'd hate to see an ifdef __s390x__ in common code.

Can we have the above common code to change the type of 'bp_len' to __u64? In s390x arch watch point length can be upto 2^64.

#4 lore raw
In reply to a message not in the archive
Quoted 21 lines · Heiko Carstens
Quoted 2 lines · Mahesh Salgaonkar

Modify the ptrace code to use the hardware breakpoint interfaces for user-space

I didn't look too deep into this one. So actually only one trivial comment:

Quoted 15 lines
include/linux/perf_event.h +4 -0
index 9a1d276..cb74f24 100644
@@ -215,7 +215,11 @@ struct perf_event_attr {
 
 	__u64			bp_addr;
 	__u32			bp_type;
+#ifdef __s390x__
+	__u64			bp_len;
+#else
 	__u32			bp_len;
+#endif
 };
 
Quoted 6 lines

include/linux/perf_event.h struct perf_event_attr { · line 225

Quoted 2 lines
include/linux/perf_event.h +0 -0
 /*

Any chance to change common code to change that to an __u64 (unconditional) or at least an unsigned long?
I'd hate to see an ifdef __s390x__ in common code.

Can we have the above common code to change the type of 'bp_len' to __u64? In s390x arch watch point length can be upto 2^64.

#5 lore raw
Quoted 29 lines · Mahesh Jagannath Salgaonkar
Quoted 21 lines · Heiko Carstens
Quoted 2 lines · Mahesh Salgaonkar

Modify the ptrace code to use the hardware breakpoint interfaces for user-space

I didn't look too deep into this one. So actually only one trivial comment:

Quoted 15 lines
include/linux/perf_event.h +4 -0
index 9a1d276..cb74f24 100644
@@ -215,7 +215,11 @@ struct perf_event_attr {
 
 	__u64			bp_addr;
 	__u32			bp_type;
+#ifdef __s390x__
+	__u64			bp_len;
+#else
 	__u32			bp_len;
+#endif
 };
 
Quoted 6 lines

include/linux/perf_event.h struct perf_event_attr { · line 225

Quoted 2 lines
include/linux/perf_event.h +0 -0
 /*

Any chance to change common code to change that to an __u64 (unconditional) or at least an unsigned long?
I'd hate to see an ifdef __s390x__ in common code.

Quoted 2 lines

Can we have the above common code to change the type of 'bp_len' to __u64? In s390x arch watch point length can be upto 2^64.

Yep, please send a patch to make it a generic u64 if an arch needs it. We really need a fixed cross arch size for this structure.

Thanks!