Preparing for the next release: call for testing
Gabriel Laskar
gabriel at lse.epita.fr
Wed Mar 4 07:31:13 UTC 2015
On Wed, 4 Mar 2015 02:44:19 +0300
"Dmitry V. Levin" <ldv at altlinux.org> wrote:
> On Tue, Mar 03, 2015 at 07:23:28PM +0100, Gabriel Laskar wrote:
> > There is still an issue with ioctl request names when using strace
> > on Binder calls. Some binder calls have 2 possible sizes, depending
> > of being with the 32-bit api or the 64-bit one.
> >
> > In <linux/android/binder.h>, there is a #ifdef BINDER_IPC_32BIT that
> > control the size of pointer values in the structures.
> >
> > In 64bit mode, we have only :
> >
> > ioctl(-1, BC_REQUEST_DEATH_NOTIFICATION, 0);
> > ioctl(-1, BC_CLEAR_DEATH_NOTIFICATION, 0);
> >
> > that respond :
> >
> > ioctl(-1, _IOC(_IOC_WRITE, 0x63, 0x0e, 0x10), 0) = -1 EBADF (Bad
> > file descriptor) ioctl(-1, _IOC(_IOC_WRITE, 0x63, 0x0f, 0x10), 0) =
> > -1 EBADF (Bad file descriptor)
> >
> > and when asking for 32bit binder (BINDER_IPC_32BIT), lots of ioctls
> > are failing :
>
> Unfortunately, <linux/android/binder.h> doesn't say which of binder
> ioctls are BINDER_IPC_32BIT. How could one automatically distinguish
> them?
For BC_REQUEST_DEATH_NOTIFICATION and BC_CLEAR_DEATH_NOTIFICATION, it
is just that the ioctl is defined on 2 lines.
As for which binder ioctl are configured by BINDER_IPC_32BIT, it is all
the ioctl that take an argument that depend on it, so:
* struct binder_write_read
* struct binder_transaction_data
* binder_uintptr_t
* struct binder_ptr_cookie
* struct binder_handle_cookie
that is :
* BINDER_WRITE_READ
* BR_TRANSACTION
* BR_REPLY
* BR_INCREFS
* BR_ACQUIRE
* BR_RELEASE
* BR_DECREFS
* BR_ATTEMPT_ACQUIRE
* BR_DEAD_BINDER
* BR_CLEAR_DEATH_NOTIFICATION_DONE
* BC_TRANSACTION
* BC_REPLY
* BC_INCREFS_DONE
* BC_ACQUIRE_DONE
* BC_REQUEST_DEATH_NOTIFICATION
* BC_CLEAR_DEATH_NOTIFICATION
* BC_DEAD_BINDER_DONE
--
Gabriel Laskar
More information about the Strace-devel
mailing list