Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752804AbeAFI50 (ORCPT + 1 other); Sat, 6 Jan 2018 03:57:26 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:42718 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752575AbeAFI5Z (ORCPT ); Sat, 6 Jan 2018 03:57:25 -0500 Date: Sat, 6 Jan 2018 09:57:29 +0100 From: Greg KH To: Tim Chen Cc: Thomas Gleixner , Andy Lutomirski , Linus Torvalds , Dave Hansen , Andrea Arcangeli , Andi Kleen , Arjan Van De Ven , David Woodhouse , linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 8/8] x86: Use IBRS for firmware update path Message-ID: <20180106085729.GC4380@kroah.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.2 (2017-12-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: 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