Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp373369pxb; Tue, 1 Feb 2022 01:34:08 -0800 (PST) X-Google-Smtp-Source: ABdhPJwriFk1OumscDRuPBvMfdNWZhhGPeKJF/GXx1aFjoMlgYYahni3xunWLePsw9Ehjqnro3sg X-Received: by 2002:aa7:c40a:: with SMTP id j10mr24090565edq.232.1643708048186; Tue, 01 Feb 2022 01:34:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643708048; cv=none; d=google.com; s=arc-20160816; b=QUh1oMZKmEEzIvd1T8QCSY/AgWGqwJcZ1iGS3Rsj9pUOvfj+aKWh65SQHGhDp+VnZ7 hJsvV2q2vYX3noh9LNcHt0CkOkpKKP3NX7gMH0Z7oW2VZxgvSsEvUUvlhab/9jJ0Lb6g Z2KP1mKRdJHLa5UcOpiO1cYJ8f5BCbpayN3AYMbCeM8Kl807htRQhm6Osb0/Lkg4Ubls KkaBF5bdHLD+PbWMLECE/R43Xz568u1Z/o1BbaBashUqTweQ53N1YhEKLCr/4tZA8WOX qMTouYFLz+vNVSQ6jeEYYJIpJq+EwRFd12ghkY8Akqve3IsxcIQqch4phu/goGeNwMPB ELQg== 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=vLtkfxTppzjqAs4qFSW7j7IwVyTvqHPGWoj6Ja3JSVA=; b=g9ebzM4aab7yV+BOu7GlRqHOerQbNbRWEZ0+peQ7NyD1wzjG72EoH9h5qyMK3CtBGt qe85IA2OUm+wwj7m5EWVmfVqe3KTu+1vwodxZQx/MXD5GuQNaENteVabnSZ+CR7zNOEA Zs0tc/XL+dPryHu654HQaSEZINwIk08SCmdpX+AuUt3rWb5YSN0qEzwfaA5uOdcZmmH8 04m3pn/rPJ1tbBgoviAZp0IsRvyACz8TFTgsocq4osDSRTlodXIqxR/pgkN5MpVSvC05 s35G8peRduSk3ptm8WQCH86lW9O6MkTwDy+EgzFyeDK9hNY8Sk7Bw6KM2MrZC9PYhoYn oV/w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=V3qFFxZu; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f22si10251814edf.623.2022.02.01.01.33.43; Tue, 01 Feb 2022 01:34:08 -0800 (PST) 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=@gmail.com header.s=20210112 header.b=V3qFFxZu; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1353723AbiA3Chz (ORCPT + 99 others); Sat, 29 Jan 2022 21:37:55 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42146 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347293AbiA3Cho (ORCPT ); Sat, 29 Jan 2022 21:37:44 -0500 Received: from mail-wr1-x42a.google.com (mail-wr1-x42a.google.com [IPv6:2a00:1450:4864:20::42a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9373FC061714 for ; Sat, 29 Jan 2022 18:37:40 -0800 (PST) Received: by mail-wr1-x42a.google.com with SMTP id f17so18560841wrx.1 for ; Sat, 29 Jan 2022 18:37:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=vLtkfxTppzjqAs4qFSW7j7IwVyTvqHPGWoj6Ja3JSVA=; b=V3qFFxZu0vXFacwzlhDVKlK+Z9HezkvglwIKGkkPfXh7itlxl21vgvvXUgJpZlS3DK vQCF9uWe9gSvMiOhGKY+gZutXPZGe/e4JsHlSD328ZliAgyqkwZ8MVIuW5XPs8UEKbn6 YRTRNjlyhpv3qCrwDpecjmmIMuMX38FbpqLpmuK8A2rOQZ7MetXxEQzu8CdMCzoWH1yb Hnk7tqS8oA0a2bxnpy32duUpAKPr+ii0XAYHSI6fv9PMqN2hNK2RUUsCUkApCzkNct7C D98Bp7Sa1iNM+jsQozt3fSOcT/UHvjAaxt453xGzNFre52sRDb7Jlqch5TAb939BcAel wz0A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=vLtkfxTppzjqAs4qFSW7j7IwVyTvqHPGWoj6Ja3JSVA=; b=6CToF5/tCFPg2KR2Z77R4y5fkWAsomWn7Pc64mSB7d4eNsRmc8H0UDZCnxDaUJZ6MP FS8pMdqve+t7uFUvYj7KsEyEguxmhpUzyk3CQ+KNHxwEBpo/HfTlz78p7ryBF8h0GLFa LV1d3nBT6jpm/EsvYZ3vIZuyF1ENTBb4NCuks51l4PoPG+yGubpxkfWlV+0Es8vEUmgO +TnwAAa5LUtUpjck44pqMj8eOlrFDgAt0zKwA25xnWgHyBELsvxN+Y0332UyHcnP7uV/ JncR3wOXAqIf2qMRdbF65BFNMRouoo9Y55drYIbhGsqQBtKA+idGHAQwr4Mdued4pFLF /Nww== X-Gm-Message-State: AOAM5304GwMZ++AUi/rQk3YTA18YGpvNdLbU6TRvedqSyIdxqUvVLLHs Xb3bH96Vn9TQsEmswbun4Ut/2eACPodAwbxnoOeLUzYZ X-Received: by 2002:a5d:5283:: with SMTP id c3mr12176707wrv.554.1643510259157; Sat, 29 Jan 2022 18:37:39 -0800 (PST) MIME-Version: 1.0 References: <20220113013835.503285-1-xiehuan09@gmail.com> <20220118232448.891fbf550b50193e0155b59c@kernel.org> <20220127005447.143a840e9b0f67d894b8c54a@kernel.org> In-Reply-To: <20220127005447.143a840e9b0f67d894b8c54a@kernel.org> From: Jeff Xie Date: Sun, 30 Jan 2022 10:37:28 +0800 Message-ID: Subject: Re: [PATCH v7 0/4] trace: Introduce objtrace trigger to trace the kernel object To: Masami Hiramatsu Cc: Steven Rostedt , mingo@redhat.com, Tom Zanussi , linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Masami, On Wed, Jan 26, 2022 at 11:54 PM Masami Hiramatsu wrote: > > Hi Jeff, > > On Wed, 19 Jan 2022 10:32:49 +0800 > Jeff Xie wrote: > > > > > Note: when change to use the ftrace_test_recursion_trylock, all the functions > > > > will call the copy_from_kernel_nofault, I don't know where this is the problem now, > > > > maybe should fall back to the usage in v6. > > > > > > > > for example: > > > > > > > > cat-118 [000] ...1. 1.458998: __bio_add_page <-bio_add_page object:0xffff88811a12e9e8 value:0x0 > > > > cat-118 [000] ...2. 1.458998: copy_from_kernel_nofault <-trace_object_events_call object:0xffff88811a12e9e8 value:0x1000 > > > > cat-118 [000] ...2. 1.458998: copy_from_kernel_nofault_allowed <-copy_from_kernel_nofault object:0xffff88811a12e9e8 value:0x1000 > > > > cat-118 [000] ...1. 1.458998: __rcu_read_lock <-xa_load object:0xffff88811a12e9e8 value:0x1000 > > > > cat-118 [000] ...2. 1.458998: copy_from_kernel_nofault <-trace_object_events_call object:0xffff88811a12e9e8 value:0x1000 > > > > cat-118 [000] ...2. 1.458998: copy_from_kernel_nofault_allowed <-copy_from_kernel_nofault object:0xffff88811a12e9e8 value:0x1000 > > > > cat-118 [000] ...1. 1.458998: __rcu_read_unlock <-xa_load object:0xffff88811a12e9e8 value:0x1000 > > > > cat-118 [000] ...3. 1.458998: copy_from_kernel_nofault <-trace_object_events_call object:0xffff88811a12e9e8 value:0x1000 > > > > cat-118 [000] ...3. 1.458998: copy_from_kernel_nofault_allowed <-copy_from_kernel_nofault object:0xffff88811a12e9e8 value:0x1000 > > > > .... > > > > > > Hmm, this is strange, but I got it is the expected behavior, since the > > > ftrace_test_recursion_trylock() accepts one stage recursion for the > > > first event in the interrupt as transition event. > > I think you should revert that change and back to your own per-cpu recursion > flag instead of using ftrace_test_recursion_trylock(). Thanks, I will revert it. > Thank you, > > -- > Masami Hiramatsu --- JeffXie