From: linuxtestproject.agent@gmail.com
To: Jan Polensky <japo@linux.ibm.com>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] thp04: Fix PTRACE mode for CONFIG_PROC_MEM_FORCE_PTRACE=y
Date: Wed, 1 Jul 2026 12:28:26 +0000 [thread overview]
Message-ID: <20260701122826.4115-1-linuxtestproject.agent@gmail.com> (raw)
In-Reply-To: <20260701111242.97520-1-japo@linux.ibm.com>
Hi Jan,
On Wed, Jul 1, 2026 at 13:12:38 +0200, Jan Polensky wrote:
> thp04: Fix PTRACE mode for CONFIG_PROC_MEM_FORCE_PTRACE=y
> -#include "lapi/mmap.h"
> +#include "tst_checkpoint.h"
> #include "tst_fuzzy_sync.h"
> +#include "tst_kconfig.h"
> +#include "tst_test.h"
The patch drops lapi/mmap.h but the test still uses MADV_HUGEPAGE (in
alloc_zero_page) and MADV_DONTNEED (multiple call sites). The fallback
defines for these constants live in lapi/mmap.h. On toolchains where
<sys/mman.h> does not provide them, this will fail to compile.
> +static void run_proc_mem_ptrace_race(void)
> +{
> + /* After 1000 iterations, let tracee exit cleanly */
> + SAFE_PTRACE(PTRACE_CONT, tracee_pid, NULL, NULL);
> + SAFE_WAITPID(tracee_pid, &status, 0);
After run_proc_mem_ptrace_race() returns, the tracee has been reaped.
If the framework re-invokes run() (e.g. via -i 2), the next call to
SAFE_OPEN("/proc/<pid>/mem") will hit ENOENT and abort with TBROK.
The PROC_MEM_ALWAYS path survives re-invocation because
tst_fzsync_run_a() returns false immediately when runtime expires. The
ptrace path could either re-spawn the tracee in run(), or guard with
an early return when tracee_pid is no longer alive.
Verdict - Needs revision
---
Note:
The agent can sometimes produce false positives although often its
findings are genuine. If you find issues with the review, please
comment this email or ignore the suggestions.
Regards,
LTP AI Reviewer
--
Mailing list info: https://lists.linux.it/listinfo/ltp
next prev parent reply other threads:[~2026-07-01 12:28 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-01 11:12 [LTP] [PATCH v3] thp04: Fix PTRACE mode for CONFIG_PROC_MEM_FORCE_PTRACE=y Jan Polensky
2026-07-01 12:28 ` linuxtestproject.agent [this message]
2026-07-02 8:58 ` [LTP] " Andrea Cervesato via ltp
-- strict thread matches above, loose matches on Subject: below --
2026-06-12 17:17 [LTP] [PATCH v2 1/1] " Jan Polensky
2026-06-12 19:21 ` [LTP] " linuxtestproject.agent
2026-07-01 10:27 ` Jan Polensky
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=20260701122826.4115-1-linuxtestproject.agent@gmail.com \
--to=linuxtestproject.agent@gmail.com \
--cc=japo@linux.ibm.com \
--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