[PATCH 3/4] Introduce syscall fault injection feature
Dmitry V. Levin
ldv at altlinux.org
Thu Aug 11 14:57:27 UTC 2016
On Thu, Aug 11, 2016 at 04:40:31PM +0200, Nahim El Atmani wrote:
[...]
> > > The thing is this time I need a copy of the global sparse array by tcb. I was
>
> > I don't see why one may need a sparse array by tcb.
>
> > There has to be a global sparse array that fully describes fault injection
> > settings. As the decision whether/how each particular syscall is going to be
> > fault-injected is made on entering syscall, the only fault injection
> > related state that has to be stored in each tcb is the information whether
> > this particular syscall is being fault-injected, and the error code that has
> > to be injected on exiting syscall.
>
> Yes, plus the accounting variable 'cnt' in the struct fault_opts to know wether
> we have to discard the syscall this time or not. If we don't bring this one we
> get the the race condition I just mentionned in my previous email. So I can
> either create a subset of the struct fault_opts or, simply shadow it since
> the « memory cost is negligible ». What do you think?
There is no need to keep fault injection accounting in struct tcb.
The decision whether this particular syscall has to be fault-injected this
time or not is made on entering syscall, right? Every time the decision
is made, global accounting is updated if needed.
--
ldv
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.strace.io/pipermail/strace-devel/attachments/20160811/1948a89e/attachment.bin>
More information about the Strace-devel
mailing list