From: Julien Desfossez Date: Tue, 2 Oct 2012 19:03:26 +0000 (-0400) Subject: ABI with support for compat 32/64 bits X-Git-Tag: v2.1.0-rc5~25 X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=commitdiff_plain;h=4dbc372b53ef1ac713497164e7a8b92100db7ae2;hp=4dbc372b53ef1ac713497164e7a8b92100db7ae2 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-modules 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. Acked-by: Mathieu Desnoyers Signed-off-by: Julien Desfossez Signed-off-by: David Goulet ---