Thread (20 messages) flat view 20 messages, 12 authors, 2016-08-25

Re: net: Zeroing the structure ethtool_wolinfo in ethtool_get_wol()

From: Eric Dumazet <hidden>
Date: 2016-08-23 15:38:30
Also in: lkml

On Tue, 2016-08-23 at 08:05 -0700, Joe Perches wrote:
A compiler does not have a standards based requirement to
initialize arbitrary padding bytes.

I believe gcc always does zero all padding anyway.
I would not worry for kernel code, because the amount of scrutiny there
will be enough to 'fix potential bugs' [1], but a lot of user land code
would suffer from various bugs as well that might sit there forever.

[1] Also, most call sites in the kernel are using same call stack, so
the offset of '1-7 leaked bytes' vs kernel stack is constant, making
exploits quite challenging.

Even if the current standards are lazy (are they, I did not check ?),
security needs would call for a sane compiler behavior and changing the
standards accordingly.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help