linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Petr Vorel <pvorel@suse.cz>
To: Jan Stancek <jstancek@redhat.com>
Cc: ltp@lists.linux.it, Christian Brauner <brauner@kernel.org>,
	linux-kernel@vger.kernel.org,
	Linux Memory Management List <linux-mm@kvack.org>,
	kernel test robot <oliver.sang@intel.com>
Subject: Re: [LTP] [PATCH] syscalls/execve04, creat07: skip for kernels 6.11 and later
Date: Mon, 12 Aug 2024 14:02:21 +0200	[thread overview]
Message-ID: <20240812120221.GA195572@pevik> (raw)
In-Reply-To: <9a9b743304c2b6ad1a045f26d33304a3350cdf4c.1723458583.git.jstancek@redhat.com>

Hi Jan,

> The behaviour is allowed since commit:
>   2a010c412853 ("fs: don't block i_writecount during exec")
> that landed in 6.11-rc1.

Thanks for noticing and fixing this!

It was reported some time ago:
https://lore.kernel.org/all/202406141431.2b72ca61-oliver.sang@intel.com/
https://lore.kernel.org/ltp/202407162117.7730986d-oliver.sang@intel.com/

Reviewed-by: Petr Vorel <pvorel@suse.cz>

Kind regards,
Petr

> Signed-off-by: Jan Stancek <jstancek@redhat.com>
> ---
>  testcases/kernel/syscalls/creat/creat07.c   | 10 ++++++++++
>  testcases/kernel/syscalls/execve/execve04.c | 10 ++++++++++
>  2 files changed, 20 insertions(+)

> diff --git a/testcases/kernel/syscalls/creat/creat07.c b/testcases/kernel/syscalls/creat/creat07.c
> index 7bd32ab4d328..f157e1a8fbb2 100644
> --- a/testcases/kernel/syscalls/creat/creat07.c
> +++ b/testcases/kernel/syscalls/creat/creat07.c
> @@ -47,7 +47,17 @@ static void verify_creat(void)
>  	SAFE_WAITPID(pid, NULL, 0);
>  }

> +static void setup(void)
> +{
> +	if ((tst_kvercmp(6, 11, 0)) >= 0) {
> +		tst_brk(TCONF, "Skipping test, write to executed file is "
> +			"allowed since 6.11-rc1.\n"
> +			"2a010c412853 (\"fs: don't block i_writecount during exec\")");
> +	}
> +}
> +
>  static struct tst_test test = {
> +	.setup = setup,
>  	.test_all = verify_creat,
>  	.needs_checkpoints = 1,
>  	.forks_child = 1,
> diff --git a/testcases/kernel/syscalls/execve/execve04.c b/testcases/kernel/syscalls/execve/execve04.c
> index 3bac642e5412..7bbfece85906 100644
> --- a/testcases/kernel/syscalls/execve/execve04.c
> +++ b/testcases/kernel/syscalls/execve/execve04.c
> @@ -65,7 +65,17 @@ static void do_child(void)
>  	exit(0);
>  }

> +static void setup(void)
> +{
> +	if ((tst_kvercmp(6, 11, 0)) >= 0) {
> +		tst_brk(TCONF, "Skipping test, write to executed file is "
> +			"allowed since 6.11-rc1.\n"
> +			"2a010c412853 (\"fs: don't block i_writecount during exec\")");
> +	}
> +}
> +
>  static struct tst_test test = {
> +	.setup = setup,
>  	.test_all = verify_execve,
>  	.forks_child = 1,
>  	.child_needs_reinit = 1,


       reply	other threads:[~2024-08-12 12:02 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <9a9b743304c2b6ad1a045f26d33304a3350cdf4c.1723458583.git.jstancek@redhat.com>
2024-08-12 12:02 ` Petr Vorel [this message]
2024-08-12 13:31   ` 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=20240812120221.GA195572@pevik \
    --to=pvorel@suse.cz \
    --cc=brauner@kernel.org \
    --cc=jstancek@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=ltp@lists.linux.it \
    --cc=oliver.sang@intel.com \
    /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