[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [PATCH] x86: mark hypercall argument regs clobbering for intended fall-through
The CIDs below are all for the PV side of things, but also take care of the HVM side. Coverity-ID: 1485896, 1485901, 1485906, 1485910, 1485911, Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx> --- Let's see whether Coverity actually understands the (relatively) new pseudo-keyword. --- a/xen/arch/x86/hvm/hypercall.c +++ b/xen/arch/x86/hvm/hypercall.c @@ -246,11 +246,11 @@ int hvm_hypercall(struct cpu_user_regs * /* Deliberately corrupt parameter regs not used by this hypercall. */ switch ( hypercall_args_table[eax].native ) { - case 0: rdi = 0xdeadbeefdeadf00dUL; - case 1: rsi = 0xdeadbeefdeadf00dUL; - case 2: rdx = 0xdeadbeefdeadf00dUL; - case 3: r10 = 0xdeadbeefdeadf00dUL; - case 4: r8 = 0xdeadbeefdeadf00dUL; + case 0: rdi = 0xdeadbeefdeadf00dUL; fallthrough; + case 1: rsi = 0xdeadbeefdeadf00dUL; fallthrough; + case 2: rdx = 0xdeadbeefdeadf00dUL; fallthrough; + case 3: r10 = 0xdeadbeefdeadf00dUL; fallthrough; + case 4: r8 = 0xdeadbeefdeadf00dUL; fallthrough; case 5: r9 = 0xdeadbeefdeadf00dUL; } #endif @@ -264,11 +264,11 @@ int hvm_hypercall(struct cpu_user_regs * /* Deliberately corrupt parameter regs used by this hypercall. */ switch ( hypercall_args_table[eax].native ) { - case 6: regs->r9 = 0xdeadbeefdeadf00dUL; - case 5: regs->r8 = 0xdeadbeefdeadf00dUL; - case 4: regs->r10 = 0xdeadbeefdeadf00dUL; - case 3: regs->rdx = 0xdeadbeefdeadf00dUL; - case 2: regs->rsi = 0xdeadbeefdeadf00dUL; + case 6: regs->r9 = 0xdeadbeefdeadf00dUL; fallthrough; + case 5: regs->r8 = 0xdeadbeefdeadf00dUL; fallthrough; + case 4: regs->r10 = 0xdeadbeefdeadf00dUL; fallthrough; + case 3: regs->rdx = 0xdeadbeefdeadf00dUL; fallthrough; + case 2: regs->rsi = 0xdeadbeefdeadf00dUL; fallthrough; case 1: regs->rdi = 0xdeadbeefdeadf00dUL; } } --- a/xen/arch/x86/pv/hypercall.c +++ b/xen/arch/x86/pv/hypercall.c @@ -149,11 +149,11 @@ void pv_hypercall(struct cpu_user_regs * /* Deliberately corrupt parameter regs not used by this hypercall. */ switch ( hypercall_args_table[eax].native ) { - case 0: rdi = 0xdeadbeefdeadf00dUL; - case 1: rsi = 0xdeadbeefdeadf00dUL; - case 2: rdx = 0xdeadbeefdeadf00dUL; - case 3: r10 = 0xdeadbeefdeadf00dUL; - case 4: r8 = 0xdeadbeefdeadf00dUL; + case 0: rdi = 0xdeadbeefdeadf00dUL; fallthrough; + case 1: rsi = 0xdeadbeefdeadf00dUL; fallthrough; + case 2: rdx = 0xdeadbeefdeadf00dUL; fallthrough; + case 3: r10 = 0xdeadbeefdeadf00dUL; fallthrough; + case 4: r8 = 0xdeadbeefdeadf00dUL; fallthrough; case 5: r9 = 0xdeadbeefdeadf00dUL; } #endif @@ -172,11 +172,11 @@ void pv_hypercall(struct cpu_user_regs * /* Deliberately corrupt parameter regs used by this hypercall. */ switch ( hypercall_args_table[eax].native ) { - case 6: regs->r9 = 0xdeadbeefdeadf00dUL; - case 5: regs->r8 = 0xdeadbeefdeadf00dUL; - case 4: regs->r10 = 0xdeadbeefdeadf00dUL; - case 3: regs->rdx = 0xdeadbeefdeadf00dUL; - case 2: regs->rsi = 0xdeadbeefdeadf00dUL; + case 6: regs->r9 = 0xdeadbeefdeadf00dUL; fallthrough; + case 5: regs->r8 = 0xdeadbeefdeadf00dUL; fallthrough; + case 4: regs->r10 = 0xdeadbeefdeadf00dUL; fallthrough; + case 3: regs->rdx = 0xdeadbeefdeadf00dUL; fallthrough; + case 2: regs->rsi = 0xdeadbeefdeadf00dUL; fallthrough; case 1: regs->rdi = 0xdeadbeefdeadf00dUL; } }
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |