Author ukl
Recipients cfi, serhiy.storchaka, ukl, vstinner
Date 2017-06-19.08:23:57
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1497860638.29.0.110698011176.issue30665@psf.upfronthosting.co.za>
In-reply-to
Content
So the only option to fix this is to determine the type of arg from the request parameter? I failed to find the implementation of ioctl for linux in glibc, the best I found is one that only seems to be used on powerpc[1] which seems to assume that the third argument is a pointer. The Linux kernel prototype takes an unsigned long[2] and encodes the size of the data pointed to in the request using _IOC[3]. On hurd there are different macros to determine the type. I'm not fluent in *BSD and Solaris (and other operating systems), so I cannot add specifics for them. I cannot even say which OS that runs Python can run in 64 bit BE mode.

[1] https://sourceware.org/git/?p=glibc.git;a=blob;f=sysdeps/unix/sysv/linux/powerpc/ioctl.c;h=e2e3d3357f9f5ee9ffe5e9f0588ebae9976c0dfd;hb=HEAD
[2] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/fs/ioctl.c?h=v4.12-rc5#n691
[3] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/include/uapi/asm-generic/ioctl.h
History
Date User Action Args
2017-06-19 08:23:58uklsetrecipients: + ukl, vstinner, serhiy.storchaka, cfi
2017-06-19 08:23:58uklsetmessageid: <1497860638.29.0.110698011176.issue30665@psf.upfronthosting.co.za>
2017-06-19 08:23:58ukllinkissue30665 messages
2017-06-19 08:23:57uklcreate