From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 14542C433E0 for ; Sat, 6 Feb 2021 00:22:03 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A7C3565013 for ; Sat, 6 Feb 2021 00:22:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229729AbhBFAV4 (ORCPT ); Fri, 5 Feb 2021 19:21:56 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59576 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232256AbhBEMrz (ORCPT ); Fri, 5 Feb 2021 07:47:55 -0500 Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:8b0:10b:1231::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5764DC061786 for ; Fri, 5 Feb 2021 04:47:09 -0800 (PST) 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=yZtaSID4IKfZtizwfG4fctsBjAHUidpBxga8TSTfwP0=; b=DJPrg52QOixXzF09sp9pUvEFlS 2BkMjat5ZRmhY1ak97exF7o3DLev2Wi+1lbispocZLgILGbYlByhLe+ojKZ6ORm33pHGIjH2Qa1pA T/PWCx535qakBlIWZB077lmcahjuDkD8AKAYjZpt9K3Ao+1Uoy+mk+BkQZT+V9OFRAWPzw268NxAB x5ZxVqapMyIh4YX1h5zyuRhCw9olHug3jgKTR7Nefv17JJt3Y8LD7wYdI1s7ZFWDSucS4znYmO3gL J5EMMK+CLD/yA/mk1hrMSmHErC6eNcOu+zArt+24TFDfb7fu8+E7X8Xnra2jZ4jnYC66jVDFYNv5M OkMchSaw==; 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 1l80Vk-0005R5-OU; Fri, 05 Feb 2021 12:46:56 +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 24C1F30066E; Fri, 5 Feb 2021 13:46:55 +0100 (CET) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 0E0142BC43FF0; Fri, 5 Feb 2021 13:46:55 +0100 (CET) Date: Fri, 5 Feb 2021 13:46:55 +0100 From: Peter Zijlstra To: Thomas Gleixner Cc: Andy Lutomirski , Lai Jiangshan , LKML , Lai Jiangshan , Ingo Molnar , Borislav Petkov , X86 ML , "H. Peter Anvin" , Alexandre Chartre , "Gustavo A. R. Silva" , "Chang S. Bae" , Sasha Levin Subject: Re: [PATCH 1/2] x86/hw_breakpoint: Prevent data breakpoints on __per_cpu_offset Message-ID: References: <20210204152708.21308-1-jiangshanlai@gmail.com> <877dnmagb1.fsf@nanos.tec.linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <877dnmagb1.fsf@nanos.tec.linutronix.de> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Feb 05, 2021 at 12:45:54PM +0100, Thomas Gleixner wrote: > On Thu, Feb 04 2021 at 16:11, Andy Lutomirski wrote: > > On Thu, Feb 4, 2021 at 6:26 AM Lai Jiangshan wrote: > >> When FSGSBASE is enabled, paranoid_entry() fetches the per-CPU > >> GSBASE value via __per_cpu_offset or pcpu_unit_offsets. > >> > >> When data breakpoint is set on __per_cpu_offset[cpu] (read-write > >> operation), the specific cpu will be stuck in the infinite #DB loop. > >> RCU will try to send NMI to the specific cpu, but it is not working > >> either since NMI also relies on paranoid_entry(). > > > > Should we consider having a .percpu..noinstr section and having > > objtool enforce this? > > I think so. I'll put it on the TODO list somewhere ...