Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp36272918rwd; Mon, 10 Jul 2023 21:35:30 -0700 (PDT) X-Google-Smtp-Source: APBJJlFFCB24T88tNdSXwOcAV2JJz+V4trOaaU/8oF2Gx8EWYoUVa6RGH+YQVd003r9TuC0ICUbe X-Received: by 2002:aa7:d413:0:b0:51d:df35:3818 with SMTP id z19-20020aa7d413000000b0051ddf353818mr11945530edq.5.1689050130069; Mon, 10 Jul 2023 21:35:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689050130; cv=none; d=google.com; s=arc-20160816; b=Q9GaAjSm+z8m2pdwisu7hZ46rM47oIK9/nVgbiH8Yr7zkKWWN3OHVtCsqs7ahp5w9R vB7m2u0MLFvE5TITWGx0nCRsfjDX67yPV9afCnlSJx5/WnZdeSBjgXTDzwvl/1RIg/l0 mskom0tepLo1XaQ0tX19P1RBrPVooJ8V8l20RHmoxjxtOrZ6pQe0JT2l5RRX69GYx5+z 2svniwr+vK+KT+gTYmqECZG2YwRvxOQTsYtoy64eEu6wIQ03evgQM80KE4D4+MzO6HJ3 XlbUHrhextByD0mG4KJ3viWY7eUJp+ti8RSGWmlCNBCNQ1sc5fZQC7nU1Lv7lYDRjZL7 Sp9A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=GZOGU4heI4nfKEgQzYHYG+CvttaFlbdv5Wyw3YDD8vk=; fh=U74fmUEemPw7sqchHJfHUOA5IBfFk+e2fZn/jtR8IqU=; b=oDhh1pkiBJQwPrV3Y9GtgG1mlKEIyzSvm91JU4SlybFsNcyb9Wc/Cf/cD0O3G7UgiB 9G+lXiyk3ZP3ux693SGafjr5kmCu81WgZzn+srcmG5+CyFyxfgFXh9o6BLfio6ki85UH 8jD1E4nLlMZ4z7QPvdSQp76ZqpsON8nUVwLyKuHZeH7vYMs/6+Q70oyQzpsVU0DEN4Ch 1Z+bqCef/gaoAIRhxNbj9nzjckj9/vtaOSoCFbmlozyzmWiX+q3amhblboEh83UBeU0E 4NWoeftqI5fyE2+ASHrciPMQE5T1KVfkB/24y3WmzZQ0neoUPcO8T6zO3UIJuHv5ziD0 qNTw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bytedance.com header.s=google header.b=VFodhLlA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=bytedance.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a2-20020aa7d902000000b0051e0d77a0fasi1199092edr.647.2023.07.10.21.35.06; Mon, 10 Jul 2023 21:35:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@bytedance.com header.s=google header.b=VFodhLlA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=bytedance.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231189AbjGKDz3 (ORCPT + 99 others); Mon, 10 Jul 2023 23:55:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35060 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231124AbjGKDzW (ORCPT ); Mon, 10 Jul 2023 23:55:22 -0400 Received: from mail-pl1-x62b.google.com (mail-pl1-x62b.google.com [IPv6:2607:f8b0:4864:20::62b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 182B91A2 for ; Mon, 10 Jul 2023 20:54:59 -0700 (PDT) Received: by mail-pl1-x62b.google.com with SMTP id d9443c01a7336-1b8b318c5a7so38828545ad.3 for ; Mon, 10 Jul 2023 20:54:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bytedance.com; s=google; t=1689047698; x=1691639698; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=GZOGU4heI4nfKEgQzYHYG+CvttaFlbdv5Wyw3YDD8vk=; b=VFodhLlAppvFUDByEsIICPzpQnUF4Pl3ZPr1W5KpYkgn/rmm2y2bG3/q7O2b7VV1m5 KPRnBjlJPUXOkOC5Hs2bgXGdyoAC7REerJGkK6MW08fPQqzI6WFgshtOJkrqF6rXbRdN kS1P+Su0k/hLhdl3vsLtS8T846Hwit1m57c+9sng+yX1DMaBsNjLnIPjAFS0Fz4iEYvs QdK+EKD00+LzFQ7OXw+H9oXvWLY7lbcBGvpNpQofXq717Y6pX3DiERnJLEuqXmnYfFeY oZ4+o9tyN3QWi6COzjazDZ0lKHvZFSex2CGFtHe29yxy2b4cyEjcC93ETuuTJGz2IUod FSbg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689047698; x=1691639698; 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=GZOGU4heI4nfKEgQzYHYG+CvttaFlbdv5Wyw3YDD8vk=; b=C5h/hz2wpgEvNQ0I2BtaV1wcmPLzOuPxHzp3jvnseMlQHo3LaiONjEFTjTKjOSholD naPIPmZTWg1FRB8B7RqqSZebPWhTCqD6M20EMI9csy3JAvqABtfPxR+I5srSZESyJrsr CkUyMUw3j1ZqO+3O9/K+hAPp30tBgwatbywS/apl1KoUrUpvfZJ6irV7wWYsqgUCYmH1 x9WWJNwEsfJfM2ozVbpFGDK9bOK/vZmxaP2DaZBszn0JWUAvYwYJuPRBeWUUEJNCP2qn KDWn9I1whEjaCJM1117b9d+a2IFzdxEFDko13hSlRLRMu5OYJG9qwDOOIJIKE6hwHdyh O+Pg== X-Gm-Message-State: ABy/qLYuLsyUzlNem1krNqdGsVZDZi5+MC63XLoZpZe3EnvyGnd9dyJQ uB3zxw2ml6oM2+DDQ2eKBIXEww== X-Received: by 2002:a17:902:d3c6:b0:1b8:90bd:d157 with SMTP id w6-20020a170902d3c600b001b890bdd157mr13620566plb.26.1689047698539; Mon, 10 Jul 2023 20:54:58 -0700 (PDT) Received: from GL4FX4PXWL.bytedance.net ([139.177.225.243]) by smtp.gmail.com with ESMTPSA id b15-20020a170903228f00b001b872c17535sm688329plh.13.2023.07.10.20.54.55 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 10 Jul 2023 20:54:58 -0700 (PDT) From: Peng Zhang To: Liam.Howlett@oracle.com Cc: akpm@linux-foundation.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, maple-tree@lists.infradead.org, Peng Zhang Subject: [PATCH v2 0/8] Improve the validation for maple tree and some cleanup Date: Tue, 11 Jul 2023 11:54:36 +0800 Message-Id: <20230711035444.526-1-zhangpeng.00@bytedance.com> X-Mailer: git-send-email 2.37.0 (Apple Git-136) MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org These patches do the following: 001 - 002: Small cleanup to maple tree. 003 - 006: Improve the validation for maple tree. 007 - 008: Drop some functions that will no longer be used. Thanks Liam for the review. Changes since v1: - Add fixes tag and the necessary Cc. [1/8] - Add the verification that gaps beyond the node limit are zero. [3/8] - Revise comment. [5/8] - Reformat the code. [6/8] Peng Zhang (8): maple_tree: set the node limit when creating a new root node maple_tree: don't use MAPLE_ARANGE64_META_MAX to indicate no gap maple_tree: make mas_validate_gaps() to check metadata maple_tree: fix mas_validate_child_slot() to check last missed slot maple_tree: make mas_validate_limits() check root node and node limit maple_tree: update mt_validate() maple_tree: replace mas_logical_pivot() with mas_safe_pivot() maple_tree: drop mas_first_entry() include/linux/maple_tree.h | 2 - lib/maple_tree.c | 258 ++++++++++++------------------------- 2 files changed, 79 insertions(+), 181 deletions(-) -- 2.20.1