From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-ej1-f43.google.com (mail-ej1-f43.google.com [209.85.218.43]) (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 01C84285C84 for ; Thu, 22 Jan 2026 12:08:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.43 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769083734; cv=none; b=X/3+vYzIL9c7z5G//3DoSQxse6wG9mJEuOVZZsC97+3ZvAy7qCq7/MnB34O5VMvJwCJ9qIUK8Iknoznt8wuSlPjkE3tVc1pOax5PzmSfpiHYDzdCYq0zmkTPXz3bp1Ctt0TGcl2wq8nxVi3EvLPtfxGVpSiC1s8ZaZUEgyMSHz4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769083734; c=relaxed/simple; bh=Luz8B2TwJRarH7eRwBAhfKkOBXwfgblGcy0Dgye670E=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=n/toNNPSojl7bkgoz1EfBFOi8wuoas3aWJgcILN5Ufx5JQVXT5167sY0jWyJ2xGC9lrWqhlt/saLGE8C0agR9xIf/qo1sOSeAEoozYxBA0eO/w1/2aR6aHB/nW7wR00uNC7G8+37sa3rYcrdHb1EaTMBxsLuEeQAnJf5RX0tLsE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=cVb+tZjt; arc=none smtp.client-ip=209.85.218.43 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="cVb+tZjt" Received: by mail-ej1-f43.google.com with SMTP id a640c23a62f3a-b79f8f7ea43so38430966b.2 for ; Thu, 22 Jan 2026 04:08:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1769083731; x=1769688531; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=30EptBzNKREQjciAE94dkKi4CBlW2pcTBovWP9se6eo=; b=cVb+tZjtOByjTUrDLA0oN+jNQaugB0oPULnTz65qyHnzO8lPZWjA65+waKUq1pP4q0 edP0Cw/8TV+vHecYL+BHtCJkSCEi1iHDoY5jNj5isvjOVwz9nSmNJDiRb+way53iFyDJ 0WWjdGe4HBaZ4d+P+L3Or3TrDhM6F+WTsfL+N6Qwo6JNGtGZyBtNFKeFDTTFY7dEfSNu hREbGr9yott5OmgZbFQZaumLumLLQBioayfEddyVhwe7ZlSHz3EzYz3hk4JLDre+xcQ1 MY1IbthnEML7vzEnfLXd+1YRFAwKIUYHxkJKSG6yBeIgmZ28NOQgwke8j/q8/ztsmFhP syHg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1769083731; x=1769688531; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=30EptBzNKREQjciAE94dkKi4CBlW2pcTBovWP9se6eo=; b=UanxrROWNLOFP6gRPUpayfDKzSJ31EGo5v5LHaT5CiKxEraWHXngi8JkcFkZ1hjofu OoZZA+7xNahjBjdI1Q+IYjMHGdxNA6fFvVLXsvDZr/N3OD17IHh9pqgmaFqzt0uTmk8M W34y3Rw8hnw8JsOu3bbdBJ4B4r5xA9qMVpZ92KgUKZmUw+L66TdGJVOGAlt7JvdwERN0 YFrB+0LsM86ck6QK5W/5IIh2H8gLslNstpuUVkPT5LiWmq6MpefHyFi8wlNbQSwkx3Tb un0mSvHlUrH8huQCd4JuCnOSd6GpxX0vov2d8VyRiOceLGNWyELKu2o12XvW9ZGwPr2s /D2g== X-Forwarded-Encrypted: i=1; AJvYcCUQw6dHmwKs35I19N2xyIN1uacUAOum6abmZo8k31+yF3kyLHMVTac/s2dMRVRnxc1PEnDl8C9ljm9A6O0=@vger.kernel.org X-Gm-Message-State: AOJu0YwGE9pqz6/mUvujbmd9Rk0GcMvogIDdmdNMjTxW1wn6Q4hdzmld ZCIPyD1HfrYu1V29bpmsU+sj7qNQtlh5ffqbZsES2ALIGIhXfzcO/G8H6tG4PA== X-Gm-Gg: AZuq6aIfKJHQJxmHpJwPl5eP2Xv6v0hl/TpPYU8jaBIaUh+4ktgkTtqj2tmt4q//l6U 5/Iopb72zgv4b4C6S3GWBX5VZViZhWhDvkNH0d0IWYcAavcGptMogKOwI5ykgJiDZLkyX/iKQUt v1UmQx47LcaYMBntAll9oUbbtC17ZHXhitCf2fp9EjoeGUwxTI4fR44uKLjn77s5VqJ5ZtVJvSE 55lE9kEELSPwQSeu3uuKaXhshvy8zXcXPPaR2CBdTvpdJa/zTn0FTzDOFp6ecXU7mTPnjmQVFTt T84drEQPMYOIp13M+SU5mNP6V5RVSY/dklphJ/7cgGPo2CGrLxk//TRujph41kU7WKIRWHLJtS7 Dk8KbFET+WEROszG0OFsxmL8FKZuTWs/ciZOYVxQLi1lmISXHr85IaMhUx3vbkNrGTY5Arch7Oa yH1J110W5DvRagF8hoQUZoaYn2MfWQdzeAeNYfCsAkPbPxKkySUe1U X-Received: by 2002:a05:600c:5299:b0:477:a9e:859a with SMTP id 5b1f17b1804b1-4803e7e859dmr122557745e9.22.1769077556776; Thu, 22 Jan 2026 02:25:56 -0800 (PST) Received: from pumpkin (82-69-66-36.dsl.in-addr.zen.co.uk. [82.69.66.36]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4804706ef6csm51088835e9.15.2026.01.22.02.25.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Jan 2026 02:25:56 -0800 (PST) Date: Thu, 22 Jan 2026 10:25:54 +0000 From: David Laight To: kernel test robot Cc: Nathan Chancellor , Greg Kroah-Hartman , Thomas Gleixner , Peter Zijlstra , Ingo Molnar , Mathieu Desnoyers , Arnd Bergmann , linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org, Yury Norov , Jani Nikula , Vincent Mailhol , Andy Shevchenko , Kees Cook , Andrew Morton , oe-kbuild-all@lists.linux.dev, Linux Memory Management List Subject: Re: [PATCH next 11/14] bit: Strengthen compile-time tests in GENMASK() and BIT() Message-ID: <20260122102554.1cc7a2a3@pumpkin> In-Reply-To: <202601220829.MgTMeqqN-lkp@intel.com> References: <20260121145731.3623-12-david.laight.linux@gmail.com> <202601220829.MgTMeqqN-lkp@intel.com> X-Mailer: Claws Mail 4.1.1 (GTK 3.24.38; arm-unknown-linux-gnueabihf) 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 Thu, 22 Jan 2026 09:11:53 +0800 kernel test robot wrote: > Hi, > > kernel test robot noticed the following build errors: > > [auto build test ERROR on next-20260120] > > url: https://github.com/intel-lab-lkp/linux/commits/david-laight-linux-gmail-com/overflow-Reduce-expansion-of-__type_max/20260122-013456 > base: next-20260120 > patch link: https://lore.kernel.org/r/20260121145731.3623-12-david.laight.linux%40gmail.com > patch subject: [PATCH next 11/14] bit: Strengthen compile-time tests in GENMASK() and BIT() > config: s390-randconfig-001-20260122 (https://download.01.org/0day-ci/archive/20260122/202601220829.MgTMeqqN-lkp@intel.com/config) > compiler: s390-linux-gcc (GCC) 8.5.0 > reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260122/202601220829.MgTMeqqN-lkp@intel.com/reproduce) > > If you fix the issue in a separate patch/commit (i.e. not just a new version of > the same patch/commit), kindly add following tags > | Reported-by: kernel test robot > | Closes: https://lore.kernel.org/oe-kbuild-all/202601220829.MgTMeqqN-lkp@intel.com/ > > All errors (new ones prefixed by >>): > > In file included from arch/s390/include/asm/bug.h:60, > from include/linux/bug.h:5, > from include/linux/mmdebug.h:5, > from arch/s390/include/asm/cmpxchg.h:11, > from arch/s390/include/asm/atomic.h:16, > from include/linux/atomic.h:7, > from include/asm-generic/bitops/atomic.h:5, > from arch/s390/include/asm/bitops.h:75, > from include/linux/bitops.h:67, > from include/linux/kernel.h:23, > from net/core/page_pool.c:10: > In function 'netmem_clear_pp_magic', > inlined from 'page_pool_clear_pp_info' at net/core/page_pool.c:721:2: > >> include/linux/bits.h:35:4: error: call to 'GENMASK_INPUT_CHECK_FAIL' declared with attribute error: Invalid bit numbers ... > include/linux/mm.h:4641:27: note: in expansion of macro 'GENMASK' > #define PP_DMA_INDEX_MASK GENMASK(PP_DMA_INDEX_BITS + PP_DMA_INDEX_SHIFT - 1, \ This might be a real bug. The bit of mm.h is: #define PP_DMA_INDEX_SHIFT (1 + __fls(PP_SIGNATURE - POISON_POINTER_DELTA)) #if POISON_POINTER_DELTA > 0 /* PP_SIGNATURE includes POISON_POINTER_DELTA, so limit the size of the DMA * index to not overlap with that if set */ #define PP_DMA_INDEX_BITS MIN(32, __ffs(POISON_POINTER_DELTA) - PP_DMA_INDEX_SHIFT) #else /* Use the lowest bit of PAGE_OFFSET if there's at least 8 bits available; see above */ #define PP_DMA_INDEX_MIN_OFFSET (1 << (PP_DMA_INDEX_SHIFT + 8)) #define PP_DMA_INDEX_BITS ((__builtin_constant_p(PAGE_OFFSET) && \ PAGE_OFFSET >= PP_DMA_INDEX_MIN_OFFSET && \ !(PAGE_OFFSET & (PP_DMA_INDEX_MIN_OFFSET - 1))) ? \ MIN(32, __ffs(PAGE_OFFSET) - PP_DMA_INDEX_SHIFT) : 0) #endif #define PP_DMA_INDEX_MASK GENMASK(PP_DMA_INDEX_BITS + PP_DMA_INDEX_SHIFT - 1, \ PP_DMA_INDEX_SHIFT) I've no idea what the values are, but the 'hi' bit number must exceed that of 'long'. The __ffs() probably stop it being an 'integer constant expression' making it just a 'compile time constant' - which I added a test for. David