linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: "Liam R. Howlett" <Liam.Howlett@oracle.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org,
	maple-tree@lists.infradead.org,
	Rick Edgecombe <rick.p.edgecombe@intel.com>,
	Peng Zhang <zhangpeng.00@bytedance.com>,
	"Liam R. Howlett" <Liam.Howlett@oracle.com>
Subject: [PATCH v3 0/4] Fix mas_empty_area() search
Date: Fri, 21 Apr 2023 09:55:55 -0400	[thread overview]
Message-ID: <20230421135559.2163923-1-Liam.Howlett@oracle.com> (raw)

mas_empty_area() search could potentially return a sub-optimal position
for a VMAs as it is coded.  This patch set is to address the issue by
altering the maple tree search and the mmap call into that search.

Changes from v2:
 - Addressed Peng Zhang's concerns around limit checking.
 - Updated testing code to work with size of 1 and added tests for this
   case.

v2: https://lore.kernel.org/linux-mm/20230414185919.4175572-1-Liam.Howlett@oracle.com/
v1: https://lore.kernel.org/linux-mm/20230414145728.4067069-1-Liam.Howlett@oracle.com/

Liam R. Howlett (4):
  maple_tree: Make maple state reusable after mas_empty_area_rev()
  maple_tree: Update mtree_alloc_rrange() and mtree_alloc_range()
    testing
  maple_tree: Fix mas_empty_area() search
  mm/mmap: Regression fix for unmapped_area{_topdown}

 lib/maple_tree.c      | 61 ++++++++++++++++++++++++-------------------
 lib/test_maple_tree.c | 27 ++++++++++++++-----
 mm/mmap.c             | 48 ++++++++++++++++++++++++++++++----
 3 files changed, 97 insertions(+), 39 deletions(-)

-- 
2.39.2



             reply	other threads:[~2023-04-21 13:56 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-21 13:55 Liam R. Howlett [this message]
2023-04-21 13:55 ` [PATCH v3 1/4] maple_tree: Make maple state reusable after mas_empty_area_rev() Liam R. Howlett
2023-04-21 13:55 ` [PATCH v3 2/4] maple_tree: Update mtree_alloc_rrange() and mtree_alloc_range() testing Liam R. Howlett
2023-04-21 13:55 ` [PATCH v3 3/4] maple_tree: Fix mas_empty_area() search Liam R. Howlett
2023-04-21 13:55 ` [PATCH v3 4/4] mm/mmap: Regression fix for unmapped_area{_topdown} Liam R. Howlett

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=20230421135559.2163923-1-Liam.Howlett@oracle.com \
    --to=liam.howlett@oracle.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=maple-tree@lists.infradead.org \
    --cc=rick.p.edgecombe@intel.com \
    --cc=zhangpeng.00@bytedance.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