Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp1890411ybk; Mon, 11 May 2020 06:54:31 -0700 (PDT) X-Google-Smtp-Source: APiQypIpP4VBiHFRD+5BNv4t7VJrRxFWrX2y43hJl8y1kOEZXL325QktnoJidnH3rD7k7uwWmdE0 X-Received: by 2002:aa7:d342:: with SMTP id m2mr13268052edr.130.1589205270871; Mon, 11 May 2020 06:54:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589205270; cv=none; d=google.com; s=arc-20160816; b=Ta1FVeO84lF0I9mj/wU14t7rPymAA/5720GmDPu/f8ZRaw92VB/6Bw49nU7ObuicCt 1V+MT/e2KbBAmT/Gtg9evYY938yJTIzeHUzedXhuQ2bmSU1Aq+KDByq/WAWyVKA7Dep5 TMKpEOFdZOAIv/PuqcmkdPCr+D3oZ4hj0nnltdDU2IhahfPtIyJSeIqRBUd7AXF8h6Vk 5K/rLwIELwA6hY2IlCRwttqzClbYEnw++K2cp2jCd7l0moyuDfRnN4/UpMMtiBQSCMdy SOVToyLvQGbZgwH+8ydOybDKHoyXwUCFsXowVfg4niuKkyoomk59NwcyR8r0Xc2wyN6k yZUQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=fgDbuFVZ9wewyUbZc91a3JAySjT/mroMXUxBkr5SV4c=; b=eG4PXgL7pcztw5jNh0hJ+9B8SJ4RCzlY19KmSLH5NW0xdNxByhgvsF8Xk9fF+ez1ou UhGbANsHKB7d2Tn7EVTqQo8nKRZyCc1OvSqrS8+8r1gpAB0y4lbJYFfYQjCXDw4GeVDL 3LGS3BJlB62PkUdLuHWnUlsqRcr9NLD57c7yDTm35KQ2eLNm6gA4yXskjHRqADHBwa47 hR0bS4qx96I+QwR9OqJv1MZF7hcPlSVNUcuJnbldQTwE1FxIKR9e4qUiTF+lVn/xDaKq 87hMGEjfI0sR9bT6ryLnl+nLR39TW0O/8jzhKG+e+e8SxMS5J1RV2PyXQnD2YDIMtzbv YZaw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=We7vl55x; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dn6si6206935edb.514.2020.05.11.06.54.07; Mon, 11 May 2020 06:54:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=We7vl55x; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730180AbgEKNuR (ORCPT + 99 others); Mon, 11 May 2020 09:50:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33326 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1729641AbgEKNuQ (ORCPT ); Mon, 11 May 2020 09:50:16 -0400 Received: from merlin.infradead.org (unknown [IPv6:2001:8b0:10b:1231::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A9634C061A0C for ; Mon, 11 May 2020 06:50:16 -0700 (PDT) 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; bh=fgDbuFVZ9wewyUbZc91a3JAySjT/mroMXUxBkr5SV4c=; b=We7vl55xbdvDV6CpsSaKopX2/X GfJv5BokO/TYre24xkZ+EY5LRDMPq0GfGWfZ53Aow+h5J1aDZCnmskvCt3oNSrrr+kyZdQqd0nE54 sHaiB9J9OqR50fCw35lWgdjX4QosLNovaWXkbet8DzZAUCJSs6H8+Wn7svzeH6cMvdCFp0Vn2j5Ow KfyMueXvat/l3QggUfuFedJZt+xz/i5S54b7XRzkEMfLa4br1FZa5tUGoKeX7fn71S39OsZhIw3vQ lWmVa3kY3tQmz+/sXxtkIMDwtUSPKhg2smsjYtnqE1djGpPiraZGF9eLD9Mf9axMzqedc14S+0hgq vKsxZLtg==; 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 1jY8o9-0007TP-3J; Mon, 11 May 2020 13:49:25 +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 9E72A306831; Mon, 11 May 2020 15:49:21 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 89C422870F2D3; Mon, 11 May 2020 15:49:21 +0200 (CEST) Date: Mon, 11 May 2020 15:49:21 +0200 From: Peter Zijlstra To: "Joel Fernandes (Google)" Cc: linux-kernel@vger.kernel.org, "Paul E . McKenney" , Vineeth Pillai , Allison Randal , Armijn Hemel , Ben Segall , Dietmar Eggemann , Ingo Molnar , Juri Lelli , Mel Gorman , Muchun Song , Steven Rostedt , Thomas Gleixner , Vincent Guittot Subject: Re: [PATCH RFC] Add support for core-wide protection of IRQ and softirq Message-ID: <20200511134921.GC2940@hirez.programming.kicks-ass.net> References: <20200510234652.249917-1-joel@joelfernandes.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200510234652.249917-1-joel@joelfernandes.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, May 10, 2020 at 07:46:52PM -0400, Joel Fernandes (Google) wrote: > With current core scheduling patchset, non-threaded IRQ and softirq > victims can leak data from its hyperthread to a sibling hyperthread > running an attacker. > > For MDS, it is possible for the IRQ and softirq handlers to leak data to > either host or guest attackers. For L1TF, it is possible to leak to > guest attackers. There is no possible mitigation involving flushing of > buffers to avoid this since the execution of attacker and victims happen > concurrently on 2 or more HTs. > > The solution in this patch is to monitor the outer-most core-wide > irq_enter() and irq_exit() executed by any sibling. In between these > two, we mark the core to be in a special core-wide IRQ state. Another possible option is force_irqthreads :-) That would cure it nicely. Anyway, I'll go read this.