[PATCH 3/4] Introduce syscall fault injection feature
Nahim El Atmani
nahim+dev at naam.me
Thu Aug 11 14:40:31 UTC 2016
On Thu, 11 Aug 2016 17:32:51 +0300, Dmitry V. Levin wrote:
> Date: Thu, 11 Aug 2016 17:32:51 +0300
> From: "Dmitry V. Levin" <ldv at altlinux.org>
> To: strace-devel at lists.sourceforge.net
> Subject: Re: [PATCH 3/4] Introduce syscall fault injection feature
> Message-ID: <20160811143251.GA30503 at altlinux.org>
> In-Reply-To: <20160811141741.z3f454wrcpszcdqc at Bane>
> List-Id: strace development list <strace-devel.lists.sourceforge.net>
>
> > 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?
--
Nahim El Atmani <nahim+dev at naam.me>
http://naam.me/
More information about the Strace-devel
mailing list