From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1381AC74A23 for ; Wed, 10 Jul 2019 14:03:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E71942084B for ; Wed, 10 Jul 2019 14:03:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727802AbfGJODj (ORCPT ); Wed, 10 Jul 2019 10:03:39 -0400 Received: from Galois.linutronix.de ([193.142.43.55]:47829 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726098AbfGJODj (ORCPT ); Wed, 10 Jul 2019 10:03:39 -0400 Received: from pd9ef1cb8.dip0.t-ipconnect.de ([217.239.28.184] helo=nanos) by Galois.linutronix.de with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1hlDBx-0003p9-Vo; Wed, 10 Jul 2019 16:03:30 +0200 Date: Wed, 10 Jul 2019 16:03:28 +0200 (CEST) From: Thomas Gleixner To: Peter Zijlstra cc: Xi Ruoyao , Jiri Kosina , Kees Cook , Linus Torvalds , Ingo Molnar , Linux List Kernel Mailing , Borislav Petkov , Len Brown , Andrew Morton , "Rafael J. Wysocki" , Tony Luck , Bob Moore , Erik Schmauss , Josh Poimboeuf , Daniel Bristot de Oliveira , Nadav Amit Subject: Re: [GIT PULL] x86/topology changes for v5.3 In-Reply-To: <20190710134433.GN3402@hirez.programming.kicks-ass.net> Message-ID: References: <201907091727.91CC6C72D8@keescook> <1ad2de95e694a29909801d022fe2d556df9a4bd5.camel@mengyan1223.wang> <768463eb26a2feb0fcc374fd7f9cc28b96976917.camel@mengyan1223.wang> <20190710134433.GN3402@hirez.programming.kicks-ass.net> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 10 Jul 2019, Peter Zijlstra wrote: > On Wed, Jul 10, 2019 at 09:25:16PM +0800, Xi Ruoyao wrote: > > On 2019-07-10 14:31 +0200, Jiri Kosina wrote: > > > Adding Daniel to check whether this couldn't be some fallout of jumplabel > > > batching. > > > > I don't think so. I tried to revert Daniel's jumplabel batching commits and the > > issue wasn't solved. But reverting Kees' CR0 and CR4 commits can "fix" it > > (apprently). > > Xi, could you please try the below instead? > > If we mark the key as RO after init, and then try and modify the key to > link module usage sites, things might go bang as described. Right. I finally was able to reproduce that with Linus' config (slightly modified). Applying your patch makes it go away. Now what puzzles me is that this never exploded in my face before and with a debian config it JustWorks. Both configs have: CONFIG_KVM=m CONFIG_KVM_INTEL=m so I'd expect both to crash and burn when KVM_INTEL is loaded as that has a cr4 operation inside. So something papers over that ... Still looking. Thanks, tglx