Received: by 2002:a05:7412:b10a:b0:f3:1519:9f41 with SMTP id az10csp849426rdb; Thu, 30 Nov 2023 23:19:20 -0800 (PST) X-Google-Smtp-Source: AGHT+IHM49GXolXHeI7uHBNvuDwsbGK2xYo2D5Z0uo8aNT04XXpzfnFzpXYolxRjx4C9/zc11Ev0 X-Received: by 2002:a05:6a00:4386:b0:6cd:f764:de41 with SMTP id bt6-20020a056a00438600b006cdf764de41mr3728764pfb.16.1701415159619; Thu, 30 Nov 2023 23:19:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701415159; cv=none; d=google.com; s=arc-20160816; b=pg3qetOx9LzumVqcaXkLfuv0BKb0BYgd0BMgqhsJsSy69g7aBu2X+vkWnwTfTHQSU0 GHTvpTyGz51ffAei5BBNdrkk/9gdcK24O59WC9FKjSam2HARs6472zcLSg9N2QveMmFo dV4GS+nHyE9dhLYm6lAPM6aXdgL+PwDT5MZgtsObnEtMyeV0UOgbCatALZEF3fk+Jf6A PRxT5WdBarosuagadzQoIgfRm4yUF9jQbqxac8htgI5emW4i3l/cUw9qP5P+QfPfltja Rwmrx2Qm/z5D/DWieNhYAzm9D/OtvRBI8KHXNhHBWVRb6ZJ01Vj9CryHj9I2T08uK4ur Cdvg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=w4gjmXzJwfkZpfXVaiVKGn9kscrEqPPEn8et/1JxxBI=; fh=658IzL/FnSGry58xenYrijK6lVYrX2ZKm8jUOjcb14s=; b=Q1DocLrIZ9riOiwBeVFqNlFqkpi9XU1UNtL9rT6WYizUJnj+Ogx+yDjQbYP8oU6oPz sX5mCDqERViwaFqbVHBwrldAUZLyZ9B48vtF6Wysc9a6U4Q+MQoxk99CALCOsVmZ9RQe t8QOkOq41Bb9LHETgTcC7FN24+WkPPXA2/WwEElaPTYXfyzYrBC0zFSPoy1DMwsVAtTb wek6ektkkfdIV1N53WvkRjXKXR8yao88+eG4zSCqRkUFXGiIkCcBwMdgo3i9R4k29DWU zAs+WmMfY+SGOSNKvExuUlUQXL5XKEh/2hhh3gdDPhpDhWNjZlTG5V5lC0A5Uqps8dWv TbAw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=kaUkfIeI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id b19-20020a63d813000000b005c220a94525si2925829pgh.90.2023.11.30.23.19.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Nov 2023 23:19:19 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=kaUkfIeI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 3A8F8801B80F; Thu, 30 Nov 2023 23:19:17 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1377691AbjLAHTE (ORCPT + 99 others); Fri, 1 Dec 2023 02:19:04 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38230 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229507AbjLAHTD (ORCPT ); Fri, 1 Dec 2023 02:19:03 -0500 Received: from mail-pj1-x102e.google.com (mail-pj1-x102e.google.com [IPv6:2607:f8b0:4864:20::102e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 10AAE10FD for ; Thu, 30 Nov 2023 23:19:10 -0800 (PST) Received: by mail-pj1-x102e.google.com with SMTP id 98e67ed59e1d1-286447abfbeso933019a91.1 for ; Thu, 30 Nov 2023 23:19:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1701415149; x=1702019949; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=w4gjmXzJwfkZpfXVaiVKGn9kscrEqPPEn8et/1JxxBI=; b=kaUkfIeI4tpE1dITHQVPisSpZaZPRclkn6CGLXNVqr6xQ71WAirKsmFIhg2dH0H7l3 R3xxN1KU/YF4AkoNHfeHxyBtPk//Cb7bXF45VeRdAQKaUKgfMXpb5Ka4/wk8X8h5Uqfm g0mdvNPFs5w0LcXxffewa0la9wz3OLojJPQXtPaNLyambKd/CHDbaLQcIqImKUNh8yeZ uS6MG/BWcCvWap8566kI4jkCch0L6cKghoVe/l1EFi2V07ln7qpY9fRa6DK2uE45n8BL PfeQENzXmuRJy1IpMwgLEoWfAcOjybZXuNuEKt4seNiwHLsUlHslEulz7Rv/deMvPG9B bjpQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701415149; x=1702019949; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=w4gjmXzJwfkZpfXVaiVKGn9kscrEqPPEn8et/1JxxBI=; b=hzjFdr6eSls8GtXspGl4Hhs7w2kUovWzd3du7DYlF49GPlYQQyISnykZoGbqPKJGZH LHmdpDeCGTtbZKMroOdCWKKc19A/CfNdZk9cuRUUu3Eb/ILsp4dMFyJhPFdicxuPXh8r scnbPiPbfFjGAJpMb7NtDTbgDoYPcA0dn0a6LeOkutV0I8M4Ds7/PMW839AOoI5+U8bh 9aW1B9jvKMPBAeMtk/+oPMMm72lmQ3QnOphJ9h77ZOQyLF4Pj94xFMxQlv9KSMk/AeU9 SztZg/2P92zyHNReGMdjWWLI3EcNqeRrS+gk/HpGPZO9zQX++wtD6gCA950GOj6FRniX o8Fg== X-Gm-Message-State: AOJu0YyBlvNGiW3wSrogAqJb5RdS0AkNjlOGXVr643g7gdfqxAr85hPg BFt5GUicMBI1GrKOawRMYGkduQ== X-Received: by 2002:a17:90b:3ecb:b0:286:1e90:fe2f with SMTP id rm11-20020a17090b3ecb00b002861e90fe2fmr11007696pjb.15.1701415149380; Thu, 30 Nov 2023 23:19:09 -0800 (PST) Received: from google.com (170.102.105.34.bc.googleusercontent.com. [34.105.102.170]) by smtp.gmail.com with ESMTPSA id f6-20020a170902684600b001cf5d4f8f26sm669493pln.248.2023.11.30.23.19.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Nov 2023 23:19:08 -0800 (PST) Date: Fri, 1 Dec 2023 07:19:05 +0000 From: Carlos Llamas To: Alice Ryhl Cc: Arve =?iso-8859-1?B?SGr4bm5lduVn?= , Christian Brauner , Greg Kroah-Hartman , Joel Fernandes , kernel-team@android.com, linux-kernel@vger.kernel.org, Martijn Coenen , Suren Baghdasaryan , Todd Kjos Subject: Re: [PATCH 16/21] binder: refactor page range allocation Message-ID: References: <20231102185934.773885-17-cmllamas@google.com> <20231107090835.260342-1-aliceryhl@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231107090835.260342-1-aliceryhl@google.com> X-Spam-Status: No, score=-4.6 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FSL_HELO_FAKE,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SORTED_RECIPS,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,USER_IN_DEF_DKIM_WL autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Thu, 30 Nov 2023 23:19:17 -0800 (PST) On Tue, Nov 07, 2023 at 09:08:35AM +0000, Alice Ryhl wrote: > Carlos Llamas writes: > > Instead of looping through the page range twice to first determine if > > the mmap lock is required, simply do it per-page as needed. Split out > > all this logic into a separate binder_get_user_page_remote() function. > > > > Signed-off-by: Carlos Llamas > > One nit, otherwise looks okay to me. > Reviewed-by: Alice Ryhl > > Carlos Llamas writes: > > + unsigned long index; > > - size_t index; > > You're changing the type of index to unsigned long here, but it seems to > me that size_t is the correct type. Perhaps size_t made sense before the addresses were also moved to unsigned long. I think this is a better fit now. -- Carlos Llamas