ABI with support for compat 32/64 bits
authorJulien Desfossez <jdesfossez@efficios.com>
Mon, 1 Oct 2012 15:59:19 +0000 (11:59 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mon, 1 Oct 2012 16:00:07 +0000 (12:00 -0400)
commit6dccd6c113eb0431a145b92abaf869b85ef7a92f
tree52ac1560a599694048fc6deab64fa067ddf334c6
parentf9e4e1b9f3f497eeba591ac39e7da0a8e41035be
ABI with support for compat 32/64 bits

The current ABI does not work for compat 32/64 bits.
This patch moves the current ABI as old-abi and provides a new ABI in
which all the structures exchanged between user and kernel-space are
packed. Also this new ABI moves the "int overwrite" member of the
struct lttng_kernel_channel to remove the alignment added by the
compiler.

A patch for lttng-tools has been developed in parallel to this one to
support the new ABI. These 2 patches have been tested in all
possible configurations (applied or not) on 64-bit and 32-bit kernels
(with CONFIG_COMPAT) and a user-space in 32 and 64-bit.

Here are the results of the tests :
k 64 compat     | u 32 compat     | OK
k 64 compat     | u 64 compat     | OK
k 64 compat     | u 32 non-compat | KO
k 64 compat     | u 64 non-compat | OK

k 64 non-compat | u 64 compat     | OK
k 64 non-compat | u 32 compat     | KO
k 64 non-compat | u 64 non-compat | OK
k 64 non-compat | u 32 non-compat | KO

k 32 compat     | u compat        | OK
k 32 compat     | u non-compat    | OK

k 32 non-compat | u compat        | OK
k 32 non-compat | u non-compat    | OK

The results are as expected :
- on 32-bit user-space and kernel, every configuration works.
- on 64-bit user-space and kernel, every configuration works.
- with 32-bit user-space on a 64-bit kernel the only configuration
  where it works is when the compat patch is applied everywhere.

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
lttng-abi-old.h [new file with mode: 0644]
lttng-abi.c
lttng-abi.h
lttng-events.c
lttng-events.h
This page took 0.026809 seconds and 4 git commands to generate.