Re: [PATCH v2 2/2] VMCI: Fix memcpy() run-time warning in dg_dispatch_as_host()

From: Dan Carpenter
Date: Tue Jan 09 2024 - 08:22:31 EST


On Tue, Jan 09, 2024 at 06:31:41AM -0600, Gustavo A. R. Silva wrote:
>
> You're arguing that fortify caused a problem.

Yes.

Before: Code working correctly
After: Kernel Panic

At first, I started to question if I was going mad, but then I looked
through the email thread and Harshit tested it and proved that the
kernel does actually panic depending on the .config.

I mean realistically we should backport this patch to old kernels,
right? And if we had to assign a Fixes tag to this it would need to be
the commit which adds Fortify to the kernel. Prior to that commit the
code was fine.

Again, I'm not saying that Fortify is bad overall. Probably in DnD it
would be Chaotic Good where it's overall good but sometimes a pain.

regards,
dan carpenter