Bug 155065

Summary: decode aio system call arguments
Product: [Fedora] Fedora Reporter: Zach Brown <zach.brown>
Component: straceAssignee: Roland McGrath <roland>
Status: CLOSED NEXTRELEASE QA Contact: Brian Brock <bbrock>
Severity: medium Docs Contact:
Priority: medium    
Version: 4Keywords: FutureFeature
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-05-09 08:21:37 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 136451    
Attachments:
Description Flags
decode aio syscall args; against 4.5.11 none

Description Zach Brown 2005-04-15 22:06:55 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.7.2) Gecko/20040803

Description of problem:
The version this bug is being filed on is a total lie.  I based this patch on 4.5.11 from sf and haven't looked in fc packages for aio support.

Anyway, I wanted to see what were in the aio syscalls.  So instead of seeing 

> $ strace ../test-aio 2>&1 | grep '^io_'
> io_setup(0x1, 0x7fbffff478)             = 0
> io_submit(0x2a95557000, 0x2, 0x7fbffff3e0) = 2
> io_cancel(0x2a95557000, 0x7fbffff430, 0x7fbffff380) = -1 EAGAIN (Resource temporarily unavailable)
> io_getevents(0x2a95557000, 0x1, 0x2, 0x7fbffff3a0, 0x7fbffff370) = 2
> io_destroy(0x2a95557000)                = 0

I wanted

> $ ./strace ../test-aio 2>&1 | grep '^io_'
> io_setup(1, {182894030848})             = 0
> io_submit(182894030848, 2, {{0x123, 0, 0, 0, 0}, {0x456, 0, 0, 0, 0}}) = 2
> io_cancel(182894030848, {0x123, 0, 0, 0, 0}, {...}) = -1 EAGAIN (Resource temporarily unavailable)
> io_getevents(182894030848, 1, 2, {{0x123, 0x7fbffff430, -22, 0}, {0x456, 0x7fbffff3f0, -22, 0}}, {123, 456}) = 2
> io_destroy(182894030848)                = 0

so I whipped up a patch that adds support.  It might be fragile and bad as this is my first time diving into strace.  So I'm hoping that I can get feedback and if it's suitable that it can make its way upstream and into distros.

> $ gendiff . .decode-aio | diffstat
>  config.h.in                |    3
>  configure.ac               |    2
>  desc.c                     |  160 +++++++++++++++++++++++++++++++++++++++++++++
>  linux/alpha/syscallent.h   |   10 +-
>  linux/hppa/syscallent.h    |   10 +-
>  linux/ia64/syscallent.h    |   10 +-
>  linux/mips/syscallent.h    |   10 +-
>  linux/powerpc/syscallent.h |   10 +-
>  linux/s390/syscallent.h    |   10 +-
>  linux/s390x/syscallent.h   |   10 +-
>  linux/syscall.h            |    1
>  linux/x86_64/syscallent.h  |   10 +-
>  12 files changed, 205 insertions(+), 41 deletions(-)

I'll attach the patch once the bug is filed.

DEAR BUGZILLA, IT SURE WOULD BE COOL IF I COULD ATTACH A FILE AT BUG CREATION TIME.  YOURS, HOOP-JUMPER.

Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
run strace on an app with aio syscalls, you crap.

Additional info:

Comment 1 Zach Brown 2005-04-15 22:08:28 UTC
Created attachment 113260 [details]
decode aio syscall args; against 4.5.11

Comment 2 Roland McGrath 2005-05-09 08:21:37 UTC
I put the patch in upstream.