public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Petr Vorel <pvorel@suse.cz>
To: Avinesh Kumar <akumar@suse.de>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH v3] syscalls/mmap04: Validate mapping perms in /proc/self/maps
Date: Mon, 9 Oct 2023 10:01:31 +0200	[thread overview]
Message-ID: <20231009080131.GA370124@pevik> (raw)
In-Reply-To: <20230921054821.12855-1-akumar@suse.de>

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.

Kind regards,
Petr

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

  reply	other threads:[~2023-10-09  8:01 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-21  5:48 [LTP] [PATCH v3] syscalls/mmap04: Validate mapping perms in /proc/self/maps Avinesh Kumar
2023-10-09  8:01 ` Petr Vorel [this message]
2023-11-23 10:27   ` Richard Palethorpe
2023-11-28  7:57   ` Petr Vorel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20231009080131.GA370124@pevik \
    --to=pvorel@suse.cz \
    --cc=akumar@suse.de \
    --cc=ltp@lists.linux.it \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox