lkml.org 
[lkml]   [2017]   [Oct]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [Part1 PATCH v6 02/17] x86/mm: Add Secure Encrypted Virtualization (SEV) support
On Mon, Oct 16, 2017 at 12:46:20PM -0500, Brijesh Singh wrote:
> sev_enabled lives in .data section and looking at the objdump it seems
> to initialized to zero. So, I think its safe to remove the initialization.

So I'd assume that static means it gets cleared to 0 automatically, even
if it is not in the .bss section. And Tom put it in the .data section to
protect it from the .bss clearing later.

To quote the C99 standard:

"If an object that has static storage duration is not initialized
explicitly, then:

...

— if it has arithmetic type, it is initialized to (positive or unsigned) zero;"

--
Regards/Gruss,
Boris.

Good mailing practices for 400: avoid top-posting and trim the reply.

\
 
 \ /
  Last update: 2017-10-16 20:19    [W:0.071 / U:0.464 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site