[LTP] [PATCH v3] syscalls/mmap04: Validate mapping perms in /proc/self/maps
Petr Vorel
pvorel@suse.cz
Tue Nov 28 08:57:32 CET 2023
Hi Avinesh,
> 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:
> else
> tst_res(TFAIL,
> "mapping permissions in /proc mismatched, expected: %s, found: %s",
> tc->exp_perms, perms);
> This can be fixed before merge.
Merged with this change + changed commit subject (rewrite to new API is
important info).
Thank you!
Kind regards,
Petr
> Kind regards,
> Petr
More information about the ltp
mailing list