[LTP] tst_test: Add may_kmemleak flag and annotate tests

linuxtestproject.agent@gmail.com linuxtestproject.agent@gmail.com
Wed Jun 24 12:57:28 CEST 2026


Hi Cyril,

On Wed, 24 Jun 2026, Cyril Hrubis wrote:
> tst_test: Add may_kmemleak flag and annotate tests

--- [PATCH 1/13] ---

> This information was so far recoded only in the comment in the cve

Typo: "recoded" should be "recorded".

--- [PATCH 8/13] ---

> lib: tst_test: Move the iterations to struct tst_test

> -		iterations = SAFE_STRTOL(optarg, 0, INT_MAX);
> +		tst_test->iterations = SAFE_STRTOL(optarg, 0, UINT_MAX);

safe_strtol() takes `long min, long max` parameters. On 32-bit
systems where sizeof(long) == 4, passing UINT_MAX (4294967295U) as
a long overflows to -1, making the valid range [0, -1]. This causes
the range check to reject all positive values, breaking the -i
option on 32-bit.

Should this use INT_MAX (as before) or SAFE_STRTOUL?

--- [PATCH 10/13] ---

> The tags should be in the format year-seq. With the CVE prefix our
> tolling is broken e.g. tst_test.c prints wrong URLs.

Typo: "tolling" should be "tooling".

--- [PATCH 12/13] ---

> We also drop the __NR_mmap2 ifdef because the lapi/syscalls.h defines
> the fallbacks to -1 when a syscall is not implemented on an achitecture,

Typo: "achitecture" should be "architecture".

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


More information about the ltp mailing list