Hi Samir,
On Aug 20, 2026, Samir Mulani wrote:
> hugetlb/hugeshmat: Add hugeshmat06 migrated from libhugetlbfs shm-perms
> hugetlb_after = get_proc_hugetlb_kb(getpid());
> if (hugetlb_after != 0) {
> tst_res(TFAIL,
> "Child %d: HugetlbPages after detach is %ld kB (expected 0), reservation accounting leak",
Could this use an oracle tied to reservation state instead? In Linux 7.2,
HugetlbPages reports mm->hugetlb_usage, which is incremented when a huge
page is mapped and decremented when it is unmapped. The original regression
leaked hstate->resv_huge_pages, so HugetlbPages can return to zero after
shmdt() while that reservation remains leaked.
The original test exposed this by making enough read-only attachments to
exhaust the pool. Here, an eventual shmat() failure would also be handled by
SAFE_SHMAT() as TBROK rather than reported as a failure of the operation
under test. Could the original reservation-leak oracle be retained and the
regression reported as TFAIL?
> #define SEGMENT_KEY (0x82ba15ff)
> shmid = SAFE_SHMGET(SEGMENT_KEY, segment_size,
> IPC_CREAT | SHM_HUGETLB | 0640);
Could this segment use IPC_PRIVATE? IPC_CREAT without IPC_EXCL returns an
accessible pre-existing segment for this key when it is large enough.
setup() would then overwrite that segment, and cleanup() would remove
another process's IPC object with IPC_RMID.
> /*\
> * [Description]
Could the deprecated [Description] header be dropped?
> static struct tst_test test = {
> .needs_root = 1,
Could the high-level description explain why root is required, namely that
the framework modifies the system huge-page pool to reserve pages?
> +/hugetlb/hugeshmat/hugeshmat06
Could this entry be placed in
testcases/kernel/mem/hugetlb/hugeshmat/.gitignore instead? New test binaries
belong in the .gitignore in their own directory.
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.