Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755961AbcLBSuM (ORCPT ); Fri, 2 Dec 2016 13:50:12 -0500 Received: from p4FC0A62B.dip0.t-ipconnect.de ([79.192.166.43]:33558 "EHLO pd.tnic" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751515AbcLBSuL (ORCPT ); Fri, 2 Dec 2016 13:50:11 -0500 Date: Fri, 2 Dec 2016 19:50:08 +0100 From: Borislav Petkov To: Linus Torvalds Cc: Andy Lutomirski , Peter Anvin , the arch/x86 maintainers , One Thousand Gnomes , Borislav Petkov , "linux-kernel@vger.kernel.org" , Brian Gerst , Matthew Whitehead , Henrique de Moraes Holschuh , Peter Zijlstra , Andrew Cooper Subject: Re: [PATCH v2 5/6] x86/xen: Add a Xen-specific sync_core() implementation Message-ID: <20161202185008.tdziqrzi4a3axord@pd.tnic> References: <0a21157c2233ba7d0781bbf07866b3f2d7e7c25d.1480638597.git.luto@kernel.org> <20161202180343.gehqor7lgtmzwqq3@pd.tnic> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20161014 (1.7.1) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 884 Lines: 23 On Fri, Dec 02, 2016 at 10:27:29AM -0800, Linus Torvalds wrote: > That is, of course, assuming that there is no really subtle reason > why that stupid sync_core() is there. Right, we can try to do something like invalidate_icache() or so in there with the JMP so that the BSP refetches modified code and see where it gets us. The good thing is, the early patching paths run before SMP is up but from looking at load_module(), for example, which does post_relocation()->module_finalize()->apply_alternatives(), this can happen late. Now there I'd like to avoid other cores walking into that address being patched. Or are we "safe" there in the sense that load_module() happens on one CPU only sequentially? (I haven't looked at that code to see what's going on there, actually). -- Regards/Gruss, Boris. Good mailing practices for 400: avoid top-posting and trim the reply.