Received: by 2002:ab2:b82:0:b0:1f3:401:3cfb with SMTP id 2csp737784lqh; Thu, 28 Mar 2024 15:05:12 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUN+xdFFhAiMDDBMazFj28apbXEvuL1ki48PznBgSXaCxQzx3odFIoViB3r27rrPlolj6MvyzJfuCDMmC/9Uyhg+YsJ5+tbcBKQAdTg0w== X-Google-Smtp-Source: AGHT+IGGJCsmshO5Q1weBWFztPHgnRCARbKW/lSLa2dVQ3JPxIxao6neSIsLz1rnObY5TAE6qBWC X-Received: by 2002:a17:90b:3b82:b0:29d:d995:48c0 with SMTP id pc2-20020a17090b3b8200b0029dd99548c0mr737239pjb.48.1711663511921; Thu, 28 Mar 2024 15:05:11 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711663511; cv=pass; d=google.com; s=arc-20160816; b=oycvVbsGbGZTXKgRyroirjszNu5CfPmZlNqvExf95tM9ZTtOq0FccwycCPQvmpFY0q m8tmnVtDXPQf1ytAY2TeZEYYTikI8Khx5pqQ1YrA67UeqxEczcSPfszeXQej0snYBcPR SWYCaVG+rPZYu15yfXxXMfHEHnuuOYMMz2qnDgqi7jR13ubrii910lfNVVuvewdl4yW1 HizO5wk3fwnZPP+y79LbKU4MV6sqiKTuwX7Fo4DDO+11bj0wAm73y29S2ZIyDfRaW5zN LE02KR5BhDEhOHinGhVH2oIBjTbZcpLzvvUq5Vct8QmWN0I7geV4/wQYzLPDpX0Jbmdq KLeA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=MGMxoG8AQ8BGP67PTNjLH3VS7bl1OwfTgMURF7OtwG4=; fh=5+rvhM0A1WUXgLi8RHU+8jF2UheEaXhbVXeJrlZfFRE=; b=OJWLoMhH4Ix6qKBKrI3YGs96hJ1T+ua4ocYETdOJsBazlOCfC9icSbLFr0DE6LORbl Mp5nlYkZHU/yEcOcVcQAXwEQKJJQeA4ZcoJ1XRk1UtRVKVSezVV6wK+Yv4PtkR/+0Etl VbVE6Kp/Ug56BVaUih2sKVPCvct14imVMfXJSguF0KXASDZZ9IvywTzkqY2mn1o5MSBG 6hmAX64POzf2PGnFnIq49pjnbZxAGNnhd7Ub3eycM4WO/UhP7QeehM3yC9ENTtfmC8d9 t4Eq1fN2HlGcGj1PG1RDInXK70XfmA5gYvFvND4LZDD9SVo9vvPHIFwZi8ESGicuXOMV DivA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=3e9R8CFY; arc=pass (i=1 spf=pass spfdomain=google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-123701-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-123701-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id z7-20020a17090a66c700b0029dfbdc8161si4430752pjl.176.2024.03.28.15.05.11 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Mar 2024 15:05:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-123701-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=3e9R8CFY; arc=pass (i=1 spf=pass spfdomain=google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-123701-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-123701-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com 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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 907F72909EB for ; Thu, 28 Mar 2024 22:05:11 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 886E513B595; Thu, 28 Mar 2024 22:05:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="3e9R8CFY" Received: from mail-ed1-f42.google.com (mail-ed1-f42.google.com [209.85.208.42]) (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 305FC13173E for ; Thu, 28 Mar 2024 22:05:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.42 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711663504; cv=none; b=UUJxBGk8XdB0ShHQvY6j1Z/h2/ORW+PihQ5Pg+2rftoiHbbUu1CjW+cgD+1o6C/nBwNTnWlhPC2s08CTfbEKA/Zm4/VY3OyER1LEkUf8X4n9ivBil636z8qvwg6Ffva9ZBSuwNMiBVPu7i7RDku2s4EPoBFad0DBkhVD+Ry95iM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711663504; c=relaxed/simple; bh=9ZSPvENfmgfhIsnuJFWhvL6BmUkVhFz5PSQ7INGUgHQ=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=P1Z/yfD1RankBlPeAiTs1QEqrjJijMJehfn8Qw9NXdCwaLZucOSjlziUzzMt/pjhDme0uIKMUcjTyejKDqHwgDe2LUEgy66LmZduaIUpIyCmpKLDMVkETDyIBtn/yTFO7rHAVaH2hgllq2oS6V4EK4ZZ8ikgPiDi8eArybS2dOY= 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=3e9R8CFY; arc=none smtp.client-ip=209.85.208.42 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 Received: by mail-ed1-f42.google.com with SMTP id 4fb4d7f45d1cf-56c404da0ebso2248876a12.0 for ; Thu, 28 Mar 2024 15:05:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1711663501; x=1712268301; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=MGMxoG8AQ8BGP67PTNjLH3VS7bl1OwfTgMURF7OtwG4=; b=3e9R8CFYk4xjW7QBhCdJc/gM8mLEfGvLcbf051vzhpu2zFvFzZX0urTkZ6D3i9795p 29DbUncFM+7y1IktSL96E1UC5aMZlFJnO0g6C9vb9wIqcsVtNxCMXqMpSV2n/q+ecnzv pYmuMpikZ9fkSnRWZMhYqQAl51UYAnQeMul8Jyjp2vlvxdRmX0Iyyd4EA0qi+XcFUxG4 rT6uKbHEHvYaEsI+nhXf2DR5WZclKPXe9/tV37YTK9Z3CQVu4kVQMmizqwbkVfBoDvIg CZmjqR9MuDLE9xf4gftr5D33nqTy1cuyuHeF+ZBzWix/r5u70eh3ACzKBJ3uTYcMYgTp ibuQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711663501; x=1712268301; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=MGMxoG8AQ8BGP67PTNjLH3VS7bl1OwfTgMURF7OtwG4=; b=Ljf/gtr+BTCNb1gS/AtdIeGrXGsjlsYu0H7N1Sdfls/m9gFhaDhjJXM6Ja1TpC8YR6 gWGPsPYWJ7Aup6A5c7UzYthhb6/HsGIO4tYB+FjIqVLapne7MpOX3VMZTrUyCKeXj1Y4 sPGAFRMdO7Ufe39MEugA7VBFQWnntBWQXjzdkO90Yk0PIRoh5zqtFmzFYLOjpEVH3dDQ FBvw8trn56kPoNdxyrT4LrZW+LB3/r/wRKhKP9/6EvTjwHKij5iHup/kz+hJGbtli7VI ow9EjG8szbObl2/LKwsSv5ANvjmzYfYSxotNZakBPoXb/tvVYivQYvGX5kwNeytm88Yt swfA== X-Gm-Message-State: AOJu0YzlKKCcwCgU9VfJqAy0UWA01ZmlcPU8VKUknJRx4pQj9LDbaPf8 G7/HgFWfk6GYp6dKoOUEH++ir6/N2NwoZk5zu8OD8Nen3sqPx3ZzguTJdDrrR20zSHfcEQJ97Gg H11HiFUvXbM+IGGQk8k9DtpVQqUDEt38dSWXnyaB5zWPx6lpDpbHt X-Received: by 2002:a05:6402:35ca:b0:56c:2ef7:f3ed with SMTP id z10-20020a05640235ca00b0056c2ef7f3edmr442959edc.35.1711663501455; Thu, 28 Mar 2024 15:05:01 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240328143051.1069575-1-arnd@kernel.org> <20240328143051.1069575-7-arnd@kernel.org> In-Reply-To: <20240328143051.1069575-7-arnd@kernel.org> From: Justin Stitt Date: Thu, 28 Mar 2024 15:04:49 -0700 Message-ID: Subject: Re: [PATCH 6/9] nilfs2: fix out-of-range warning To: Arnd Bergmann Cc: linux-kernel@vger.kernel.org, Ryusuke Konishi , Nathan Chancellor , Arnd Bergmann , Nick Desaulniers , Bill Wendling , Andrew Morton , Philipp Stanner , Christian Brauner , Jeff Layton , Thorsten Blum , linux-nilfs@vger.kernel.org, llvm@lists.linux.dev Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, Mar 28, 2024 at 7:32=E2=80=AFAM Arnd Bergmann wro= te: > > From: Arnd Bergmann > > clang-14 points out that v_size is always smaller than a 64KB > page size if that is configured by the CPU architecture: Is this only with clang-14? > > fs/nilfs2/ioctl.c:63:19: error: result of comparison of constant 65536 wi= th expression of type '__u16' (aka 'unsigned short') is always false [-Werr= or,-Wtautological-constant-out-of-range-compare] > if (argv->v_size > PAGE_SIZE) > ~~~~~~~~~~~~ ^ ~~~~~~~~~ > > This is ok, so just shut up that warning with a cast. > > Signed-off-by: Arnd Bergmann My question out of curiosity aside, Reviewed-by: Justin Stitt > --- > fs/nilfs2/ioctl.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/fs/nilfs2/ioctl.c b/fs/nilfs2/ioctl.c > index f1a01c191cf5..8be471ce4f19 100644 > --- a/fs/nilfs2/ioctl.c > +++ b/fs/nilfs2/ioctl.c > @@ -60,7 +60,7 @@ static int nilfs_ioctl_wrap_copy(struct the_nilfs *nilf= s, > if (argv->v_nmembs =3D=3D 0) > return 0; > > - if (argv->v_size > PAGE_SIZE) > + if ((size_t)argv->v_size > PAGE_SIZE) > return -EINVAL; > > /* > -- > 2.39.2 >