mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "David Hildenbrand (Arm)" <david@kernel.org>
To: 박태선/컴퓨터·AI학부 <ts930@dgu.ac.kr>, "Lorenzo Stoakes (ARM)" <ljs@kernel.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	"Liam R. Howlett" <liam@infradead.org>,
	Vlastimil Babka <vbabka@kernel.org>, Jann Horn <jannh@google.com>,
	Pedro Falcato <pfalcato@suse.de>, Michal Hocko <mhocko@suse.com>,
	Mike Rapoport <rppt@kernel.org>,
	Suren Baghdasaryan <surenb@google.com>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mm/mlock: fix zero-length request normalization and integer overflows
Date: Wed, 30 Sep 2026 13:43:05 +0200	[thread overview]
Message-ID: <7d120555-0c31-474f-893b-e5ee3466ead4@kernel.org> (raw)
In-Reply-To: <CAFPGN2jPGhcWVqa3k16RWMaMR3TwKyhFbYYF4D3L6L85T8E96g@mail.gmail.com>

On 9/29/26 11:39, 박태선/컴퓨터·AI학부 wrote:
> Understood, and thank you for the feedback.
> 
> I sincerely apologize for the poor code quality and flawed helper
> design. I will be much more careful with commenting and ensure future
> contributions strictly adhere to kernel guidelines.
> 
> I will drop this patch.
> 
> For David's question regarding reproducers and user-visible issues, in
> case it is helpful if the core team addresses this later,
> here is what is observed from a small test program wrote checking
> /proc/self/smaps on an unpatched kernel:
> 
> $ ./test_mlock
> mlock(p, -1UL)    : ret=0, locked=0  (silent success without actually locking)
> mlock(p + 5, 0)   : ret=0, locked=1  (0-length request falsely locks 4KB page)
> munlock(p + 5, 0) : ret=0, locked=0  (0-length request falsely unlocks 4KB page)
> 
> Thank you all for your time and the review.

The CI seems to complain about test failures:


# ---------------------------------------------
# running sudo -u nobody sh -c ./on-fault-limit
# ---------------------------------------------
# TAP version 13
# 1..1
# ok 1 The map failed respecting mlock limits
# # Totals: pass:1 fail:0 xfail:0 xpass:0 skip:0 error:0
# [PASS]
ok 1 sudo -u nobody sh -c ./on-fault-limit
# ---------------------------
# running ./mlock-random-test
# ---------------------------
# TAP version 13
# 1..2
# ok 1 test_mlock_within_limit
# Bail out! mlock2() succeeds? on 0x7ffff7d2a010(393216) mlock0x7ffff7d44a72(278478)
# # Planned tests != run tests (2 != 1)
# # Totals: pass:1 fail:0 xfail:0 xpass:0 skip:0 error:0
# [FAIL]
not ok 2 mlock-random-test # exit=1


So is this patch doing more harm than good?

-- 
Cheers,

David

  reply	other threads:[~2026-09-30 11:43 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-29  5:56 Park Tae-sun
2026-09-29  8:30 ` Jose A. Perez de Azpillaga
2026-09-29  8:38 ` Lorenzo Stoakes (ARM)
2026-09-29  8:40 ` David Hildenbrand (Arm)
2026-09-29  8:47   ` Lorenzo Stoakes (ARM)
2026-09-29  9:39     ` 박태선/컴퓨터·AI학부
2026-09-30 11:43       ` David Hildenbrand (Arm) [this message]
2026-09-30 12:14         ` Lorenzo Stoakes (ARM)
2026-09-30 16:08           ` David Hildenbrand (Arm)
2026-09-30 16:09             ` Lorenzo Stoakes (ARM)
2026-09-30 20:42               ` Jose A. Perez de Azpillaga

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=7d120555-0c31-474f-893b-e5ee3466ead4@kernel.org \
    --to=david@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=jannh@google.com \
    --cc=liam@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=ljs@kernel.org \
    --cc=mhocko@suse.com \
    --cc=pfalcato@suse.de \
    --cc=rppt@kernel.org \
    --cc=surenb@google.com \
    --cc=ts930@dgu.ac.kr \
    --cc=vbabka@kernel.org \
    /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

all inboxes | Powered by JetHome®