[LTP] sched_setattr01: Convert to new API

linuxtestproject.agent@gmail.com linuxtestproject.agent@gmail.com
Thu Sep 3 18:04:11 CEST 2026


Hi Andrea,

On Thu, Sep 3, 2026, Andrea Cervesato wrote:
> sched_setattr01: Convert to new API

--- [PATCH 4/5] ---

> +#ifndef PR_SET_MM_MAP
> +# define PR_SET_MM_MAP	14
> +#endif

PR_SET_MM_MAP_SIZE is listed in the commit message but is not defined here.
Add its UAPI value, 15, alongside PR_SET_MM_MAP.

--- [PATCH 5/5] ---

> +	map.start_code = map.start_data = map.end_data =
> +	map.start_brk = map.brk = map.start_stack = map.arg_start =
> +	map.arg_end = map.env_start = map.env_end = (uint64_t)(uintptr_t)↦

PR_SET_MM_MAP copies these values into current->mm, so this sets the process
break to a stack address before the test starts. Preserve the real break with
sbrk(0), as waiter_fn() does, and supply valid current values for the other
memory-map fields.

> +	if (i == ARRAY_SIZE(try_sizes))
> +		tst_brk(TBROK | TERRNO, "PR_SET_MM_MAP failed for all auxv sizes");

PR_SET_MM_MAP was added in Linux 3.18, while the CVE predates it. Add
`.min_kver = "3.18"` or report TCONF when this required operation is
unavailable instead of reporting TBROK.

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