Linux Test Project
 help / color / mirror / Atom feed
From: linuxtestproject.agent@gmail.com
To: Michael Menasherov <mmenashe@redhat.com>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] futex_wait06: Add EFAULT error coverage test
Date: Tue, 26 May 2026 22:30:25 +0000	[thread overview]
Message-ID: <20260526223025.4047-1-linuxtestproject.agent@gmail.com> (raw)
In-Reply-To: <20260526214927.150812-2-mmenashe@redhat.com>

Hi Michael,

On Wed, 27 May 2026 00:49:24 +0300, Michael Menasherov wrote:
> futex_wait06: Add EFAULT error coverage test

[...]

Patches 1-3 look good to me. One comment issue in patch 4 below.

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

On Wed, 27 May 2026 00:49:27 +0300, Michael Menasherov wrote:
> futex_cmp_requeue03: Add EFAULT error coverage test

> +/*\
> + * Check that futex(FUTEX_CMP_REQUEUE) returns EFAULT when uaddr or
> + * uaddr2 points to unmapped memory, or when uaddr points to memory
> + * without read permission (PROT_NONE).
> + *
> + * get_futex_key() is called for both uaddr and uaddr2 before the
> + * *uaddr == val check; futex_var and val are both FUTEX_INITIALIZER.
> + */

The comment explains the key-ordering for the uaddr2 case but omits why
opflags=0 (no FUTEX_PRIVATE_FLAG) is required. With FUTEX_PRIVATE_FLAG,
get_futex_key(uaddr2) succeeds using a virtual-address key with no
physical page resolution, so the call returns 0 (no waiters) rather than
EFAULT for the "uaddr2 unmapped" and "uaddr PROT_NONE" cases. Please
add a note similar to the one in futex_wake05, e.g.:

  The test uses opflags=0 (no FUTEX_PRIVATE_FLAG) so get_futex_key()
  takes the shared-futex path and resolves the physical page; this
  lookup fails with EFAULT for unmapped and PROT_NONE addresses.

The code itself (opflags=0 in the call) is correct; the comment just
needs to explain why.

---
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

  reply	other threads:[~2026-05-26 22:30 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-26 21:49 [LTP] [PATCH v13 0/4] futex: Add error coverage tests for wait, wake and cmp_requeue Michael Menasherov via ltp
2026-05-26 21:49 ` [LTP] [PATCH v13 1/4] futex_wait06: Add EFAULT error coverage test Michael Menasherov via ltp
2026-05-26 22:30   ` linuxtestproject.agent [this message]
2026-05-26 21:49 ` [LTP] [PATCH v13 2/4] futex_wait07: Add EINTR " Michael Menasherov via ltp
2026-05-26 21:49 ` [LTP] [PATCH v13 3/4] futex_wake05: Add EFAULT " Michael Menasherov via ltp
2026-05-26 21:49 ` [LTP] [PATCH v13 4/4] futex_cmp_requeue03: " Michael Menasherov via ltp
  -- strict thread matches above, loose matches on Subject: below --
2026-05-27  9:26 [LTP] [PATCH v14 1/4] futex_wait06: " Michael Menasherov via ltp
2026-05-27  9:56 ` [LTP] " linuxtestproject.agent
2026-05-26 19:04 [LTP] [PATCH v12 1/4] " Michael Menasherov via ltp
2026-05-26 21:00 ` [LTP] " linuxtestproject.agent
2026-05-26 15:26 [LTP] [PATCH v11 1/4] " Michael Menasherov via ltp
2026-05-26 18:36 ` [LTP] " linuxtestproject.agent
2026-05-26  9:07 [LTP] [PATCH v10 1/4] " Michael Menasherov via ltp
2026-05-26 15:29 ` [LTP] " linuxtestproject.agent
2026-05-25 19:03 [LTP] [PATCH v9 1/4] " Michael Menasherov via ltp
2026-05-25 19:45 ` [LTP] " linuxtestproject.agent
2026-05-25 14:44 [LTP] [PATCH v8 1/4] " Michael Menasherov via ltp
2026-05-25 17:13 ` [LTP] " linuxtestproject.agent
2026-05-25 10:04 [LTP] [PATCH v7 1/4] " Michael Menasherov via ltp
2026-05-25 14:15 ` [LTP] " linuxtestproject.agent
2026-05-20  7:44 [LTP] [PATCH v6 1/4] " Michael Menasherov via ltp
2026-05-20  9:45 ` [LTP] " linuxtestproject.agent
2026-05-19 18:30 [LTP] [PATCH v5 1/4] " Michael Menasherov via ltp
2026-05-19 19:10 ` [LTP] " linuxtestproject.agent
2026-05-07 11:18 [LTP] [PATCH v4 1/4] " Michael Menasherov via ltp
2026-05-07 12:01 ` [LTP] " linuxtestproject.agent
2026-05-13  8:35   ` Michael Menasherov via ltp
2026-05-18 18:23     ` Michael Menasherov via ltp
2026-05-19  8:25       ` Andrea Cervesato via ltp
2026-05-06 15:17 [LTP] [ltp v2 1/4] " Michael Menasherov via ltp
2026-05-06 16:39 ` [LTP] " 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=20260526223025.4047-1-linuxtestproject.agent@gmail.com \
    --to=linuxtestproject.agent@gmail.com \
    --cc=ltp@lists.linux.it \
    --cc=mmenashe@redhat.com \
    /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