From patchwork Mon Jan 27 07:55:25 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yang X-Patchwork-Id: 13951049 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id BCF4CC0218C for ; Mon, 27 Jan 2025 07:55:56 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 2E6C4280101; Mon, 27 Jan 2025 02:55:56 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 296762800E8; Mon, 27 Jan 2025 02:55:56 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 15DAF280101; Mon, 27 Jan 2025 02:55:56 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id EDCA82800E8 for ; Mon, 27 Jan 2025 02:55:55 -0500 (EST) Received: from smtpin02.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id B2C60A07E7 for ; Mon, 27 Jan 2025 07:55:55 +0000 (UTC) X-FDA: 83052473070.02.9FD327A Received: from mail-ej1-f46.google.com (mail-ej1-f46.google.com [209.85.218.46]) by imf23.hostedemail.com (Postfix) with ESMTP id 086D5140007 for ; Mon, 27 Jan 2025 07:55:52 +0000 (UTC) Authentication-Results: imf23.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b="bRUm9/Zo"; spf=pass (imf23.hostedemail.com: domain of richard.weiyang@gmail.com designates 209.85.218.46 as permitted sender) smtp.mailfrom=richard.weiyang@gmail.com; dmarc=pass (policy=none) header.from=gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1737964553; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references:dkim-signature; bh=0mA212wWTF3QhHluKvhRCbGTVCJ1uGAkWf4MBxUXZRM=; b=FscvEpFwf1qVXCnerpey/BiFOvt6RBl/AG+I0pvjji6W0YPc6yLBF/TeNfvY1/zaDj7x3q BIGCwurZOmFu1bOqaaIgY9c8MIb1f7c9Eyc/de77gePF6bFXRwVqwa4HmzmG0bXDmpCLge O8H8ir2EgkWzKaTYj5MIUQVfSp/jJYU= ARC-Authentication-Results: i=1; imf23.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b="bRUm9/Zo"; spf=pass (imf23.hostedemail.com: domain of richard.weiyang@gmail.com designates 209.85.218.46 as permitted sender) smtp.mailfrom=richard.weiyang@gmail.com; dmarc=pass (policy=none) header.from=gmail.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1737964553; a=rsa-sha256; cv=none; b=e+hagKpr20iAui3faU/Jy7PN+W/n8Zwl30ILtqzst57/Tz8b9Va3U3Iyz+nmOpjPYzFqYc Z5ovwuHyV76lrNrLhLjCr+x/0veiFtMxEwz5DDm1kqgKwouvw8vcK4jbxNGG/M9dV5go+q 5VgN3FOwPOXxzqBU/K1fdwWgffCS9E4= Received: by mail-ej1-f46.google.com with SMTP id a640c23a62f3a-ab2e308a99bso810135366b.1 for ; Sun, 26 Jan 2025 23:55:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1737964551; x=1738569351; darn=kvack.org; h=message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=0mA212wWTF3QhHluKvhRCbGTVCJ1uGAkWf4MBxUXZRM=; b=bRUm9/ZoJ0vEPEbMpLtQ/0W4VUK6b3hHwPjXTww9Uj+azunFRWEzFjlbV0XNUabYNH qWkCvHy0Xc+7dWMEGSzY9GB/gbav0vB94hHVMqmP4WoIUHquEyIxi4/ycVM0zhIO6m6l 36BMG+YalUDfGZrj7AJIJoVdx5AKLZbUgynAUSHWE3fL0xaYKJkwP4tOIWsVk+nLKKjw it8SSHdzJ9398klbAGgPwrjc6Hza4jw8mh2anLUtclLFYAG+2zZTW7r5GYUCPH7YIgdl jEfhepib2b+S/DQg802iyKdV84+O1T2ODIE6ZkKN8yT8ra3cKohmLjocI4XSqp1s7nzH WldA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737964551; x=1738569351; h=message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=0mA212wWTF3QhHluKvhRCbGTVCJ1uGAkWf4MBxUXZRM=; b=GXtUlfPlQJmSkmJVdiMovogMfCYOjwrUXTcuzO1tBw6ZnKSr4iJJYCoOnxNV1X8dDj j4tAVsVGdDHv4aTvLITIEU+zAVI3KQVoXrbdz6ttgEtY4cVIWsADPWIYqJRQdluu2wak bNBxZTpXE2462XzFSL7MVsLc7t8pfCRZwbCt2KZwkio1FoXtjRkuLtHXvkvrh49lezlC sR/h0WkpQ8nrx6Z7XmvBqnOWFZWfDbaG+Eq5PEYdL80NJPOItbhzVJn5zKzpvLE0iMnP WsFUJjXP6k+quz3svSICfyCaO855zglkXA1CLnp4pUI2Dd+Ivfi46lKbJdg4CFbSgYiP 83OA== X-Gm-Message-State: AOJu0YxGf45ng8jRCVWbXluRfct4kGSYsrqs4jdq4G2KKV73yynLhfWO jUmeCfkIM708MFlBqhxB6ZslKv6cCe45qxqlWJxxUdJUK6gfDLiq X-Gm-Gg: ASbGncu/npCjl1+s6XoVVisZhmaJ3sqKg9Hzryq0vIuuvliVZ0CsLDaApsTEzhUnqHd e1PM/ExZvhRUny+YYBomxkBf8x0yhfjcx4YtyQTIpcmdpSUsFvUHKVEVUynKHFXFAX70KCl+8++ w0UUh4m30apGVfRH25FuzffeJMcLLEgIci4gRs1HkBlVyEvnxOPhUxtSquE7xVt0HfL9wDbeZsF lv+VA97+kTb5O6aKgFpqx56KK6HVJJSX0qWlsf7SNFIPsBKDevdj6JhMDaSFGl7NIgTksuyUGo6 e1AS X-Google-Smtp-Source: AGHT+IFSC7/0HbCfk6weOIffsPFRWNXGSsDsdINmIrZmTbrFWGPAfqGNVPnxUEjucXg2k40ZhRDdHA== X-Received: by 2002:a17:907:70b:b0:ab3:84ad:8547 with SMTP id a640c23a62f3a-ab6746dea0bmr1228449366b.27.1737964551298; Sun, 26 Jan 2025 23:55:51 -0800 (PST) Received: from localhost ([185.92.221.13]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-ab69a26dc94sm227574966b.166.2025.01.26.23.55.50 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sun, 26 Jan 2025 23:55:50 -0800 (PST) From: Wei Yang To: akpm@linux-foundation.org, Liam.Howlett@oracle.com, lorenzo.stoakes@oracle.com, vbabka@suse.cz, jannh@google.com Cc: linux-mm@kvack.org, Wei Yang Subject: [PATCH 0/2] vma: fix unmapped_area() Date: Mon, 27 Jan 2025 07:55:25 +0000 Message-Id: <20250127075527.16614-1-richard.weiyang@gmail.com> X-Mailer: git-send-email 2.11.0 X-Rspam-User: X-Rspamd-Server: rspam09 X-Rspamd-Queue-Id: 086D5140007 X-Stat-Signature: oe8w5464qcymn8awy7igf6ghrag1hqpq X-HE-Tag: 1737964552-162313 X-HE-Meta: U2FsdGVkX1/KbbRPEz43wtC1zoT8inBMDGY0DwoLTh9W5lks0/KKsCAQTiOzmOZ8DjIyb2Cnyg0QgffgZx6QwFdwDLVNJ6cuhWUeTcce/81NrQbvDaSte8uYZqkyDhuEWLqKDS2tvuqd7V+jRnonCKRGBjqhxlc5iS9hL+WIhlYmk9Wi/i+wn3sXkxTiSRgPfuSHwXY6HWw4pEBATLTNtG6/TvGJf0NddJEVhpX+0D0hL/BDOyv2W8YwEq4LOUcAGeywHYnEZ3uGh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GuJxk7Kepy3eMB6QldvO+BRmsK7bR/CThtLaANWgosQ7E9Kg/wtrt7hMiI3BdlOKaiKDLG2nCd8EwLU2yy66UI6jT+YqQU/XMIkKnIf1iJnLxlZkUyKwQt8HLRHO4gWeRpRI9BF62j9zsdbhpJkz3oeNgEMPEPMdvdVVlWPNLMewwSqLIz7Hojf2e06WzjYw== X-Bogosity: Ham, tests=bogofilter, spamicity=0.130373, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: The gap check in unmapped_area() seems not correct. Add test cases to verify the behavior. Wei Yang (2): mm/vma: fix gap check for unmapped_area with VM_GROWSDOWN tools: testing: add unmapped_area() tests mm/vma.c | 2 +- tools/testing/vma/vma.c | 177 +++++++++++++++++++++++++++++++ tools/testing/vma/vma_internal.h | 2 +- 3 files changed, 179 insertions(+), 2 deletions(-)