From patchwork Thu Nov 16 20:15:44 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Xu X-Patchwork-Id: 13458258 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 DE161C197A0 for ; Thu, 16 Nov 2023 20:15:55 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 4CB1E6B0461; Thu, 16 Nov 2023 15:15:55 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 47BB06B0464; Thu, 16 Nov 2023 15:15:55 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 343B06B0467; Thu, 16 Nov 2023 15:15:55 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id 243086B0461 for ; Thu, 16 Nov 2023 15:15:55 -0500 (EST) Received: from smtpin21.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id F3847B5FE6 for ; Thu, 16 Nov 2023 20:15:54 +0000 (UTC) X-FDA: 81464923470.21.A2F4E55 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by imf13.hostedemail.com (Postfix) with ESMTP id ABBDA20026 for ; Thu, 16 Nov 2023 20:15:52 +0000 (UTC) Authentication-Results: imf13.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=OYuqUDgA; dmarc=pass (policy=none) header.from=redhat.com; spf=pass (imf13.hostedemail.com: domain of peterx@redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=peterx@redhat.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1700165752; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:in-reply-to: references:dkim-signature; bh=BXyMUvPFi7/b7BrzgsNqnZhAP3xYr4UsmeMU4TKgC9Y=; b=SkubYJXgp4jXCTVDlY2rUok3AeJEfdZ2HGprKqG9J9+MhbBKf0aI+5CcQcRZK+1GM1lSBz jIdbuPYUv62mTNknkOLVd6Ugui2TOfHgQcAV92VEQbL2N+QHfODJV6XFZngorhZENmIZsU Z1PHeigSo4KMrXkGP4q9gBqmfk6wy04= ARC-Authentication-Results: i=1; imf13.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=OYuqUDgA; dmarc=pass (policy=none) header.from=redhat.com; spf=pass (imf13.hostedemail.com: domain of peterx@redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=peterx@redhat.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1700165752; a=rsa-sha256; cv=none; b=er1C7tncgK/U7HABa20uERU7jF/Ba/z6x+GGU5CaxNByDAHosxQ8l8M4Rc8L4ZvAB+SzDx TpH66YPP0Ch8ssc8YPcQHeaJe7o9EZJIOAbmm049NBV9tI2GVJGEtp/2KzLDBjYB4KchY5 Qhghf1iuyohH0B5Te6I/zN3FkqJKlr0= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1700165751; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BXyMUvPFi7/b7BrzgsNqnZhAP3xYr4UsmeMU4TKgC9Y=; b=OYuqUDgAQ6QrerB9URuJkJp4vkZqjDNI8FjjAxS4gP53PkVdOCJHfDOA9+xyNdFYcEqKPS 0b1SZB6rKYODn03izIM3qhfUiJuZ3drFpQgSwGS68BWHOMVE2J/8unXTlenRb4PgjcGv/x 99zzQKEV6mR9qwZShCQwj81nKch7LQA= Received: from mail-oi1-f197.google.com (mail-oi1-f197.google.com [209.85.167.197]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-404-5dSaBMhrOPKZScAH9GO11A-1; Thu, 16 Nov 2023 15:15:50 -0500 X-MC-Unique: 5dSaBMhrOPKZScAH9GO11A-1 Received: by mail-oi1-f197.google.com with SMTP id 5614622812f47-3b6aa594943so283254b6e.1 for ; Thu, 16 Nov 2023 12:15:50 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700165749; x=1700770549; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=BXyMUvPFi7/b7BrzgsNqnZhAP3xYr4UsmeMU4TKgC9Y=; b=eS1GMM18BgWGfZjc8QbpwAVkg4ULXVUJXtHicXoIHvAWgQrhdpZg/GwvlgUiGva4GI LQx3YQrS+ysCO1OxgCn2P7aI5LifA+zK05+ze//Xv1c0Lh9fLv2jH+ZVHTONUnx9mY95 hxY2grn3qkJyT22ABJMVOem3q5x+rpQCtL+kSr1lwOTWawM+RD3kDSon9Y5FVSXxo6F7 PXxgdREzmtEducdCjVmGfct2tl53EcY/CUN9/vGFB4lPeI8DY8o+qljeWFFtosBWvSEn NeM512yhAbb07wvsuVfYsder54b0dcy4uG6Tq46O0BPxbemoV6BEZvZDNx13IEIKMlZ9 mNJQ== X-Gm-Message-State: AOJu0YyhW6vQV4ywc1Yrq+wyDZePg7mpsKCKBv8+IYnTFq2BqMcud2Li 3qt/HD3FYZWWVHgmqnXwlJW+Pj31etdJTnRAwvx91HP/6Kqm1vMfhLaApFGZsAnSODsgmR0A5WJ mAIeUslcXbwm+aL6l+hVIOA7FTMIn8K3wwbESdCuY939SsCPLpH7lI7aQ5udDeGZiVdqG X-Received: by 2002:a05:6808:2209:b0:3b2:ec6d:edcd with SMTP id bd9-20020a056808220900b003b2ec6dedcdmr13465942oib.3.1700165749693; Thu, 16 Nov 2023 12:15:49 -0800 (PST) X-Google-Smtp-Source: AGHT+IHX6yQo/D+VJmocu3Rk9YyrtuL+oxTWoQmnTKoNRR4B9T8rzd/CHnRXNN8eDXbWpHwACtresw== X-Received: by 2002:a05:6808:2209:b0:3b2:ec6d:edcd with SMTP id bd9-20020a056808220900b003b2ec6dedcdmr13465914oib.3.1700165749340; Thu, 16 Nov 2023 12:15:49 -0800 (PST) Received: from x1n.redhat.com (cpe688f2e2cb7c3-cm688f2e2cb7c0.cpe.net.cable.rogers.com. [99.254.121.117]) by smtp.gmail.com with ESMTPSA id b19-20020a05620a271300b007659935ce64sm65524qkp.71.2023.11.16.12.15.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Nov 2023 12:15:48 -0800 (PST) From: Peter Xu To: linux-mm@kvack.org, linux-kernel@vger.kernel.org Cc: peterx@redhat.com, Muhammad Usama Anjum , Andrew Morton , David Hildenbrand , Andrei Vagin Subject: [PATCH 0/3] mm/pagemap: A few fixes to the recent PAGEMAP_SCAN Date: Thu, 16 Nov 2023 15:15:44 -0500 Message-ID: <20231116201547.536857-1-peterx@redhat.com> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Rspamd-Queue-Id: ABBDA20026 X-Rspam-User: X-Rspamd-Server: rspam05 X-Stat-Signature: bqdunc4iqsc9esi8j3m8p7sopa9e1yab X-HE-Tag: 1700165752-846390 X-HE-Meta: U2FsdGVkX1/7KrX1cDZ87xkyGBHdZFRrJ4XIkV346yUjHkMn3czdvkqrzGcxiWZmiupObzwd5BQY0tcu6CVBDUlD97MOWrqibR5MSIxBVEsbkK5HiCmms6rG1no0fkU0CFIeGhqFq/DquukBqWUqN2SWfeijlzUK1q1GTFuYLrTH2itMI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z0lpjnT6H8wMu+Iu6L4IIONkeICGemBUV9qg5HO962UiHCxf5rou5ugR2wj/bZxvVs9JAU14Hl8OYW7mVdHzis8TDrWjY86Li/YfRd98qfFZwdpJ8XSweTsXw09+qp1DYxzz1rf0xYGVBSLrlLOPpukwKtKnWvMF7HD5fSehHC3nDuRchJESz7yO1rwf625iNBEKlhCH8e1kL4QeSklczRDkJC9ilzNWRgw= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: Muhammad: I'd rather leave these to you, but since I already started looking into it, and you didn't yet start replying, let me try to do it. Please still review if you can catch the train. This series should fix two known reports from syzbot on the new PAGEMAP_SCAN ioctl(): https://lore.kernel.org/all/000000000000b0e576060a30ee3b@google.com/ https://lore.kernel.org/all/000000000000773fa7060a31e2cc@google.com/ The 3rd patch is something I found when testing these patches. Thanks, Peter Xu (3): mm/pagemap: Fix ioctl(PAGEMAP_SCAN) on vma check mm/pagemap: Fix wr-protect even if PM_SCAN_WP_MATCHING not set mm/selftests: Fix pagemap_ioctl memory map test fs/proc/task_mmu.c | 26 +++++++++++++++++----- tools/testing/selftests/mm/pagemap_ioctl.c | 9 +++++--- 2 files changed, 27 insertions(+), 8 deletions(-)