Received: by 2002:ab2:6203:0:b0:1f5:f2ab:c469 with SMTP id o3csp2503082lqt; Mon, 22 Apr 2024 12:33:00 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXKm8jHFg++W0Qb7TQXM3uRWpHiA8uPAcbNb24PPBkMO/aH9Q8pVj4+4qgWe0Ue5YV0KOQCLl6eA7k60OJwVme8TpC4n8rw1UWKPrZGfA== X-Google-Smtp-Source: AGHT+IFIw5apYYPQmNI0YYpWkQ6a685mMu5rpimvJoYnlSpBMpMpgGlhHSm2Yo4Q8ZHIBLcl4wkB X-Received: by 2002:a05:622a:652:b0:435:882c:e9be with SMTP id a18-20020a05622a065200b00435882ce9bemr1215283qtb.14.1713814380407; Mon, 22 Apr 2024 12:33:00 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713814380; cv=pass; d=google.com; s=arc-20160816; b=Oq2iakwLnYWGIT4nutZa1K6MsWfxxBdNqNTI7aJSb8SlIJaMI1lfl3105Gv1MZ24WZ IqbFWDaLFyEaYQzVWOpo3WEbk5xBFIkcgu2WMmRIiTuIRriPgUd6Q/KyKqxLusgDt+ls ZeRd18vCc0tkbJDTFM6ivDuwQlvGW/zV1Es/xoF3St2Zm0D/6f2ei1MVTCjleXh0YNqf S+76skP/dHfv1Mj+CSHnY4FXWAi2O0Db56V8ScRSiLZRI1gUUvSvCT+41zZEydgeKcEV vsE3xMWvjrMf1S4b1txhEMeIFwFSOc00k27tvHBg4hIS8xGow+1e834/EWNe+tHoPn6G i03w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:subject:cc:to:from:dkim-signature:date; bh=lPjjI9hwHAjLZP2f1PBusI6x5sJtErhiveXDwtFT25I=; fh=P9fNWUTkgKcPvgVH809TwQEXvr7U4HI6NLk72DkvfVs=; b=hbQx2N045wWEKzsOlQwt+rLFxOrMtAI4AQi8LKrKGQWFxeyt9jHmWY3HHWHJgy8ef3 dEqcBzufI25eyJHeUBLi/n38yySsD1IXLuCs3ADjXA6uPZp0hsvzcEIBskky/11Yb3bO pthNrjW4TF5ickZQe3OIXqLNuOhwvIK3vawnOGYg9kuhcGSczj7erJfqxrPQlcBtnDXV Y/pClevFkFkCoMI9DO7Of68D8iHjYfYIcNKRu42twxjGJVSSgo4dpxXNWrUm8J6KZuIh c9K1P+KhvPpyQNiypOEV5vlDIZvyNO0gISwWW4dp9oya+DPbApl5a76x1rdEbK0Uxvl9 96cw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=SlxMTVOE; arc=pass (i=1 spf=pass spfdomain=linux.dev dkim=pass dkdomain=linux.dev dmarc=pass fromdomain=linux.dev); spf=pass (google.com: domain of linux-kernel+bounces-153922-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-153922-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id y9-20020a05622a004900b004377ccafd2csi8738913qtw.280.2024.04.22.12.33.00 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Apr 2024 12:33:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-153922-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=SlxMTVOE; arc=pass (i=1 spf=pass spfdomain=linux.dev dkim=pass dkdomain=linux.dev dmarc=pass fromdomain=linux.dev); spf=pass (google.com: domain of linux-kernel+bounces-153922-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-153922-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 251A31C20F79 for ; Mon, 22 Apr 2024 19:33:00 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id EC9B0155346; Mon, 22 Apr 2024 19:32:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="SlxMTVOE" Received: from out-188.mta0.migadu.com (out-188.mta0.migadu.com [91.218.175.188]) (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 CAB8215533F for ; Mon, 22 Apr 2024 19:32:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.188 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713814360; cv=none; b=cNRHweqo9vGjmkQzoCPpLTYcze7ITtZ2txeSGCB6+x0+rEvgkWM/WOvr1yv3nnDwhiY5Dbx7Xy8VK97sBzoLCLV4Jca3rRj7IvZytchpi1/0kUWjov1A2JcXZJzmYqtqr5jKZAgx9kvZMt2iI9euHHQsojZs2hSYmnbIq+byrbQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713814360; c=relaxed/simple; bh=8qj6kgnceGl/XWPqUbwu4wqOqoE/ev+jzoHS6K8BcYE=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=c5ipQ1gMhIXB5xfJJ/gYe5c+uJHluPP4nNZgik1mEijNDuXaT7JYFtaCz7tBu3TVfVaxY+DXGBOUr3qYPNdOSWxR43XQen5MnoOYYzVORJP+c5eR3gqdbMCs3NIw/l37RgSIA5CUV11XTcPnWmXz2QPJGTQwe+L7gOm/KTOYoZg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=SlxMTVOE; arc=none smtp.client-ip=91.218.175.188 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Date: Mon, 22 Apr 2024 15:32:32 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1713814355; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=lPjjI9hwHAjLZP2f1PBusI6x5sJtErhiveXDwtFT25I=; b=SlxMTVOEsHL/2PHJfSWTgNtE/JRqJhkxOZKFiRxzsmy9xUojDjeLtS4oTJNk+uqjn37uAn 4zSxwu61rPOr9yLzJGrQFfj3/6wblvKHMmGbUTNlfcpJ8bgrcUZh/Fbeq+glzPlAgGxKPs wkm6NkLKwQcrXrhVfemFA9ImPRtS+0E= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Kent Overstreet To: Geert Uytterhoeven Cc: Nathan Chancellor , bfoster@redhat.com, linux-bcachefs@vger.kernel.org, linux-kernel@vger.kernel.org, kernel test robot Subject: Re: [PATCH] bcachefs: Fix format specifier in validate_bset_keys() Message-ID: References: <20240416-bcachefs-fix-format-specifier-validate_bset_keys-v1-1-3ea2cdf28b12@kernel.org> 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=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Migadu-Flow: FLOW_OUT On Mon, Apr 22, 2024 at 02:47:32PM +0200, Geert Uytterhoeven wrote: > Hi Kent, > > On Wed, Apr 17, 2024 at 12:09 AM Kent Overstreet > wrote: > > On Tue, Apr 16, 2024 at 08:16:02AM -0700, Nathan Chancellor wrote: > > > When building for 32-bit platforms, for which size_t is 'unsigned int', > > > there is a warning from a format string in validate_bset_keys(): > > > > > > fs/bcachefs/btree_io.c: In function 'validate_bset_keys': > > > fs/bcachefs/btree_io.c:891:34: error: format '%lu' expects argument of type 'long unsigned int', but argument 12 has type 'unsigned int' [-Werror=format=] > > > 891 | "bad k->u64s %u (min %u max %lu)", k->u64s, > > > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > > fs/bcachefs/btree_io.c:603:32: note: in definition of macro 'btree_err' > > > 603 | msg, ##__VA_ARGS__); \ > > > | ^~~ > > > fs/bcachefs/btree_io.c:887:21: note: in expansion of macro 'btree_err_on' > > > 887 | if (btree_err_on(!bkeyp_u64s_valid(&b->format, k), > > > | ^~~~~~~~~~~~ > > > fs/bcachefs/btree_io.c:891:64: note: format string is defined here > > > 891 | "bad k->u64s %u (min %u max %lu)", k->u64s, > > > | ~~^ > > > | | > > > | long unsigned int > > > | %u > > > cc1: all warnings being treated as errors > > > > > > BKEY_U64s is size_t so the entire expression is promoted to size_t. Use > > > the '%zu' specifier so that there is no warning regardless of the width > > > of size_t. > > > > > > Fixes: 031ad9e7dbd1 ("bcachefs: Check for packed bkeys that are too big") > > > Reported-by: kernel test robot > > > Closes: https://lore.kernel.org/oe-kbuild-all/202404130747.wH6Dd23p-lkp@intel.com/ > > > Closes: https://lore.kernel.org/oe-kbuild-all/202404131536.HdAMBOVc-lkp@intel.com/ > > > Signed-off-by: Nathan Chancellor > > > > Thanks, applied > > This is still not fixed in today's linux-next, while the issue is now > causing breakage on several 32-bit defconfs in v6.9-rc5. Apologies, I just neglected to update my for-next branch, it's in now.