]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: PPC: Book3S HV: Fix H_REGISTER_VPA VPA size validation
authorNicholas Piggin <npiggin@gmail.com>
Sun, 13 Aug 2017 01:33:38 +0000 (11:33 +1000)
committerPaul Mackerras <paulus@ozlabs.org>
Thu, 31 Aug 2017 02:36:44 +0000 (12:36 +1000)
commitab8deeb1b13c14484a284726b996758836737031
treed009c92c25a88619dd8cf60367dc080754a9d312
parentcb298133b1eb602657fa588783d2620cb554a7aa
KVM: PPC: Book3S HV: Fix H_REGISTER_VPA VPA size validation

KVM currently validates the size of the VPA registered by the client
against sizeof(struct lppaca), however we align (and therefore size)
that struct to 1kB to avoid crossing a 4kB boundary in the client.

PAPR calls for sizes >= 640 bytes to be accepted. Hard code this with
a comment.

Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
arch/powerpc/kvm/book3s_hv.c