Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp5137708pxu; Wed, 21 Oct 2020 14:44:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwdEPOjfEV0pYQg/AUAgKEe5JVz2hPbJxkmFZ9QNSy4NXI+OsEPSb7XztLB5/hdEHnnAMWF X-Received: by 2002:a50:8fc5:: with SMTP id y63mr4626801edy.10.1603316645872; Wed, 21 Oct 2020 14:44:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603316645; cv=none; d=google.com; s=arc-20160816; b=HC4LVee5+XCaQFvZELnL7Te0hLQVhESy1C33Bihnk22KEjDnfrosunnyj1m9wqdmnQ HLZNjVsOsjAFxhtc4UOZCm8SQ5Ozybh2UHYQ/Ohy1cq40wHhOPf2dG25yb8xlHajyZDp bBvyFYpd646n3zs6zYsBUeBFQucWXSpccuI2qnX6vR6KzQ6iusd1TZtqfjkL6IygJoSO 44kJHlFcj0jEruVFzncbwjdd6Txy8Ll3MqdP2fN57YHx65m2wOMO9++k3Z9c1I7Ihy9+ ZFn47TCqxj5c1J99UyDhBVJ98rUIQDuVLQkp2LLbv07rJOA2J+n4DRBeUY9yCN6egKxu oyQQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=C5pxS0VoCUj5EKSwQUWEIfQu4wyoFbzOuAcw/xJotSY=; b=ylzQBGzfZ7zDyy9DmXjkqzIpOUXGL5LPF5jTmRpX2qoCV7D2vbvwhLGGNfJPLT+q1g 3nbH/ArbDTLLOZsD/rEtbho5aeMoPucDv5meZB/rUzMh+o1PLchwjzOSxDfSvb8d8Hxd OOu0s4ksZG1nmZce+omHGrHa17u63z5URK4dkIWLEnJjCYILCwggedh4iV3xjQRuHjcv E2Z4/9jW6Ywyc+OtjBxFMfJo5eMKfC5FLDhNApE6nGJ0Ii6rY9pZ2lErLVHYLbzm2iiq YAPKIbT7WLNyvLml91sZ7RIJWfIOYbvOTAA2E9Y1TM/IhZslfog3AE9hr7FWFjPuQT4o coKg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=vbVMF2Ff; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r18si2205809edy.411.2020.10.21.14.43.27; Wed, 21 Oct 2020 14:44:05 -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=pass header.i=@kernel.org header.s=default header.b=vbVMF2Ff; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2395147AbgJUI1R (ORCPT + 99 others); Wed, 21 Oct 2020 04:27:17 -0400 Received: from mail.kernel.org ([198.145.29.99]:40554 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2394683AbgJUI1Q (ORCPT ); Wed, 21 Oct 2020 04:27:16 -0400 Received: from mail-lf1-f50.google.com (mail-lf1-f50.google.com [209.85.167.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 390A0222C8; Wed, 21 Oct 2020 08:27:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603268835; bh=nMmI8qRuAv1yyZjH2PDs0VpZ8HlNElzwHwOCPCUV/wM=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=vbVMF2Ffjd0/ArQ/MNVOMx4NHX8jFUMBuyywm7cYqrUxbH/kJA8pM+ielLTVu5zAh 5Bhtxb1OHGBZwGIrgZYJkVw8sLvV8qSBTC5ubJBa/AmC9Dpay0EZBMCNd5bGiPSvI0 5CA520/c2cUrg41SNdPYnbDJlWmBJ9CuIkoIwVI0= Received: by mail-lf1-f50.google.com with SMTP id r127so1945575lff.12; Wed, 21 Oct 2020 01:27:15 -0700 (PDT) X-Gm-Message-State: AOAM533O0nE/ui9/hEBfPFJR0wXyQq6KxpLITTKaBbtozzOogw+Xn4lj CWHy3y+4uJ75duWz6Q65x+u6FY9wQRz17FEYKiE= X-Received: by 2002:ac2:5a4e:: with SMTP id r14mr737881lfn.451.1603268833344; Wed, 21 Oct 2020 01:27:13 -0700 (PDT) MIME-Version: 1.0 References: <1602918377-23573-1-git-send-email-guoren@kernel.org> <1602918377-23573-10-git-send-email-guoren@kernel.org> <20201020164121.32626e45@gandalf.local.home> In-Reply-To: <20201020164121.32626e45@gandalf.local.home> From: Guo Ren Date: Wed, 21 Oct 2020 16:27:02 +0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v4 9/9] riscv: Fixup lockdep_assert_held(&text_mutex) in patch_insn_write To: Steven Rostedt Cc: Atish Patra , Zong Li , Palmer Dabbelt , Paul Walmsley , Masami Hiramatsu , Alan Kao , =?UTF-8?Q?Patrick_St=C3=A4hlin?= , Guo Ren , Anup Patel , "linux-kernel@vger.kernel.org List" , linux-csky@vger.kernel.org, Greentime Hu , linux-riscv Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Why? funca: nop addi sp,sp, -8 nop sd ra, 0(sp) nop, nop auipc ra, 0x? nop, nop -> jalr -?(ra) nop ld ra,0(sp) nop addi sp,sp, 8 When CPU0 has only changed half of them, CPU1 call funca then CPU1 broken. On Wed, Oct 21, 2020 at 4:41 AM Steven Rostedt wrote: > > On Tue, 20 Oct 2020 19:18:01 +0800 > Guo Ren wrote: > > > > What platform are you testing ? We are seeing a crash while enabling > > > any of the tracers multiple times > > > on Qemu/HiFive Unleashed. > > I use qemu for testing. I've changed dynamic ftrace mechanism from > > mcount to -fpatchable-entry. > > > > The problem is made by the lockdep checking of text_mutex. > > If you are switching to "patchable-entry" you shouldn't need to use > stop_machine for the updates. No? > > -- Steve -- Best Regards Guo Ren ML: https://lore.kernel.org/linux-csky/