From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f49.google.com (mail-wr1-f49.google.com [209.85.221.49]) (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 C8BB037BE6A for ; Tue, 18 Aug 2026 16:15:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.49 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787069725; cv=none; b=ffMD19JRAkQnDCdR2i1N/cIjH/Jhg92ugLa8M1Uru+HPS5H9zn0rVsL9FC5g5J2UQwlcH4gy1u6G0gnxaaKqDgjm4Plc73X1RBUlDmPxsSWr1TQzv6nmAOtpVGJzCdXEgCkctgX/Sw/51PiTuwU56ThWEBDvA+8GP06vR1o6GwI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787069725; c=relaxed/simple; bh=lqkjQx0GBNMG/dbeORl0o1WejkKeSDQDF8BXi5ToavI=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=YzrvJM26e9jJ1SPj7CbggWnTqeqVbGzJYmkBacvpsv9fuwTWLucuNN7FqAtG/Z15e9ZWQkXF8gINJF0RLxjp59ZUs/3Gqrqxeci0RMI0jY0Mkq+9IeDWo9xwp0RJEXEEctWLNIU9/syG7/WG2vmDPxhCxhzjPI8DF1X/Xz7rE6s= 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=PA9mHbNI; arc=none smtp.client-ip=209.85.221.49 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="PA9mHbNI" Received: by mail-wr1-f49.google.com with SMTP id ffacd0b85a97d-47362928f65so4623718f8f.2 for ; Tue, 18 Aug 2026 09:15:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1787069722; x=1787674522; 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=734qIppHPdtYriCq/CbaL7dXPKVISQF4t6KKfHcwQ+I=; b=PA9mHbNILD0YkXzqWdUD7sRQ76j55Mwxug5LQ9M0GZ+lsIx4ff/wvqXhQ2lE38ofZ+ AYwWgsfd+eDxBKh3zlc9zwux/FCn5qC46bpfVHMYZkj2vfc+pd5AY/zk/oV+vidKLiUI Ja6iBK8ZFF0PcWifwDT0u8jJ06Yp1ap19B0bHgQJgiaKVEefMkQ0eg3z8BKMiWKYruEZ mTG7STTIBJxLC7i5mxrkpUo90KEPG1LZv3Qse4Yvs8COCkLNjkn1/Dx3ZqK5PBIKokRF iD0eIyCw7iGc7U0yE4IIKGf2jm7/uqZH9xzeB8wWUH7WGxTcjSnoPyUkh9j+s+Df31i/ ReTw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1787069722; x=1787674522; 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=734qIppHPdtYriCq/CbaL7dXPKVISQF4t6KKfHcwQ+I=; b=Sez84ldKzurEHoTP4sH8p6biklvIJrvlQMG2ds7bohxJcw5oxtGHGmM7ljso1Hjj78 TJ++N2ingi3IR5NIc5V77jgl+ujoVIbxiR4RD30aK7vRiwfhbKZx3ZcxHNnxDLxO0Z4k eXWFc9oUu9cqC+vZqvbkQQBnOBlU96s4nqQ9uVpZHip4zgx7WpVDRz9MM7o+gXDtQovE xIRvmaxlDPJNeLNInAF0eTqZ0Ru65idnmKhE6U/YU8XhD+m1xdNDZTOl0EGLUDWvL5jv F9vN6JS3cIuy1piZNzdY5WV4sIE0DShxbg8dGTKVWJfPInOte2rrvFi0XSd1pIO2RtLN 0mzg== X-Forwarded-Encrypted: i=1; AHgh+Rq0u6siinxLswNUgQgNtR3XaVrr1HkQ9+yPuA5qKo/7bu8Ral2HP9j5ZbOEXUJQxdhRZAM883M1BMLo4K0=@vger.kernel.org X-Gm-Message-State: AOJu0YxZEJSu0rDLwua/xofYwYzaknzUEqzTIEbI8P5CvvM2ObNuXO9Y 7ZEaLWcIcXv1bK3m55+vh3ukXZA/k9YIgaF6xwzy9yZ8rrZV1+Py2/yu X-Gm-Gg: AR+sD12eB0QFbc4nVqW4eNW8DcdZE7EOC9ldRpTJw4a1q3zzi1AFcphRxFDPErfgWJQ /1c5trH2O109AWC4lQavqAHrzXmYgpTSqb1dEnjWwq7Jj0vArXkilErIfXezyS4f9CaDkXCum1A Yp8YsrZ684Fka42DyL5qS+ombYJtDxuFfmqcgw+SpJR08vDKqSo8tNeZpd089k+YBTIARVCK90u BB8dvAMoN2Z/zITHcxR91hEZay/P1FtGra4+pNhuLt/Xy9KfHDhAys8i1D69XJuamxtKvl0fG0O ywvNQd64ZTKNAZotIMB0yxchZdMoISfQIyOAlth/+Wsm2sp9PtN6NpCw9uV5taTNRtG4VQPvfpJ eoID4nE5QYS6NDXkXKnpbZtcIYP8alyHrLGrSTe/Qr8pRbKt6uRMXEc/yMgYQUlDFqsA0sVvHmX TLJivOFV2jN6J4YAU4UwC0ITvdowsgT3o3LMMbLWHALnbIIRz+5u3BNCy1hl4Le2FD7Tfc8bqLa Sb1z4SfH9muRht07es= X-Received: by 2002:a05:6000:29cf:b0:482:9a18:d753 with SMTP id ffacd0b85a97d-482a905a817mr12231980f8f.5.1787069721877; Tue, 18 Aug 2026 09:15:21 -0700 (PDT) Received: from zephyr ([77.237.184.107]) by smtp.googlemail.com with ESMTPSA id ffacd0b85a97d-482a5b7cd38sm14060378f8f.32.2026.08.18.09.15.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 Aug 2026 09:15:20 -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 v2] fuse: ioctl: remove unnecessary comparison in fuse_setup_measure_verity() Date: Tue, 18 Aug 2026 19:44:48 +0330 Message-ID: <20260818161448.51495-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: 8bit Clang reports a warning in fuse_setup_measure_verity() 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=1. Since -Werror was enabled in my build, the warning caused the build to fail. 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. Since this comparison cannot be true, remove it. Signed-off-by: Ali Nasrollahi --- Changes in v2: - Remove the comparison instead of casting digest_size. --- fs/fuse/ioctl.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/fs/fuse/ioctl.c b/fs/fuse/ioctl.c index 3614ea603913..dc3a188f5d72 100644 --- a/fs/fuse/ioctl.c +++ b/fs/fuse/ioctl.c @@ -130,9 +130,6 @@ 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; - if (digest_size > SIZE_MAX - sizeof(struct fsverity_digest)) - return -EINVAL; - iov->iov_len = sizeof(struct fsverity_digest) + digest_size; return 0; -- 2.55.0