From mboxrd@z Thu Jan 1 00:00:00 1970 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 25B74CCA47A for ; Sat, 11 Jun 2022 12:38:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233324AbiFKMh7 (ORCPT ); Sat, 11 Jun 2022 08:37:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55580 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231649AbiFKMh4 (ORCPT ); Sat, 11 Jun 2022 08:37:56 -0400 Received: from zeniv-ca.linux.org.uk (zeniv-ca.linux.org.uk [IPv6:2607:5300:60:148a::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EB3AD13D2A; Sat, 11 Jun 2022 05:37:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=linux.org.uk; s=zeniv-20220401; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=SBb05lsgd+OOO2FAPABsHHQaP96X8u5Au9bw5c2kfU4=; b=sSxz2SDHX74tI+Mh9uDjx3JBjg w3M60laG/7hD1NiTZNVfdfPuo8p/SykNo8lqbTv5uGDaFkO3ewl0sgcDlNAKK/p0o3SOsRxZD+IrE cMycJ9Xhpv/ja36hHX2jBp3TCQZarjEWFVG/BpJxm7T0W79NVhBFLRLzBcyn5nVH9KgbsB7TG+FIn INxBFAgn08urU27wENZJuOmqUTmdXIC99VaA6g0D3qEU6lOjwksGiTP9dwcKjQCgIGXpAHdag0GhL wiV/BRwo2T/sZ6hMVJWEHrU+8TAL9zodMFX4uklEQI/nDGBoO4DrbD4aodbPrAPoKbqaai2dCUNvb E7js933w==; Received: from viro by zeniv-ca.linux.org.uk with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1o00N6-0065ri-LL; Sat, 11 Jun 2022 12:37:44 +0000 Date: Sat, 11 Jun 2022 12:37:44 +0000 From: Al Viro To: Sudip Mukherjee Cc: David Howells , Dominique Martinet , Mike Marshall , Gao Xiang , linux-afs@lists.infradead.org, v9fs-developer@lists.sourceforge.net, devel@lists.orangefs.org, linux-erofs@lists.ozlabs.org, linux-cachefs@redhat.com, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, Linus Torvalds Subject: Re: mainline build failure due to 6c77676645ad ("iov_iter: Fix iter_xarray_get_pages{,_alloc}()") Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: Al Viro Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Jun 11, 2022 at 12:12:47PM +0000, Al Viro wrote: > At a guess, should be > return min((size_t)nr * PAGE_SIZE - offset, maxsize); > > in both places. I'm more than half-asleep right now; could you verify that it > (as the last lines of both iter_xarray_get_pages() and iter_xarray_get_pages_alloc()) > builds correctly? No, I'm misreading it - it's unsigned * unsigned long - unsigned vs. size_t. On arm it ends up with unsigned long vs. unsigned int; functionally it *is* OK (both have the same range there), but it triggers the tests. Try return min_t(size_t, nr * PAGE_SIZE - offset, maxsize); there (both places). Al, going back to sleep - 4 hours is not enough...