From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pl1-f176.google.com (mail-pl1-f176.google.com [209.85.214.176]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B29062E427F for ; Thu, 13 Nov 2025 15:01:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.176 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763046094; cv=none; b=CPdXO4qnJu6hhbMRoOMlko4Ng2YQUq+jQTaxvQFvDWUMo00xDxYZ4fbSKvs5Gzc1zSdC8Cq21PJM9LkEaDDvolgD3EKWXADZUuXSKxhsXH3aHWE+N7ZLGmPIchFPjBqfB8FqM0KUmEbyjjPcVHB62m9hQVIWkTVes3sWiuDsjNM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763046094; c=relaxed/simple; bh=dXd4PrP+M4ZkZTjQ91QC0jeAdSuL5P8/tUammlUtrPw=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=H955PEuQfed0JXLQgyJxtt4Cv2Y7lQXdiUWnfHjmM2lvEIJTDzk1POKD2WXPJHdz3mR835F+Wk6/mvLO8zy3cSFEirDuLJHFDsUEDyyEu7bozXcqlJQkBjXyT4J0s6q8dlWobjSO2QbbpANRpi4ZzdXAlaYru82BRWop23tSecY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=xYgZo5a4; arc=none smtp.client-ip=209.85.214.176 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="xYgZo5a4" Received: by mail-pl1-f176.google.com with SMTP id d9443c01a7336-29852dafa7dso183045ad.1 for ; Thu, 13 Nov 2025 07:01:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1763046092; x=1763650892; 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=W/SziGgu+jV7pu6XCcGhbgmOS9AguhsMW+n+l2AM6CI=; b=xYgZo5a491KRNaSZCmiA51VIoWHaUSoEXXq8Z/bsfz6amdgX/ctLoOkxCfpvkyr2ce 4pIxaoQz4whPzqLDih0pb4if6sR+coYc5grEQeA6yyCYt50kc4wlRZqVNK8ZyhdjCTE2 NymkQ37p3MD2i5Beg5xDm81ybru21zqtUhWW4JyoA8UjAiMfwBvZ6LCEwiJqUkPI4yWd LColjANHGazq8CYeraxAUofl8P1RiRc77WPc1VOOuwzluyX5zjIkdT8sZrYk8KZZlbaF mfo8E5tYesy/twPqXBHPomOQ2HoX8BZcfhU6eqO5idffx8NitV4JA5MjF5oCvOQqfNUE ZXiA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1763046092; x=1763650892; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=W/SziGgu+jV7pu6XCcGhbgmOS9AguhsMW+n+l2AM6CI=; b=oQtj2G6Dj/kn7CoMeYuLgMogFmUKlnL/15/ZyjoIFwCGhz39srgUpoiavQHaISv4aq 18Ca+NXpoEkzj8ub1F5jKBC05DQYUPGuQ6f89hvqG3JDGMTIwDcy2FPXOAgEZVi0SFXN uKrMuQ/foi2f3luWXMFjMMI+mX3qS8LFuflOtsTc3upPImknZ2Ngik3UxWScZRQVCHDV ALVlk+z6XoYyl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:903:41ce:b0:297:eadc:3cd5 with SMTP id d9443c01a7336-2985c45434amr4335235ad.15.1763046091379; Thu, 13 Nov 2025 07:01:31 -0800 (PST) Received: from google.com (116.241.118.34.bc.googleusercontent.com. [34.118.241.116]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2985c245f8asm28347325ad.37.2025.11.13.07.01.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Nov 2025 07:01:30 -0800 (PST) Date: Thu, 13 Nov 2025 15:01:25 +0000 From: Carlos Llamas To: Lorenzo Stoakes Cc: "David Hildenbrand (Red Hat)" , Andrew Morton , Peter Xu , "Liam R. Howlett" , Vlastimil Babka , Mike Rapoport , Suren Baghdasaryan , Michal Hocko , Shuah Khan , Ujwal Kundur , Brendan Jackman , kernel-team@android.com, linux-kernel@vger.kernel.org, stable@vger.kernel.org, "open list:MEMORY MANAGEMENT - USERFAULTFD" , "open list:KERNEL SELFTEST FRAMEWORK" Subject: Re: [PATCH] selftests/mm: fix division-by-zero in uffd-unit-tests Message-ID: References: <20251113034623.3127012-1-cmllamas@google.com> <4a60a703-d9c2-46a8-83b4-a7ecff7f6ba2@lucifer.local> 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-Disposition: inline In-Reply-To: <4a60a703-d9c2-46a8-83b4-a7ecff7f6ba2@lucifer.local> On Thu, Nov 13, 2025 at 09:54:37AM +0000, Lorenzo Stoakes wrote: > On Thu, Nov 13, 2025 at 10:06:42AM +0100, David Hildenbrand (Red Hat) wrote: > > On 13.11.25 04:46, Carlos Llamas wrote: > > > Commit 4dfd4bba8578 ("selftests/mm/uffd: refactor non-composite global > > > vars into struct") moved some of the operations previously implemented > > > in uffd_setup_environment() earlier in the main test loop. > > > > > > The calculation of nr_pages, which involves a division by page_size, now > > > occurs before checking that default_huge_page_size() returns a non-zero > > > This leads to a division-by-zero error on systems with !CONFIG_HUGETLB. > > > > > > Fix this by relocating the non-zero page_size check before the nr_pages > > > calculation, as it was originally implemented. > > > > > > Cc: stable@vger.kernel.org > > > > Do we CC stable on unit tests? From my recollection, no. > > Yeah please let's not. Oops, I keep getting confused about this Cc stable thing. Please let me know if a v2 dropping the tag is needed. -- Carlos Llamas