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" <l...@altlinux.org>
> To: strace-devel@lists.sourceforge.net
> Subject: Re: [PATCH 3/4] Introduce syscall fault injection feature
> Message-ID: <20160811143251.ga30...@altlinux.org>
> In-Reply-To: <20160811141741.z3f454wrcpszcdqc@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+...@naam.me>
http://naam.me/

------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are 
consuming the most bandwidth. Provides multi-vendor support for NetFlow, 
J-Flow, sFlow and other flows. Make informed decisions using capacity 
planning reports. http://sdm.link/zohodev2dev
_______________________________________________
Strace-devel mailing list
Strace-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/strace-devel

Reply via email to