Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp9287317ybi; Wed, 10 Jul 2019 07:46:56 -0700 (PDT) X-Google-Smtp-Source: APXvYqwvkHy5K84rpo9MOyS80L8LbsNlmoBhcfWEgBcxAcSXS4CaYO89q+SltIGpfc1980lICJNv X-Received: by 2002:a65:654f:: with SMTP id a15mr36637395pgw.73.1562770016577; Wed, 10 Jul 2019 07:46:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562770016; cv=none; d=google.com; s=arc-20160816; b=m5wwvUEjwiCWOMSUwcMz4CgED8a3QY/2kggvCMI2gokEQoriJYtBbZfAJmQyBikyGr 8tiIXgQPeQDsnGbV14AeAiOHXpKvSFZQ69+5odf8yJzsg2Lpvqtx0DartAczy9dMVJ9C JD3g90cqhUZDtMKMgs6rHedXeTyhcMqhRq45sTdaJiwNLREAY4c5B6QtlUqjAjDWwK/1 9pax6VrhVczdBik3Bg0RjDzkkJe/JcIJuEk2rR35PpPkFoG4AkBV2ML9bYVmjTSIisJ0 ZcwIiYXZkV1hlRkbaVntUyT5aZR7K+x6Hchyb3be6LYkrvD02PUHGIy2zfjCA8FKn14R HsqQ== 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=f1nNZiMnGT+TyF9tbdOlbJcvSHVqGV23My/BxtAovns=; b=bXnT+E4UTzEOeHxGvroagchT1vd3mHXDjqq4RqbAXw2JAmMTeVHBuWGI2IBgqrfOJo vXsb99/F5UnrHU71kq51gly04T8yQxgjdJ+9nVRyGJrxSWy7Nn4aaS8eB+6xsB+hS1io FbD4nTjbRqWHLesBKqtKOEjwipYP9xRhY7QVKtkj1fqbbgCrrUKEl5Pcjiu3bCxF/ioI wI6qrWVRFa55tRertvpWkE/a8NJkdtWoX3MKkLWvC8etme9up5TQ7uZAnHvHmyJ05iv6 kFQbaXAckO4ZOXcRpoStDds0t0t7/LSmv6OD8D+Z5ulSVocjPyNit+xuhcJnINRLuoYm OjVA== 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 r1si2258322pls.69.2019.07.10.07.46.40; Wed, 10 Jul 2019 07:46:56 -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 S1727866AbfGJO0O (ORCPT + 99 others); Wed, 10 Jul 2019 10:26:14 -0400 Received: from Galois.linutronix.de ([193.142.43.55]:47886 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727315AbfGJO0O (ORCPT ); Wed, 10 Jul 2019 10:26:14 -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 1hlDXn-0004G9-7B; Wed, 10 Jul 2019 16:26:03 +0200 Date: Wed, 10 Jul 2019 16:26:02 +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: 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, Thomas Gleixner wrote: > 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. Just found it. All my usual configs have the paravirt muck enabled. Linus's config does not, neither has Xi's. With paravirt the CR pinning key is never in the module. It's in the paravirt function and obviously always built in. Thanks, tglx