From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 964DF374A04 for ; Wed, 10 Jun 2026 20:33:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781123607; cv=none; b=lSo/W3nskPuiomM3bbuMgJ5yDItQPlGrwhxnrYmkKUvnQUPAqrdtqSF8OMmhbeoi35bU+hriRi9VX/rGSv3aDGP32y5EEH40aj3GzvcO/PaeDi2jNjIGQxib6WGV7bxc+KqQ/s+YkKb2e+JKNU2iZ/kaSQMITE+Nb1JZSTVK1kc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781123607; c=relaxed/simple; bh=Ds7JZaqofdbHbv4an7y2wJsiIkYHyWQsvTkbaqydYaU=; h=Date:From:To:Cc:Subject:Message-Id:In-Reply-To:References: Mime-Version:Content-Type; b=Sow6S2CabgeyhSyNyoM2gFH36B/+IOe9IzadxVasLzHyH1lZq7wc8TSrL34PMswS1ChYTGU1QAXlmhrNVDlOoTG78twGx+5uQyQv/+DXKvv4w6kRmHGCngJM25boEt65+QLwaPhFLD2gZqx7wTlQ7zbWaLMpoj6sM1LBYCxEnkw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b=QMyPIU42; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b="QMyPIU42" Received: by smtp.kernel.org (Postfix) with ESMTPSA id EEADC1F00893; Wed, 10 Jun 2026 20:33:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=korg; t=1781123606; bh=MeFCnd1HkJMSS1G/3jmmfWDV0XllC/uyHmcaIoiXzGw=; h=Date:From:To:Cc:Subject:In-Reply-To:References; b=QMyPIU42joDy+HDnBw+dgcKKIyvtruqbfbs2j67CxLuoCGIrmvPQ7MmQaeqMTvj8C Lvw3z0y0NfqMEY57T6XaZvbTaBml812RqtdN9CVJnZUx7qvdqA3kAsfvMd/Oycyh7d xfXjW7hPIHprnh6JOdZRWBap8UjdlroXjdRup9YQ= Date: Wed, 10 Jun 2026 13:33:25 -0700 From: Andrew Morton To: Samuel Moelius Cc: David Hildenbrand , Jason Gunthorpe , John Hubbard , Peter Xu , "open list:MEMORY MANAGEMENT - GUP (GET USER PAGES)" , open list Subject: Re: [PATCH] mm/gup_test: reject wrapped user ranges Message-Id: <20260610133325.617652c3639b27b131de8b8e@linux-foundation.org> In-Reply-To: References: <20260609004814.1240586.6294d614ac80.gup-test-range-end-wrap@trailofbits.com> <20260609182705.7b3a46e7c4661bd55f8561eb@linux-foundation.org> X-Mailer: Sylpheed 3.8.0beta1 (GTK+ 2.24.33; x86_64-pc-linux-gnu) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Wed, 10 Jun 2026 13:22:32 -0400 Samuel Moelius wrote: > > > start_time = ktime_get(); > > > - for (addr = gup->addr; addr < gup->addr + gup->size; addr = next) { > > > + for (addr = gup->addr; addr < end; addr = next) { > > > if (nr != gup->nr_pages_per_call) > > > break; > > > > > > next = addr + nr * PAGE_SIZE; > > > > Sashiko AI review identified a pre-existing possible overflow here on > > 32-bit machines. > > > > https://sashiko.dev/#/patchset/20260609004814.1240586.6294d614ac80.gup-test-range-end-wrap@trailofbits.com > > Does the __u64 or Sashiko AI point require action from me? Not really. The patch makes the code better, that's what counts!