From: linuxtestproject.agent@gmail.com
To: dm.chestnykh@gmail.com
Cc: ltp@lists.linux.it
Subject: Re: [LTP] arch_prctl: add ARCH_GET_FS, ARCH_GET_GS tests
Date: Sat, 10 Oct 2026 15:49:48 +0000 [thread overview]
Message-ID: <20261010154948.9272-1-linuxtestproject.agent@gmail.com> (raw)
In-Reply-To: <20261010094439.26053-1-dm.chestnykh@gmail.com>
Hi Dmitry,
On Sat, 10 Oct 2026, Dmitry Chestnykh wrote:
> arch_prctl: add ARCH_GET_FS, ARCH_GET_GS tests
> Signed-off-by: Dmitry Chestnykh <dm.chestnykh@gmail.com>
The commit body lacks a rationale. Explain the coverage gap and why
instruction reads are used as the independent oracle.
> #ifdef HAVE_GETAUXVAL
> # include <sys/auxv.h>
> #endif
>
> static void setup(void)
> {
> unsigned long long v = 0;
>
> #ifdef AT_HWCAP2
> v = getauxval(AT_HWCAP2);
> #endif
> tag = v & HWCAP2_FSGSBASE ? true : false;
> }
Without getauxval support, v stays zero and run() incorrectly reports
that the CPU/kernel does not support the instructions. Guard the entire
test with HAVE_GETAUXVAL and use TST_TEST_TCONF() to report missing libc
support, or provide an auxiliary-vector fallback.
> #define READ_FS_BASE() ({ \
> unsigned long long __res_fs; \
> #define READ_GS_BASE() ({ \
> unsigned long long __res_gs; \
These double-underscore names are reserved to the implementation.
Rename them to fs_base and gs_base.
> static struct tcase {
> unsigned int idx;
> void (*test_fn)(void);
> } tcases[] = {
> {0, test_fs},
> {1, test_gs}
> };
The table dispatches to separate per-case test functions rather than
parameterizing a common comparison. Use one comparison handler with
entries selecting the ARCH_GET operation and base reader; keep
GS-specific preparation in a helper and remove the unused idx member.
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-10-10 15:50 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-08 19:47 [LTP] [PATCH] arch_prctl: add ARCH_GET_FS, ARCH_GET_GS tests dm.chestnykh
2026-10-09 10:12 ` [LTP] " linuxtestproject.agent
2026-10-09 15:52 ` [LTP] [PATCH v2] " dm.chestnykh
2026-10-09 17:27 ` [LTP] " linuxtestproject.agent
2026-10-09 18:35 ` [LTP] [PATCH v3] " dm.chestnykh
2026-10-09 18:39 ` [LTP] [PATCH v4] " dm.chestnykh
2026-10-09 22:23 ` [LTP] " linuxtestproject.agent
2026-10-10 6:38 ` [LTP] [PATCH v5] " dm.chestnykh
2026-10-10 6:42 ` [LTP] [PATCH v6] " dm.chestnykh
2026-10-10 9:35 ` [LTP] " linuxtestproject.agent
2026-10-10 9:44 ` [LTP] [PATCH v7] " dm.chestnykh
2026-10-10 15:49 ` linuxtestproject.agent [this message]
2026-10-10 9:35 ` [LTP] " linuxtestproject.agent
2026-10-09 22:23 ` linuxtestproject.agent
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=20261010154948.9272-1-linuxtestproject.agent@gmail.com \
--to=linuxtestproject.agent@gmail.com \
--cc=dm.chestnykh@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.