Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2472602imu; Sat, 10 Nov 2018 15:58:55 -0800 (PST) X-Google-Smtp-Source: AJdET5egZGHjw36SfOiUaHBlGXkywTqSzE7t33ZEewmv5eEolJy06DN2hEf3+rtgTGnjpdjw4xbm X-Received: by 2002:a63:525e:: with SMTP id s30-v6mr12553867pgl.436.1541894335723; Sat, 10 Nov 2018 15:58:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541894335; cv=none; d=google.com; s=arc-20160816; b=1BQhGF7YkrmXSDg04dA5uY6fK6/B9njCEKEL0CcXA7CQ2V5h92WB9tNfFFaxRNdLPd p9V4Ej/2nQTGfcB/IJycO7phKVGptDTYbqJGD8w+7KZV0L17rM0ydsVbUuq8CKtsxMH2 Ul+4Pf91CD1BI+Adf6Hkyi8+7qBBcBaRJqe+3lRrrIRUJnfyJQqr4dLcNHrlSXBE7mic h1sFunTKzyEhv8VExNRxqwCdN+kvBgWZbBV8bm16MRM4KViGoYVW33Njw6kgiJv6aHkv CC9bnX+wNX8WJmBUKXCgbvD9WTZan2JCQlmuz6aeCoYB1BPGZKJC2OmVWPRU4Y0KxqCl AI4A== 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:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=uHjsOLJmeLufXgzKF3JLoyfts9QnyR8Vd5qCx/b6F90=; b=e7QljHjRGoXgfZVW1jSd8PjRVnIqdHQZwFH11a9wACB9SCLZHBPP6YdKQkdnWy5bbq tnuGGvoEXmjrCRaLtzY3+g83ZTq3VtxReeyVEPc+hrNwwjZ8M92U+KjtzFbSuf2jH5iy qYPFUH/IS0mdtxQP5JwTTHGVmLx/3c6PMM2SI7ULYBS2yZ03HYoi8AM+kRfY7ybe0Ewf Y9Bl/WtSHQ7DTaBroGZeuYRFRwC7sj6oTQCxjIoAqI/n7+xta973lS2XJE3y1opmTFUv dxG7jkdEPqe1UB9zudC1VkowF/ghDxfkA0IIHz4Owm72iwPDoGo9C9Ogp5IpDvXa+Mic yzqQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel-com.20150623.gappssmtp.com header.s=20150623 header.b=QfCLYI5H; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id be8-v6si11960506plb.143.2018.11.10.15.58.27; Sat, 10 Nov 2018 15:58:55 -0800 (PST) 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=@intel-com.20150623.gappssmtp.com header.s=20150623 header.b=QfCLYI5H; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726898AbeKKJoi (ORCPT + 99 others); Sun, 11 Nov 2018 04:44:38 -0500 Received: from mail-oi1-f195.google.com ([209.85.167.195]:39395 "EHLO mail-oi1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725896AbeKKJoi (ORCPT ); Sun, 11 Nov 2018 04:44:38 -0500 Received: by mail-oi1-f195.google.com with SMTP id 192-v6so4473945oii.6 for ; Sat, 10 Nov 2018 15:57:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=uHjsOLJmeLufXgzKF3JLoyfts9QnyR8Vd5qCx/b6F90=; b=QfCLYI5HCR7W4Vb/nO/GuwteVyArCSiPC5i24ZY8aWJKLNfEr7mJeZYAN0sPUXLyoY 9skqzzX6sogJOzZny64PxemHMXRlSTv/xGZTEfzpjcp8CmQ/4isdF6na35Ke8UxECEdJ j3WrWyvU3L+DNl4YBQnpJA+wFmMUs4UExLtUfJcNzWxClTN/tUpjxPkyODFGBnLOx0Jo H+K2y6YxrOAXJSOJ+jqxJijyVnX8RnVGm4Wq/HG9eYgatAv6Jhld7jIYXmOMWPKdfcjJ +o6vuDurVPOSXSaTD3SOlMrLDgFTk5YI9Yhf/FxXC+N1v29bTNakeFuc39yJM8Qgw9CU li1g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=uHjsOLJmeLufXgzKF3JLoyfts9QnyR8Vd5qCx/b6F90=; b=Q2iQDUdspqSl6mecgCvnb9ZwhPXl/1Gsze2+lSur5VzVpye+ksAr0REDPxrJ8dYi6m UtASDAvqA/5joahB/a2fO1ljyAkGgHCvD7CXYO0DEtKrMqsamqC6lNOeJBGLnOCB4W9W 1srkgh2wWS1iZIzYWkghfTTgjLbotlckMV+qrs8AgH0QYdozds4XcomBjhSwj0vRwgHO PUa5wgRtB/2MYJA+CYlRqDHjA+6t99ARwo5X8XZPS5px8CytUkQ9cTV1yg20atYoTw/X E8nQh3rBA+7elAwSbBA3LOK8s0Xscb/5iymeAK1OVpiYPlau7mT6gCtDJ6C5iGm64x9D 9Bnw== X-Gm-Message-State: AGRZ1gIqWfWkpItmP/XxC9Ri0u/U/yXpRuGKb96uUGtMPFK9lQWahnNM Ee1+yaJNpQFRsTivc5I6A16MkDAsULMxLnvA+8P+yQ== X-Received: by 2002:aca:e691:: with SMTP id d139-v6mr7640468oih.232.1541894272988; Sat, 10 Nov 2018 15:57:52 -0800 (PST) MIME-Version: 1.0 References: <154180834787.2060925.7738215365584115230.stgit@dwillia2-desk3.amr.corp.intel.com> <7590EF40-B0CF-40BD-9D29-FB731A2A2E3A@amacapital.net> In-Reply-To: <7590EF40-B0CF-40BD-9D29-FB731A2A2E3A@amacapital.net> From: Dan Williams Date: Sat, 10 Nov 2018 15:57:42 -0800 Message-ID: Subject: Re: [PATCH] x86/mm/pat: Fix missing preemption disable for __native_flush_tlb() To: Andy Lutomirski Cc: Thomas Gleixner , Sebastian Andrzej Siewior , Andy Lutomirski , Dave Hansen , Peter Zijlstra , Borislav Petkov , stable , X86 ML , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Nov 9, 2018 at 4:22 PM Andy Lutomirski wrote: > > > > > On Nov 9, 2018, at 4:05 PM, Dan Williams wro= te: > > > > Commit f77084d96355 "x86/mm/pat: Disable preemption around > > __flush_tlb_all()" addressed a case where __flush_tlb_all() is called > > without preemption being disabled. It also left a warning to catch othe= r > > cases where preemption is not disabled. That warning triggers for the > > memory hotplug path which is also used for persistent memory enabling: > > I don=E2=80=99t think I agree with the patch. If you call __flush_tlb_all= () in a context where you might be *migrated*, then there=E2=80=99s a bug. = We could change the code to allow this particular use by checking that we h= aven=E2=80=99t done SMP init yet, perhaps. Hmm, are saying the entire kernel_physical_mapping_init() sequence needs to run with pre-emption disabled?