]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
x86/xen/efi: Initialize only the EFI struct members used by Xen
authorDaniel Kiper <daniel.kiper@oracle.com>
Thu, 22 Jun 2017 10:51:37 +0000 (12:51 +0200)
committerIngo Molnar <mingo@kernel.org>
Fri, 23 Jun 2017 09:11:03 +0000 (11:11 +0200)
commit6c64447ec58b0bac612732303f7ab04562124587
tree8005bb035065983c42fbf0421db2b25455f53f4c
parent457ea3f7e97881f937136ce0ba1f29f82b9abdb0
x86/xen/efi: Initialize only the EFI struct members used by Xen

The current approach, which is the wholesale efi struct initialization from
a 'efi_xen' local template is not robust. Usually if new member is defined
then it is properly initialized in drivers/firmware/efi/efi.c, but not in
arch/x86/xen/efi.c.

The effect is that the Xen initialization clears any fields the generic code
might have set and the Xen code does not know about yet.

I saw this happen a few times, so let's initialize only the EFI struct members
used by Xen and maintain no local duplicate, to avoid such issues in the future.

Signed-off-by: Daniel Kiper <daniel.kiper@oracle.com>
Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: andrew.cooper3@citrix.com
Cc: jgross@suse.com
Cc: linux-efi@vger.kernel.org
Cc: matt@codeblueprint.co.uk
Cc: stable@vger.kernel.org
Cc: xen-devel@lists.xenproject.org
Link: http://lkml.kernel.org/r/1498128697-12943-3-git-send-email-daniel.kiper@oracle.com
[ Clarified the changelog. ]
Signed-off-by: Ingo Molnar <mingo@kernel.org>
arch/x86/xen/efi.c