On Tue, Mar 17, 2015 at 10:47:50AM +0100, Borislav Petkov wrote:
> 
> We can even go a step further and add a static_cpu_has_safe thing which
> checks two features instead of one. The penalty we'd get is a single
> inconditional JMP which in the face of XSAVE* is nothing.
> 
What was the argument against adding a check_alternative_input(...) so the
ex_table entry are managed inside the macro directly?  It leaves less room
for errors and would still be reable IMO:

err = check_alternative_input_2(XSAVE,
                                XSAVESOPT, X86_FEATURE_XSAVEOPT
                                XSAVES, X86_FEATURE_XSAVES,
                                <inputs>, <outputs>, <clobbers>);
if (err)
   do_something();

That hypothetical check_alternative_input_2() would call a rework of
check_insn() supporting an arbitrary numbers of inputs, outputs and
clobbers as drafted in my previous e-mail.

Quentin
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to