On 10.09.2024 12:09, Federico Serafini wrote: > --- a/xen/arch/x86/x86_emulate/fpu.c > +++ b/xen/arch/x86/x86_emulate/fpu.c > @@ -218,6 +218,7 @@ int x86emul_fpu(struct x86_emulate_state *s, > */ > if ( dst->type == OP_MEM && !s->fpu_ctrl && !fpu_check_write() ) > dst->type = OP_NONE; > + break; > } > break; > > @@ -296,6 +297,7 @@ int x86emul_fpu(struct x86_emulate_state *s, > default: > generate_exception(X86_EXC_UD); > } > + break; > } > break; > > @@ -386,6 +388,7 @@ int x86emul_fpu(struct x86_emulate_state *s, > */ > if ( dst->type == OP_MEM && !s->fpu_ctrl && !fpu_check_write() ) > dst->type = OP_NONE; > + break; > } > break; > > @@ -457,6 +460,7 @@ int x86emul_fpu(struct x86_emulate_state *s, > case 7: /* fistp m64i */ > goto fpu_memdst64; > } > + break;
Aren't you swapping one violation for another here? Unlike in the earlier three cases, this new break is unreachable, because of the nature of the preceding switch() statement (cases being exhaustive and every case ending in "goto"; this is something even a static analyzer can [in principle] spot). Jan