Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp9095809ybi; Wed, 10 Jul 2019 04:38:48 -0700 (PDT) X-Google-Smtp-Source: APXvYqwNZcGxLN/wkvQVs7JT6Z3r45nyxX5ZCr5SufU4VrDHxZMNBv1WKHqOBS7Lyk443XoB/s1f X-Received: by 2002:a17:902:2862:: with SMTP id e89mr38719144plb.258.1562758728086; Wed, 10 Jul 2019 04:38:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562758728; cv=none; d=google.com; s=arc-20160816; b=He5gFIB2fyefMJNIqL8WASqDbFZ7a41KLkZInq0SstJopenU1Ro8c5LTgORzw7ujSK t2GqKZMVHG+m4ACFtaFPYTnV2qgOn4qzSaHRR7opxUe4xi6q8OkwOJ+sbkycTJ7OfW8v jo3ckW/5ZvrOiSiVWeMgvb8nC7eehlp+NpIZil/czkQawH2++ICPFzH2QESPIQomG1rN IfLONlpepYujUrLtPFbE0Ylx/GNVeIvccMY2+MEhVkOxDB+dxu69YB6uO8KyFwMXmIpF qSxcd3RNl+emMUhLKWVUUsrYJh5wALW+xZ3/UzubaAzLWZRDz9CV+BcyI04C5kMUsPMn AZrA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id:dkim-signature; bh=2h7Lx57k+M/g6Rq8mI2WdK5E9uWze+XlMUmrRUBio8g=; b=X6syf7GO1jn8j+RDg46szPP3ECbFfOQmo/XCH8fcN+O0hK+YzXmQkfVrkXDizjWHLt zdu1vZ59k6XpHZs5bCJNrtAmvHcN1DcyRsESnkq0Y7kBpMPFAOfHcKAhtjsvK5v+vNU0 HlJCohEbQaY3tlv1gbmMaJ7Qj3lM1t6gjGWzcaQ7Bm8ti6r+xMNkSA3yrqTuwmOWn+8+ Wd8BZ3wt2sS92cOEpXgkIQ3Cs7iBQD6UT7c8yDtosoVqXfegnoydHs76tYOXalVH7hma gl9okZMCIAmyR8/YbfOnrSuZJnavm5AYlXBeoVWp6In1/pHiHWhmhAKUIYQP2XoF0iQ+ rQ+A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mengyan1223.wang header.s=mail header.b=uIQydmLB; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=mengyan1223.wang Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t9si2014798pjw.22.2019.07.10.04.38.31; Wed, 10 Jul 2019 04:38:48 -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; dkim=pass header.i=@mengyan1223.wang header.s=mail header.b=uIQydmLB; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=mengyan1223.wang Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727175AbfGJL2T (ORCPT + 99 others); Wed, 10 Jul 2019 07:28:19 -0400 Received: from mengyan1223.wang ([89.208.246.23]:38382 "EHLO mengyan1223.wang" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725956AbfGJL2S (ORCPT ); Wed, 10 Jul 2019 07:28:18 -0400 Received: from [192.168.50.135] (unknown [124.115.222.149]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: xry111@mengyan1223.wang) by mengyan1223.wang (Postfix) with ESMTPSA id 8BDE666017; Wed, 10 Jul 2019 07:28:12 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mengyan1223.wang; s=mail; t=1562758096; bh=2h7Lx57k+M/g6Rq8mI2WdK5E9uWze+XlMUmrRUBio8g=; h=Subject:From:To:Cc:Date:In-Reply-To:References:From; b=uIQydmLBWV/4lhA72ne1tCb3QofFxYIm1elBsZXsp8Ez3zOeIYKLYwX0R832S0bJj tdsU4lz783zDXGHBZfv1u3KwYME1tuCP7brIEJ56rW9weEvXlVhgBxRe5WuOf2Ultv SvKSX9jYPByTCEowdYrKpiVT/oc7ykTShRsNQCmq1bQuBJkzy/uPjgE0Wh0F4pdGr8 tm3FIqCyMlJti8Gw3EgcWhF2kp2V8DDYIn0lywCz97YKxj8vjOBlu0KczsuLlPMvyA 5as6uf6v65/cA1xqWNpM+dx5WeipcM28woL6e9z4KsaaZxolaSAANjWGqSR77nUKbY wIijqvEAfQDqA== Message-ID: <1ad2de95e694a29909801d022fe2d556df9a4bd5.camel@mengyan1223.wang> Subject: Re: [GIT PULL] x86/topology changes for v5.3 From: Xi Ruoyao To: Kees Cook , Thomas Gleixner Cc: Linus Torvalds , Ingo Molnar , Linux List Kernel Mailing , Borislav Petkov , Len Brown , Peter Zijlstra , Andrew Morton , "Rafael J. Wysocki" , Tony Luck , Jiri Kosina , Bob Moore , Erik Schmauss , xry111@mengyan1223.wang Date: Wed, 10 Jul 2019 19:27:53 +0800 In-Reply-To: <201907091727.91CC6C72D8@keescook> References: <20190708162756.GA69120@gmail.com> <201907091727.91CC6C72D8@keescook> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.32.3 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2019-07-09 17:31 -0700, Kees Cook wrote: > On Wed, Jul 10, 2019 at 01:17:11AM +0200, Thomas Gleixner wrote: > > On Wed, 10 Jul 2019, Thomas Gleixner wrote: > > > That still does not explain the cr4/0 issue you have. Can you send me your > > > .config please? > > > > Does your machine have UMIP support? None of my test boxes has. So that'd > > be the difference of bits enforced in CR4. Should not matter because it's > > User mode instruction prevention, but who knows. > > Ew. Yeah, I don't have i9 nor i7 for testing this. I did try everything > else I had (and hibernation). Is only Linus able to reproduce this so far? I can, too. > To rule out (in?) UMIP, this would remove UMIP from the pinning: > > diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c > index 309b6b9b49d4..f3beedb6da8a 100644 > --- a/arch/x86/kernel/cpu/common.c > +++ b/arch/x86/kernel/cpu/common.c > @@ -380,7 +380,7 @@ static void __init setup_cr_pinning(void) > { > unsigned long mask; > > - mask = (X86_CR4_SMEP | X86_CR4_SMAP | X86_CR4_UMIP); > + mask = (X86_CR4_SMEP | X86_CR4_SMAP); > cr4_pinned_bits = this_cpu_read(cpu_tlbstate.cr4) & mask; > static_key_enable(&cr_pinning.key); > } I'll try it. -- Xi Ruoyao School of Aerospace Science and Technology, Xidian University