lkml.org 
[lkml]   [2024]   [Jan]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 2/2] VMCI: Fix memcpy() run-time warning in dg_dispatch_as_host()
On Wed, Jan 10, 2024 at 04:03:28PM -0800, Kees Cook wrote:
>
> Oops, yes, thanks for fixing my confusion. Right, this is a direct write
> across members into the flex array, not a composite destination. Yay
> all the corner cases. :P

Is there a document somewhere which explains what will trigger a runtime
warning? For example, if you write across members but it's not into a
flex array does that cause an issue? Or if you read across members?

For example, this line reads from bulletin->vlan and
bulletin->vlan_padding. This causes a compiler warning in Clang and
GCC depending on the options but does it also trigger a runtime warning?
https://elixir.bootlin.com/linux/latest/source/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c#L2655

(I wrote a patch for this a few months back but didn't send it because
of the merge window. I forgot about it until now that we're in a merge
window again... :P)

regards,
dan carpenter

\
 
 \ /
  Last update: 2024-01-11 08:16    [W:0.100 / U:0.320 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site