Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp781723rwr; Wed, 19 Apr 2023 13:02:53 -0700 (PDT) X-Google-Smtp-Source: AKy350aPBsiMKqd9/yOQRoLVOycWeYkRCzzS04L0O+FwLhiXIYHHV3oIDSZuoUtX+ysti/72Qe1Z X-Received: by 2002:a17:903:2281:b0:1a6:3737:750d with SMTP id b1-20020a170903228100b001a63737750dmr7155192plh.17.1681934573520; Wed, 19 Apr 2023 13:02:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681934573; cv=none; d=google.com; s=arc-20160816; b=DlnZDgO3WiEbGTyE1RyFxZGbq3Fs/LpgXoLtWOM8xKJbUxmPmTey2d8E6G9Ge6tt3m jkMdKlH74DTSfL54toFOHo6nDNiT7jtu4hCiIsnWJ7HHu+lMnAfKH4POIv/UForbcQ7k hjiXwWypBG+QJSRxe0cQGcnEU8Wyy/0UHt0rqJ19uBoXKJb6GMG2knJtuFdKJ9FseVx4 EmuCEGFRH8MYoUP17SzP7SPjQPalN4tT0Vh8dhSOEv/0+DIBiOMxAh16FOK+qBC4jQUa s5PnVdghCTow3YyGYpmm77jhUTWSlWH1aAqQX9MUyFGVW5QybyiYmhXo7qMJx5lx10zt qdtA== 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 :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=1vmc/yUvLN74EaFbc8CDYimY51PCe7zIWh0fD7mDIF8=; b=mlw2PuddIYi4WJruyZKYVOy7rnaZ2Q7aedL51SaqeipKZD/WsaJ7dLUF9j4fkrWKmM gtZnnRiJ45lqSwkgT4rOZUemYYY+PI5/My2jU2tM+oHzyV9tpZl4dtOGAGGhiZ2Abj/D ZjK/yecKYMc8A70ospLkmAF6rUShRwQdmlSNZtrB+3iSd4QHOO2eIkRV32JFkDur69EF izFv3UJGUlVfQpKMxBSEvd42pmduZo0+jCcjkWh0btI3cxwrsVS0BqA8yvjMLCGPvD5X PISGIJV2GOgYTAIJUCwPjlW4jw7nCFW7oUkMn0qBWL7B3eYgb6s/ManhV0gBvmPdBCOB o0bQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=korg header.b=YZ6MVO3R; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f8-20020a17090274c800b001a1abc91980si16343128plt.211.2023.04.19.13.02.38; Wed, 19 Apr 2023 13:02:53 -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=@linux-foundation.org header.s=korg header.b=YZ6MVO3R; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231414AbjDSTtJ (ORCPT + 99 others); Wed, 19 Apr 2023 15:49:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52784 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229504AbjDSTtE (ORCPT ); Wed, 19 Apr 2023 15:49:04 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D68651BD8 for ; Wed, 19 Apr 2023 12:49:03 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 736AD64202 for ; Wed, 19 Apr 2023 19:49:03 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9C9DFC433D2; Wed, 19 Apr 2023 19:49:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1681933742; bh=tJAJOI4zNpAbAbSJ2yiWr+f0FAyzO0/dqLTfBJ1SAuM=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=YZ6MVO3RRUTR+rziKBAQ2Slq8Tjj2nwPpk/s6NbJ25w8iAiaFw9c8aDVrmXDscW8Q ic0xEnsKEGMniLygHDocWC0YQtdfkMLVkJ2JquZUY4SCkkHYMbfR0hjIUSbmIled2o xxMKQ+QHowfWK2eJAk8cLimZAvft7Mf7r8XwNt7U= Date: Wed, 19 Apr 2023 12:49:02 -0700 From: Andrew Morton To: Peng Zhang Cc: Liam.Howlett@oracle.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org, maple-tree@lists.infradead.org Subject: Re: [PATCH] maple_tree: Fix allocation in mas_sparse_area() Message-Id: <20230419124902.7cb9b5c54afa37736e7b0e3a@linux-foundation.org> In-Reply-To: <20230419093625.99201-1-zhangpeng.00@bytedance.com> References: <20230419093625.99201-1-zhangpeng.00@bytedance.com> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.33; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-7.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_MED, 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 On Wed, 19 Apr 2023 17:36:25 +0800 Peng Zhang wrote: > In the case of reverse allocation, mas->index and mas->last do not point > to the correct allocation range, which will cause users to get incorrect > allocation results, so fix it. If the user does not use it in a specific > way, this bug will not be triggered. Please describe the user-visible effects of the bug. I assume "none", because there are presently no callers which can trigger it? > Also re-checks whether the size is still satisfied after the lower bound > was increased, which is a corner case and is incorrect in previous versions. Again, what are the user-visible effects of the bug?