Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp9245054ybi; Wed, 10 Jul 2019 07:05:39 -0700 (PDT) X-Google-Smtp-Source: APXvYqwhBrjQB47CPEOmsT3jvhEwmO/Ttx8F4Ps1PPTXBXvWqx9oUF3cNUlwz3T1Oinq08G6Tn4M X-Received: by 2002:a65:4087:: with SMTP id t7mr26860786pgp.10.1562767539316; Wed, 10 Jul 2019 07:05:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562767539; cv=none; d=google.com; s=arc-20160816; b=wY7PWygzVukRzQFKr4XYgFHkvM+NfBZ4J172PBSdarK0wsTO+hhKf2dLyhi+LDhGcB 7CHCjzYqzfCpU4PMJCs3fvQs9+ba48eddbGPgChsFAqc/pi2REdTKPKafL2vS/QEMJuc ThMiECf+6bkV66ZjnQ4+7McoorEtwjd+3tYbDu+cFsBpYfF+98JcgTenWl/KoBSUuRYc eP8iF62FWl8EfkrcUa12qmr+JnFdT/M4BugfkXIFDlZjTZlT0h5+UyhMsP3bTiqLzG+G ZeLaJ/jOUzo6eDdlsVIeBw8E+GLi7Xod6If82jzfB47UMQOJU+mPTHvAaTQC+n4mfmz4 /3wg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date; bh=+K0MTOoyI0w7YMN1SdFhld+3fQ3HDz4So/xtsACdVeY=; b=lkl8R/XwaA2FTYBgp5q5d5E/bzu3UtszoYUwHUP6T5QepFr0LvHazmdVjx6g3bk/GO xH2MNYc1wkiGi/4TZJ+PfGJdlnPxeCRJKU1+G6XQtT00beekSNcZ488DHHjaNpmN91uX 4ELC+gwB/l0RSCWO1BTOaDdo2/+zPe5Vu37MO0BTZCnA6jNHpfWjdU3qN/jbTJzZbCmX u2lv05MDmY1jUnlWjblW20KNVdAGXL+ZY1JrWWQZHZCDHARjU/4ShlcSPmuS0vN8IYXw pGRU6JFObeHpyUqUZmpevvfv7QD0QRZezA/ga2UNA06L4Ox3jLi6IcWeS/fwjs9wjnwd 2Xyg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s24si2450746pfh.227.2019.07.10.07.05.23; Wed, 10 Jul 2019 07:05:39 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727797AbfGJODj (ORCPT + 99 others); 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