Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp3261357ybl; Mon, 27 Jan 2020 00:07:02 -0800 (PST) X-Google-Smtp-Source: APXvYqz2SSHEZ+Np272B+CYhjCONkEL3Gg6bLv3tCAfmpxsgmhvMaiMT2RiUjZDyl911jJk+zltP X-Received: by 2002:aca:2b04:: with SMTP id i4mr2854005oik.21.1580112422327; Mon, 27 Jan 2020 00:07:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1580112422; cv=none; d=google.com; s=arc-20160816; b=Mb+t+qSgaH6IHrEtRZbhX0KW16JQKG1C1O39jysQOlnwB+tKF5D9Vc9tLBM4GejeEM jCdN0LZzUcZIEpeMclZid0eW8sthboIZm/x+OBoDnaAdra664vLzZZYtWsfRMmDCzU3X sOoN5CWb0JVedGAiiIZocYJ1Bhd0DWfI43Lo0U9QkJZbRAyXX9H4L+amBCLP3L5fmgKh TiM+y1t726BS9h12vHepbgsga0L3SQ4NQpLNWFXV7/Ihp5Kr5j4HZCK62xsHq7NwHBVh RVJe8DY/Uc8Ena8SaqD32NPl0el/pbvT+MjMaMqXyu53J3TxhqgnB1HTX5tUgX9Shy/K cAEg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=sZi2zm/JG5duSVHmWzKHgCFXi+/oFyOvHLu50859iFY=; b=GYp+hmKLAlqCwH5co8qxLYmKLXuoh0Ltqv/roXoslMz3huXVVf60wB7LFUCehMIkDV 4D8zD8mw/FiSohC2EIp2GjZ8ZFXq4fdt402Ph31d3czVg7uCbMmKb9K4UcEzOnwCEenP 8LmUwI7QFQbQpJDfSfmFIgr9jLrm4hnVIlraTZ6UvZAtj1DXHphezwq9LVEXrISdg76j RXVNW4tme8CDil5NF0pxq3arpmDhk1MWRtKiR+JYvePnmXaFO73kkNklCUouITVc65pf /jmZHQ+/8l7eC2pyzJLAcCSb1sO/JLuZk2YTmMEsV5hX9OkBFNIhPcP+QfsTioMRSzlF HrtA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=IsJnbR37; 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 y126si3162774oiy.235.2020.01.27.00.06.49; Mon, 27 Jan 2020 00:07:02 -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=fail header.i=@infradead.org header.s=merlin.20170209 header.b=IsJnbR37; 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 S1727738AbgA0IEl (ORCPT + 99 others); Mon, 27 Jan 2020 03:04:41 -0500 Received: from merlin.infradead.org ([205.233.59.134]:56192 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725955AbgA0IEl (ORCPT ); Mon, 27 Jan 2020 03:04:41 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=sZi2zm/JG5duSVHmWzKHgCFXi+/oFyOvHLu50859iFY=; b=IsJnbR37rrQBmfGapoKQzAs8B lP8fZMtd+MpCUXtcjfgJ4WsqTrU8aPK190wIBC+PjaA0RUdmozBdJaB+gtKyneZVYJEUeaJS5I5oJ 2la0fN9AtW/MYO8DTP+ZScgFCeEflGf3yYV+fM0KPEX7oRtWrkOBnK0Br7ID5RiJtAZ/6IsSFXorv BzIstbZUTvymqYxbvD6yp5xqs5Xk84Z9yvKe+XW8qVlIXZQff5VzwmqZw1CHyDNKDHX6J6BZDmKxi m/ZAtGDsCEcaRqwu4p7HBWIX56ywDtwQEoR+vD1gzsLI8BYCOD44ywF7KuAViVkoFlRuDguW/lvom 7786r97fA==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by merlin.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1ivzNc-0004Qx-Or; Mon, 27 Jan 2020 08:04:21 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id 6FF3A300F4B; Mon, 27 Jan 2020 09:02:37 +0100 (CET) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 41862203CF5D4; Mon, 27 Jan 2020 09:04:19 +0100 (CET) Date: Mon, 27 Jan 2020 09:04:19 +0100 From: Peter Zijlstra To: "Luck, Tony" Cc: Arvind Sankar , Thomas Gleixner , "Christopherson, Sean J" , Ingo Molnar , "Yu, Fenghua" , Ingo Molnar , Borislav Petkov , H Peter Anvin , "Raj, Ashok" , "Shankar, Ravi V" , linux-kernel , x86 Subject: Re: [PATCH v15] x86/split_lock: Enable split lock detection by kernel Message-ID: <20200127080419.GG14914@hirez.programming.kicks-ass.net> References: <20200122224245.GA2331824@rani.riverdale.lan> <3908561D78D1C84285E8C5FCA982C28F7F54887A@ORSMSX114.amr.corp.intel.com> <20200123004507.GA2403906@rani.riverdale.lan> <20200123035359.GA23659@agluck-desk2.amr.corp.intel.com> <20200123044514.GA2453000@rani.riverdale.lan> <20200123231652.GA4457@agluck-desk2.amr.corp.intel.com> <87h80kmta4.fsf@nanos.tec.linutronix.de> <20200125024727.GA32483@agluck-desk2.amr.corp.intel.com> <20200125212524.GA538225@rani.riverdale.lan> <20200125215003.GB17914@agluck-desk2.amr.corp.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200125215003.GB17914@agluck-desk2.amr.corp.intel.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Jan 25, 2020 at 01:50:03PM -0800, Luck, Tony wrote: > On Sat, Jan 25, 2020 at 04:25:25PM -0500, Arvind Sankar wrote: > > On Fri, Jan 24, 2020 at 06:47:27PM -0800, Luck, Tony wrote: > > > I did find something with a new test. Applications that hit a > > > split lock warn as expected. But if they sleep before they hit > > > a new split lock, we get another warning. This is may be because > > > I messed up when fixing a PeterZ typo in the untested patch. > > > But I think there may have been bigger problems. > > > > > > Context switch in V14 code did: > > > > > > if (tifp & _TIF_SLD) > > > switch_to_sld(prev_p); > > > > > > void switch_to_sld(struct task_struct *prev) > > > { > > > __sld_msr_set(true); > > > clear_tsk_thread_flag(prev, TIF_SLD); > > > } > > > > > > Which re-enables split lock checking for the next process to run. But > > > mysteriously clears the TIF_SLD bit on the previous task. > > > > Did Peter mean to disable it only for the current timeslice and > > re-enable it for the next time its scheduled? > > He's seen and commented on this thread since I made this comment. So Yeah, I sorta don't care either way :-) > I'll assume not. Things get really noisy on the console (even with > the rate limit) if split lock detection is re-enabled after a context > switch (my new test highlighted this!) Have you found any actual bad software ? The only way I could trigger was by explicitly writing a program to tickle it.