Re: [PATCH v2 8/8] x86: Use IBRS for firmware update path

From: Greg KH
Date: Sat Jan 06 2018 - 03:57:31 EST


On Fri, Jan 05, 2018 at 06:12:23PM -0800, Tim Chen wrote:
> +void unprotected_firmware_begin(void)
> +{
> + if (firmware_ibrs) {
> + __disable_indirect_speculation();
> + } else {
> + /*
> + * rmb prevent unwanted speculation when we
> + * are setting IBRS
> + */
> + rmb();
> + }
> +}
> +EXPORT_SYMBOL_GPL(unprotected_firmware_begin);

What modules need these functions?

And again, if they are needed, we need a better naming scheme for them.
Prefix them all with "firmware_" perhaps to make it a bit nicer?

thanks,

greg k-h