This is the mail archive of the mailing list for the frysk project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: System call number cached with help from SyscallObserver

>>>>> "Yao" == Yao Qi <> writes:

Yao> 1) Shall we create two objects of SyscallEventInfo, or extend two new
Yao> classes from SyscallEventInfo?

Good question.

Yao> 2) Supposing there are two objects, one is about enter a syscall and
Yao> another is about exit a syscall.  Does object about enter syscall
Yao> cache the system call number? (I think yes)  If object about enter a
Yao> syscall cache the syscall number, how could it pass this system call
Yao> number to the object about exit a system call?

Another good question.

One idea would be to have two different interfaces, one for entering a
syscall and one for exiting.  Then there would be a single class which
implements both.  This would allow for identity to be well handled,
and would prevent users from directly calling methods which were

This seems a little clunky though.  Perhaps some other solution is

One thing to consider is that if an observer has to track the
relationship between the enter and exit event objects, then there
needs to be some relatively simple way to track syscalls which do not
have an exit event (e.g., a successful exec) -- otherwise bookkeeping
on the observer side could be difficult or impossible.

Another way to go is to have one class, with a special "cache the
arguments" request, and have getArgument throw an exception if the
cache request call was not made at syscall enter time.  One way that
this is nice is that if multiple observers need a cache, the lookups
will only be done a single time.

I'm just throwing out ideas here.  I don't have a strong feeling for
what the best approach is.  I just want to avoid situations where
writing observers is overly hard or expensive, or situations where
"obvious" uses of the API randomly fail, as is now the case.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]