aboutsummaryrefslogtreecommitdiff
path: root/include/linux/cn_proc.h
diff options
context:
space:
mode:
authorChandra Seetharaman <sekharan@us.ibm.com>2006-07-30 03:03:04 -0700
committerLinus Torvalds <torvalds@g5.osdl.org>2006-07-31 13:28:36 -0700
commit822cfbff2ef49a08d1b9618d50f81b475d4f936c (patch)
tree9b8bd37b3940410a13d0c439cc585d5aea1147ac /include/linux/cn_proc.h
parent2ccb48ebb4de139eef4fcefd5f2bb823cb0d81b9 (diff)
[PATCH] Process Events: Fix biarch compatibility issue. use __u64 timestamp
Events sent by Process Events Connector from a 64-bit kernel are not binary compatible with a 32-bit userspace program because the "timestamp" field (struct timespec) is not arch independent. This affects the fields that follow "timestamp" as they will be be off by 8 bytes. This is a problem for 32-bit userspace programs running with 64-bit kernels on ppc64, s390, x86-64.. any "biarch" system. Matt had submitted a different solution to lkml as an RFC earlier. We have since switched to a solution recommended by Evgeniy Polyakov. This patch fixes the problem by changing the timestamp to be a __u64, which stores the number of nanoseconds. Tested on a x86_64 system with both 32 bit application and 64 bit application and on a i386 system. Signed-off-by: Chandra Seetharaman <sekharan@us.ibm.com> Signed-off-by: Matt Helsley <matthltc@us.ibm.com> Cc: Evgeniy Polyakov <johnpol@2ka.mipt.ru> Cc: Guillaume Thouvenin <guillaume.thouvenin@bull.net> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/linux/cn_proc.h')
-rw-r--r--include/linux/cn_proc.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/linux/cn_proc.h b/include/linux/cn_proc.h
index dbb7769009b..1c86d65bc4b 100644
--- a/include/linux/cn_proc.h
+++ b/include/linux/cn_proc.h
@@ -57,7 +57,8 @@ struct proc_event {
PROC_EVENT_EXIT = 0x80000000
} what;
__u32 cpu;
- struct timespec timestamp;
+ __u64 __attribute__((aligned(8))) timestamp_ns;
+ /* Number of nano seconds since system boot */
union { /* must be last field of proc_event struct */
struct {
__u32 err;