[PATCH v9 03/15] Introduce new filtering architecture

Nikolay Marchuk marchuk.nikolay.a at gmail.com
Fri Aug 25 06:08:32 UTC 2017



On 25.08.2017 07:41, Dmitry V. Levin wrote:
> On Thu, Aug 24, 2017 at 06:19:41PM +0700, Nikolay Marchuk wrote:
>> This change introduces new filtering architecture primitives: filter,
>> filter_action and bool_expression. Filtering is now done after decoding of
>> syscall and tcp->qual_flg stores filtering results.
> This change is still to big to review.  Here are just two issues:
>
> [...]
>> +void
>> +apply_trace(struct tcb *tcp, void *_priv_data)
> Please do not introduce identifiers with names starting with underscore.
>
> [...]
>> --- a/strace.c
>> +++ b/strace.c
>> @@ -771,7 +771,8 @@ droptcb(struct tcb *tcp)
>>  
>>  	int p;
>>  	for (p = 0; p < SUPPORTED_PERSONALITIES; ++p)
>> -		free(tcp->inject_vec[p]);
>> +		if (tcp->inject_vec[p])
>> +			free(tcp->inject_vec[p]);
>>  
>>  	free_tcb_priv_data(tcp);
>>  
> What is this?
tcp->inject_vec for a specific personality is initialized only if syscall from this personality was injected,
so inject_vec should be checked before freeing.
>
>
>
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>
>
> _______________________________________________
> Strace-devel mailing list
> Strace-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/strace-devel


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: OpenPGP digital signature
URL: <http://lists.strace.io/pipermail/strace-devel/attachments/20170825/76e0b456/attachment.bin>


More information about the Strace-devel mailing list