[LTP] [PATCH v3] syscalls/mmap04: Validate mapping perms in /proc/self/maps

Richard Palethorpe rpalethorpe@suse.de
Thu Nov 23 11:27:12 CET 2023


Hello,

Petr Vorel <pvorel@suse.cz> writes:

> Hi Avinesh,
>
>> Validating the various combinations of prot+flags arguments in mmap()
>> call and parsing the /proc/self/maps file to verifying resulting mapping
>> has the permission bits as requested in mmap() call.
>
> LGTM + you fixed all Cyril's comments.
> Reviewed-by: Petr Vorel <pvorel@suse.cz>
>
> ...
>> +	if (!strcmp(perms, tc->exp_perms))
>> +		tst_res(TPASS, "mapping permissions in /proc matched: %s", perms);
>> +	else
>> +		tst_res(TFAIL, "mapping permissions in /proc mismatched,"
>> +						" expected: %s, found: %s",
>> +						tc->exp_perms, perms);
> Very nit: I wouldn't split the string. IMHO it's better to have easier git
> grepping, than follow 80 line rules. Also checkpatch does not complain
> on this:

+1

>
> 	else
> 		tst_res(TFAIL,
> 			"mapping permissions in /proc mismatched, expected: %s, found: %s",
> 			tc->exp_perms, perms);
>
> This can be fixed before merge.
>
> Kind regards,
> Petr

Please merge :-)

-- 
Thank you,
Richard.


More information about the ltp mailing list