[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20171016181835.a65fogoxdrl2j36z@pd.tnic>
Date: Mon, 16 Oct 2017 20:18:35 +0200
From: Borislav Petkov <bp@...en8.de>
To: Brijesh Singh <brijesh.singh@....com>
Cc: x86@...nel.org, Tom Lendacky <thomas.lendacky@....com>,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>,
"H. Peter Anvin" <hpa@...or.com>,
Andy Lutomirski <luto@...nel.org>, linux-kernel@...r.kernel.org
Subject: Re: [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.
Powered by blists - more mailing lists