On 2011-02-18, Grant Edwards <[email protected]> wrote:
> On 2011-02-18, Grant Edwards <[email protected]> wrote:
>
>>> I'm not sure that we can ignore all cases where syscalls return file
>>> descriptor as their return value.
>>
>> That wasn't my intent, and I don't think that's what the code does.
>>
>> I meant to ignore system calls who returned file descriptors (and
>> therefore had the TRACE_DESC flag set), but didn't have arguments that
>> were file paths or open file descriptors.
>
> Doh! I just realized that I completely misunderstood that.
>
> You weren't talking about sys_calls returning descriptors that were
> being explicity ignored like fdtimer_create. You were refering to fd
> return values from syscalls like open() that were being ignore.
[...]
> I agree that the fd's returned from open() and creat() should be
> checked for a match.
However, I now see that checking the file descriptors returned by a
system call is problematic. When the check is done in
trace_syscall_exiting(), the syscall may have already been ignored
(not printed) by trace_syscall_entering(). Deciding to print just the
return value of the syscall isn't very useful.
Converting paths specified by -P to canonical form and checking
canonicalized path arguments might be a better way to go. There are
still probably cases it will miss, but I can't think of a better
option.
--
Grant Edwards grant.b.edwards Yow! Is this an out-take
at from the "BRADY BUNCH"?
gmail.com
------------------------------------------------------------------------------
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
_______________________________________________
Strace-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/strace-devel