[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <YoXGEckfSNWKj2oT@sol.localdomain>
Date: Wed, 18 May 2022 21:22:41 -0700
From: Eric Biggers <ebiggers@...nel.org>
To: "zhangjianhua (E)" <chris.zjh@...wei.com>
Cc: tytso@....edu, linux-fscrypt@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH -next v2] fs-verity: Use struct_size() helper in
enable_verity()
[Please use reply all, not just reply!]
On Thu, May 19, 2022 at 11:54:48AM +0800, zhangjianhua (E) wrote:
> Hi Eric
>
> The warnings in commit message are from the build log in Jan 2022, and I
> find these sizeof are still here, so I submit
>
> these two patches. I build the kernel just now and encounter the same
> situation with you, there are lots of warnings.
>
> Maybe you are right, there should be some mechanism to solve this problem
> completely.
>
>
I've updated the commit message and applied this patch, but not the other one,
as the other one wasn't actually dealing with a variable length which made it
pretty much pointless, as I mentioned.
If you'd like to look into making sparse enable this warning by default, I'd
certainly encourage you to do so. But it looks like the warning itself could
use some more work. It probably should only warn if the
sizeof(struct_with_flexible_array) is actually being added to another value, and
where that value is not a compile-time constant.
- Eric
Powered by blists - more mailing lists