From nobody Tue Sep 29 02:34:10 2026 Received: from mail-wr1-f47.google.com (mail-wr1-f47.google.com [209.85.221.47]) (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 372E635975 for ; Thu, 13 Aug 2026 07:07:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.47 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786604840; cv=none; b=q4WUO+05OiQ/9AGDIoiiXPlQs8S2fXZgw4/f7/CHrfwAG5Lr56KPKoap5V3TMBX40M5zdhF/6zZJ4RqjANxPZyibeB9nNFbO7NzUewmLVbVdTmFHTZQ9JVGit2iz4znsSRQOuas7gh/g76gqtynhhTxTqDh/gRi9cuBhOQe5VxY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786604840; c=relaxed/simple; bh=dvtVXTBpPANpd/CP6OTRiErgstDc7nass+eIVRqpM2U=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=IHWuhHKEo+KeRU9eUQiKfHr45jiCqyGzzFJBgTBUuEf0e8f9eNg9Aj2eIUaYeqxMHwG7bL0pD1qYV+7RRwDMi1raDuLb/Ll0GyT13J3vwYUQl9/0jtLt22TUuiH/m05lXFARHR9PABthyAgvzToksdmwxXaNX+2HsXZHIlohcFM= 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=fadki7i0; arc=none smtp.client-ip=209.85.221.47 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="fadki7i0" Received: by mail-wr1-f47.google.com with SMTP id ffacd0b85a97d-47f7854678cso1194401f8f.1 for ; Thu, 13 Aug 2026 00:07:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1786604837; x=1787209637; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to:content-type; bh=ZBJlGaBVvkoWha3BD37z+KADfrwniJqY/MnyXvUctT4=; b=fadki7i0Y/iDdU9nOAP1WnkAkrccMXUMFrfxDubxDklIPhVsC6MtGBiacoYjHhcvFh mC9AcoT86w3klN2X6Pv92nbbUUDPvwGYF66zeaY82vVsa+/Q4GlbK1feIO0eAtMgo5MH 7AylhU6PL1Ue9BuMWKq9zd9uZdy4I29BRhyHuQ/0I2H/+ltRMDmIijkjOgS3ltqMrSvq LLdijolQIjk/vnQopjQdOJuksUGjeSspiENe4QfV/oCctWKnDOmLBCnZDqxQ7gh9VfxG F8Vkj+jOnwKfiFZaRA+32hl9hAH92WdDqrbaeyyD76+i5ZXSSzeVEf1t+TmpWOWlkGNP yR6g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1786604837; x=1787209637; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=ZBJlGaBVvkoWha3BD37z+KADfrwniJqY/MnyXvUctT4=; b=iObFghjrNaDc0ejd9g7RW6RxWXdKR6d7aqYgoji+vjWJlvgj5+lp84/Nygg5GlC+m5 rv08oWMZftAjPuWDO6SC4C8wU3BlcmuOofBOmmwNIgmutRgRd9cR9k9meWvgqk+eqilE WzTTgosioi8WZDHo3FZ3v00flcNLF/9Nv3lHLC62eIrx+1jlR+6cTpjDXVPqR1DMKqrQ 0LSzET7INFW6xGnbfqtvOjjt5vXkaxRvjk5ozVeZWOBRts3T+eqQqn0S3zVYwBU2qrTi n5kfCpNrFws6LAOfisFuhMA6d2UoJhBCudXztK6xfTPPVlkuc15BSmG4tuHsJhkLwbHB RHSg== X-Forwarded-Encrypted: i=1; AHgh+Rplf7EUj6Uu2T3LT+R5CuME+BqNkT6T+AwM0PBY4RTI9ejtAEEcvLTj0E8ipqgL2m2tC7bs/eaaQWaEHSs=@vger.kernel.org X-Gm-Message-State: AOJu0YwO8aEGWrofEotQjMPszf0UJ925cElr/W3uBnNw8lMrWMBLgGvg ix8B33erPUvi7naC4DJuNR3sDMplRVGUJFa/7PmzkXs7yryYpffcL9pVOuV4tHIBu+s= X-Gm-Gg: AR+sD10kU1bJMjUGvwh8sINW26FcyjtCCcPtSUuEFN9nD2aXcIahwVXwhcyXyjnoXfz ZlB2OrtjG2139vxvH69pPcFcGVoOCiyYkqIG1t8BLJFIvtqI3oZId+ReWfah9xiW5g5a0O3r8sO 7/yxZdvJSOUTiMJD3/CddVGXScyXgbuvqmaVyJXG27JDdilOVoyHJbOcR1TTvx9gq+X7+QDdsWi 0nTqlqxjVPnIF1Bx4qaCpU8MsDCydwLfPte3/4KwNqN8MGJMq/E3gbyFU4ys8cg+GO4hVPY/iCC Kzm3A+e6OUdHDOpnq7arINGGRieCFa+ZSt7YM90TNud3tM8/o24bVjCknpg64Uj3zENJnhZ4g7D y2aV2IHhf75Ry1E4eTbeRmgLcoDHrKrfoJUwxE75q5et0jIfu+vRFpwBUkYTGVTYHb8D8yEy6iK teRpOhkvXNJE1anFWNm+wmBu6lq/xn6NdrpmYhYG7lNPNXeGrHzh801yUJ2lHx+SR/PqSk/Dmy7 tQ6+kxfcrJnhB3/0g== X-Received: by 2002:a5d:5e0f:0:b0:47f:f002:3652 with SMTP id ffacd0b85a97d-48159ec134bmr3193548f8f.12.1786604837294; Thu, 13 Aug 2026 00:07:17 -0700 (PDT) Received: from zephyr ([77.237.185.99]) by smtp.googlemail.com with ESMTPSA id ffacd0b85a97d-4815a569c1fsm3725870f8f.15.2026.08.13.00.07.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Aug 2026 00:07:16 -0700 (PDT) From: Ali Nasrollahi X-Google-Original-From: Ali Nasrollahi To: fuse-devel@lists.linux.dev Cc: miklos@szeredi.hu, linux-kernel@vger.kernel.org, Ali Nasrollahi Subject: [PATCH] fuse: ioctl: fix comparison in fuse_setup_measure_verity() Date: Thu, 13 Aug 2026 07:06:29 +0000 Message-ID: <20260813070629.248821-1-A.Nasrolahi01@gmail.com> X-Mailer: git-send-email 2.55.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Clang reports a warning in fuse_setup_measure_verity() in fs/fuse/ioctl.c when comparing the `__u16 digest_size` with SIZE_MAX minus the size of `struct fsverity_digest`: warning: result of comparison of constant 18446744073709551611 with expression of type '__u16' (aka 'unsigned short') is always false [-Wtautological-constant-out-of-range-compare] This was first observed while building an x86_64 kernel with Clang and W=3D1. Since -Werror was enabled in my build, the warning caused the build to fail. However, the same warning can also be reproduced with the same build options using tinyconfig with FUSE enabled, so this is not specific to the kernel configuration used in the original build. The comparison is between the 16-bit digest_size and a size_t-sized constant. Cast digest_size to size_t so that the comparison is performed using the same type as the size calculation. Signed-off-by: Ali Nasrollahi --- fs/fuse/ioctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/fuse/ioctl.c b/fs/fuse/ioctl.c index 3614ea603913..3487e30d997c 100644 --- a/fs/fuse/ioctl.c +++ b/fs/fuse/ioctl.c @@ -130,7 +130,7 @@ static int fuse_setup_measure_verity(unsigned long arg,= struct iovec *iov) if (copy_from_user(&digest_size, &uarg->digest_size, sizeof(digest_size))) return -EFAULT; =20 - if (digest_size > SIZE_MAX - sizeof(struct fsverity_digest)) + if ((size_t)digest_size > SIZE_MAX - sizeof(struct fsverity_digest)) return -EINVAL; =20 iov->iov_len =3D sizeof(struct fsverity_digest) + digest_size; --=20 2.55.0