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 CEAF9C433E0 for ; Fri, 5 Feb 2021 11:50:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7C20D64E55 for ; Fri, 5 Feb 2021 11:50:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231264AbhBELub (ORCPT ); Fri, 5 Feb 2021 06:50:31 -0500 Received: from Galois.linutronix.de ([193.142.43.55]:47296 "EHLO galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232000AbhBELrA (ORCPT ); Fri, 5 Feb 2021 06:47:00 -0500 From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1612525555; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=ti1jxzZHJnqvrbdzPXpr0Nbir1Y8tKFvhkXHXVIDZIU=; b=Ub/u/zgqOw0kaxnlHvwYEz4fbOzb56rbGTCnApKFhNB5JGgRxMiLnirNTR3vjduHj2uHg1 BtoRqFJ4FIKamp/CjvWpp4n/CptbQA/5o26Didtn6EmlWWwmuSbJBTqIuDqltki4FAc+8q ukyqNrBK8UYw7JXO6eya3trfK6GHyseoBJhfhnS2HJnNvAJ9NKb8DuGCx40HAOZZtOlQcl jN2ikc8fXUS2aGOLOy8GnZw0GaJjkCNi2xsn7/aAKm7x2QZ8OVMaL1XeJH6sqFSvEOekPE o68S5heYeCO89sAlbqCazDaikfUjO3Yuk2jq5WvouqnqOzN86REF7/3aB53Xhw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1612525555; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=ti1jxzZHJnqvrbdzPXpr0Nbir1Y8tKFvhkXHXVIDZIU=; b=4m7Ypp2/hMlhDYAxc4Hc+zTdQtRussu2yrFTB8HLYSTZFV2vUR36tROuh90zd5TSDF55o+ nj/6a59HGBf4XMDA== To: Andy Lutomirski , Lai Jiangshan Cc: LKML , Lai Jiangshan , Ingo Molnar , Borislav Petkov , X86 ML , "H. Peter Anvin" , Peter Zijlstra , Alexandre Chartre , Andy Lutomirski , "Gustavo A. R. Silva" , "Chang S. Bae" , Sasha Levin Subject: Re: [PATCH 1/2] x86/hw_breakpoint: Prevent data breakpoints on __per_cpu_offset In-Reply-To: References: <20210204152708.21308-1-jiangshanlai@gmail.com> Date: Fri, 05 Feb 2021 12:45:54 +0100 Message-ID: <877dnmagb1.fsf@nanos.tec.linutronix.de> MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. Thanks, tglx