This service will be undergoing maintenance at 00:00 UTC, 2016-08-01. It is expected to last about 1 hours
Bug 902788 - RFE: strace should interpret also the direction and size fields for the ioctl() syscall
RFE: strace should interpret also the direction and size fields for the ioctl...
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: strace (Show other bugs)
rawhide
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Dmitry V. Levin
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-01-22 06:51 EST by Dan Horák
Modified: 2015-03-13 13:23 EDT (History)
3 users (show)

See Also:
Fixed In Version: strace-4.10-1.fc22
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-03-13 12:56:20 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Dan Horák 2013-01-22 06:51:26 EST
My understanding is that the strace tool now interprets only the type and number sub-fields (lower 8+8 bits) of request passed to the ioctl() syscall and convert this value to the textual representation. The Linux kernel uses 2 additional fields (direction and size) encoded in the request, but their exact bit sizes depend on platform.

see this output of a test in Ruby test-suite run on Fedora/ppc64
...
open("/dev/urandom", O_RDONLY)          = 5
fstat(5, {st_mode=S_IFCHR|0666, st_rdev=makedev(1, 9), ...}) = 0
fstat(5, {st_mode=S_IFCHR|0666, st_rdev=makedev(1, 9), ...}) = 0
ioctl(5, TCGETS, 0x3ffffb378ad0)        = -1 EINVAL (Invalid argument)
ioctl(5, RNDGETENTCNT, 0x1001000bd40)   = -1 EINVAL (Invalid argument)
...

The problem here is that the test uses 0x80045200 hardcoded value for the request which valid on x86 and few other arches, while on ppc/ppc64 it should be 0x40045200, the bit sizes differs between x86 (14+2 bits) and ppc (13+3 bits). I think that when strace would interpret also the size and direction fields it would help debugging such problems.

Please see include/uapi/asm-generic/ioctl.h and arch/powerpc/include/uapi/asm/ioctl.h kernel headers for the details about the encoding.
Comment 1 Fedora End Of Life 2013-12-21 05:41:35 EST
This message is a reminder that Fedora 18 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 18. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '18'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 18's end of life.

Thank you for reporting this issue and we are sorry that we may not be 
able to fix it before Fedora 18 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior to Fedora 18's end of life.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.
Comment 2 Dmitry V. Levin 2015-02-08 19:48:12 EST
Full 32-bit ioctl command decoding was implemented in commit v4.9-222-gdf7aa2b:
http://sourceforge.net/p/strace/code/ci/df7aa2b19e6f69c19fbe09180bf1ec4fb52e2615
Comment 3 Fedora Update System 2015-03-06 12:29:39 EST
strace-4.10-1.fc22 has been submitted as an update for Fedora 22.
https://admin.fedoraproject.org/updates/strace-4.10-1.fc22
Comment 4 Fedora Update System 2015-03-06 12:59:46 EST
strace-4.10-1.fc21 has been submitted as an update for Fedora 21.
https://admin.fedoraproject.org/updates/strace-4.10-1.fc21
Comment 5 Fedora Update System 2015-03-06 13:24:56 EST
strace-4.10-1.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/strace-4.10-1.fc20
Comment 6 Fedora Update System 2015-03-09 04:20:06 EDT
Package strace-4.10-1.fc21:
* should fix your issue,
* was pushed to the Fedora 21 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing strace-4.10-1.fc21'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2015-3365/strace-4.10-1.fc21
then log in and leave karma (feedback).
Comment 7 Fedora Update System 2015-03-13 12:56:20 EDT
strace-4.10-1.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 8 Fedora Update System 2015-03-13 13:12:36 EDT
strace-4.10-1.fc21 has been pushed to the Fedora 21 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 9 Fedora Update System 2015-03-13 13:23:13 EDT
strace-4.10-1.fc22 has been pushed to the Fedora 22 stable repository.  If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.