Data type for aio_buf under X32?
From: Jeffrey Walton <hidden>
Date: 2016-08-11 17:55:29
From: Jeffrey Walton <hidden>
Date: 2016-08-11 17:55:29
Hi Everyone, My apologies for this question and my confusion. When interfacing with the kernel crypto through AF_ALG, what is the type of 'aio_buf' under X32? I know is X32 uses ILP32 data model, so integers/longs/pointers are 32-bits (cf., http://www.unix.org/version2/whatsnew/lp64_wp.html). I believe Glibc uses a 'void*' for 'aio_buf' (cf., http://man7.org/linux/man-pages/man7/aio.7.html). But I believe the kernel's 'aio_buf' is a u64 under X32. I'm asking due a failure under X32 because GCC sign extends the pointer value when upsizing to 64-bits (cf., GCC manual 4.7 Arrays and Pointers, http://gcc.gnu.org/onlinedocs/gcc/Arrays-and-pointers-implementation.html). Thanks in advance. Jeff