From: Masami Hiramatsu (Google) <mhiramat@kernel.org>
To: Jiri Olsa <olsajiri@gmail.com>
Cc: Ze Gao <zegao2021@gmail.com>, Yonghong Song <yhs@meta.com>,
Alexei Starovoitov <ast@kernel.org>,
Andrii Nakryiko <andrii@kernel.org>,
Daniel Borkmann <daniel@iogearbox.net>,
Hao Luo <haoluo@google.com>,
John Fastabend <john.fastabend@gmail.com>,
KP Singh <kpsingh@kernel.org>,
Martin KaFai Lau <martin.lau@linux.dev>,
Masami Hiramatsu <mhiramat@kernel.org>,
Song Liu <song@kernel.org>, Stanislav Fomichev <sdf@google.com>,
Steven Rostedt <rostedt@goodmis.org>, Yonghong Song <yhs@fb.com>,
bpf@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-trace-kernel@vger.kernel.org, kafai@fb.com,
kpsingh@chromium.org, netdev@vger.kernel.org, paulmck@kernel.org,
songliubraving@fb.com, Ze Gao <zegao@tencent.com>
Subject: Re:
Date: Mon, 22 May 2023 10:36:52 +0900 [thread overview]
Message-ID: <20230522103652.4c1680bb945cba22ccba6a79@kernel.org> (raw)
In-Reply-To: <ZGp+fW855gmWuh9W@krava>
On Sun, 21 May 2023 22:26:37 +0200
Jiri Olsa <olsajiri@gmail.com> wrote:
> On Sun, May 21, 2023 at 11:10:16PM +0800, Ze Gao wrote:
> > > kprobe_multi/fprobe share the same set of attachments with fentry.
> > > Currently, fentry does not filter with !rcu_is_watching, maybe
> > > because this is an extreme corner case. Not sure whether it is
> > > worthwhile or not.
> >
> > Agreed, it's rare, especially after Peter's patches which push narrow
> > down rcu eqs regions
> > in the idle path and reduce the chance of any traceable functions
> > happening in between.
> >
> > However, from RCU's perspective, we ought to check if rcu_is_watching
> > theoretically
> > when there's a chance our code will run in the idle path and also we
> > need rcu to be alive,
> > And also we cannot simply make assumptions for any future changes in
> > the idle path.
> > You know, just like what was hit in the thread.
> >
> > > Maybe if you can give a concrete example (e.g., attachment point)
> > > with current code base to show what the issue you encountered and
> > > it will make it easier to judge whether adding !rcu_is_watching()
> > > is necessary or not.
> >
> > I can reproduce likely warnings on v6.1.18 where arch_cpu_idle is
> > traceable but not on the latest version
> > so far. But as I state above, in theory we need it. So here is a
> > gentle ping :) .
>
> hum, this change [1] added rcu_is_watching check to ftrace_test_recursion_trylock,
> which we use in fprobe_handler and is coming to fprobe_exit_handler in [2]
>
> I might be missing something, but it seems like we don't need another
> rcu_is_watching call on kprobe_multi level
Good point! OK, then it seems we don't need it. The rethook continues to
use the rcu_is_watching() because it is also used from kprobes, but the
kprobe_multi doesn't need it.
Thank you,
>
> jirka
>
>
> [1] d099dbfd3306 cpuidle: tracing: Warn about !rcu_is_watching()
> [2] https://lore.kernel.org/bpf/20230517034510.15639-4-zegao@tencent.com/
--
Masami Hiramatsu (Google) <mhiramat@kernel.org>
next prev parent reply other threads:[~2023-05-22 1:37 UTC|newest]
Thread overview: 143+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-15 20:36 [PATCH bpf-next 1/2] cpuidle/rcu: Making arch_cpu_idle and rcu_idle_exit noinstr Jiri Olsa
2022-05-15 20:36 ` [PATCH bpf-next 2/2] selftests/bpf: Remove filter for unsafe functions in kprobe_multi test Jiri Olsa
2022-05-16 4:25 ` [PATCH bpf-next 1/2] cpuidle/rcu: Making arch_cpu_idle and rcu_idle_exit noinstr Paul E. McKenney
2022-05-16 11:49 ` Frederic Weisbecker
2022-05-16 13:39 ` Paul E. McKenney
2022-05-17 10:13 ` Jiri Olsa
2022-05-18 16:21 ` Paul E. McKenney
2022-05-19 11:33 ` Jiri Olsa
2022-05-19 13:54 ` Paul E. McKenney
2022-05-23 13:12 ` Jiri Olsa
2022-05-24 17:33 ` Paul E. McKenney
2022-05-17 2:39 ` kernel test robot
2022-05-17 2:54 ` Yonghong Song
2022-05-17 7:49 ` Jiri Olsa
2022-05-19 0:00 ` Masami Hiramatsu
2022-05-17 9:19 ` kernel test robot
2023-05-20 9:47 ` Ze Gao
2023-05-21 3:58 ` Yonghong Song
2023-05-21 15:10 ` Re: Ze Gao
2023-05-21 20:26 ` Re: Jiri Olsa
2023-05-22 1:36 ` Masami Hiramatsu [this message]
2023-05-22 2:07 ` Re: Ze Gao
2023-05-23 4:38 ` Re: Yonghong Song
2023-05-23 5:30 ` Re: Masami Hiramatsu
2023-05-23 6:59 ` Re: Paul E. McKenney
2023-05-25 0:13 ` Re: Masami Hiramatsu
2023-05-23 14:10 ` kprobes and rcu_is_watching() Steven Rostedt
2023-05-24 3:51 ` Ze Gao
2023-05-21 8:08 ` Jiri Olsa
2023-05-21 10:09 ` Re: Masami Hiramatsu
2023-05-21 14:19 ` Re: Ze Gao
[not found] <CADU64hCr7mshqfBRE2Wp8zf4BHBdJoLLH=VJt2MrHeR+zHOV4w@mail.gmail.com>
2025-07-20 18:26 ` >
2025-07-20 19:30 ` David Lechner
2025-07-21 6:52 ` Re: Krzysztof Kozlowski
[not found] ` <CADU64hDZeyaCpHXBmSG1rtHjpxmjejT7asK9oGBUMF55eYeh4w@mail.gmail.com>
2025-07-21 14:09 ` Re: David Lechner
2025-07-21 7:52 ` Re: Andy Shevchenko
-- strict thread matches above, loose matches on Subject: below --
2025-04-24 0:40 Cong Wang
2025-04-24 0:59 ` Jiayuan Chen
2025-04-24 9:19 ` Re: Jiayuan Chen
2025-04-22 1:53 [PATCH bpf-next] bpf: Remove bpf_get_smp_processor_id_proto Alexei Starovoitov
2025-04-22 8:04 ` Feng Yang
2025-04-22 14:37 ` Alexei Starovoitov
2024-10-15 22:48 Daniel Yang
2024-10-16 1:27 ` Jakub Kicinski
2023-11-27 13:37 [PATCH 2/3] net: microchip_t1s: add support for LAN867x Rev.C1 Andrew Lunn
2023-12-05 10:20 ` Félix Piédallu
2023-12-06 20:58 ` Ramón Nordin Rodriguez
2022-05-06 5:41 Suman Ghosh
2022-05-06 5:43 ` Suman Ghosh
2022-03-04 8:47 Harald Hauge
[not found] <5e7dbb10.ulraq/ljeOm297+z%chenanqing@oppo.com>
2020-03-27 8:59 ` Re: Ilya Dryomov
2018-11-11 10:10 RE, Miss Juliet Muhammad
2018-11-11 4:21 RE, Miss Juliet Muhammad
[not found] <0D151E93-EC9D-4544-9645-C78E53129399@urosario.edu.co>
2018-07-27 15:07 ` Laura Marcela Ramirez Romero
2018-06-22 1:51 Re: VIC J
2018-03-31 13:54 Re: Ms Gloria Chow
2018-02-05 5:30 Re: Fahama Vaserman
2018-01-22 20:16 Re: Emile Kenold
2018-01-12 2:48 Re: Sumitomo Rubber Industries
2017-12-05 7:30 Re: ''CCB ENTERPRISE''
2017-11-13 14:56 Re: Amos Kalonzo
2017-11-01 15:35 Mrs Hsu Wealther
2017-10-18 15:57 Mrs. Marie Angèle O
2017-09-07 13:34 Re: Quick Loan
[not found] <CBDDD7D6C77EEE43BECE3A85947BE9DB0D6CA321@Michael.juniata.edu>
2017-08-09 16:12 ` Ozio, Noelle K (OZIONK15)
2017-06-15 10:10 Sai al
2017-06-11 17:35 Re: Sai al
2017-05-03 7:00 Re: H.A
2017-03-22 11:10 Re: Allen
2017-02-23 15:10 Qin's Yanjun
2017-01-07 14:50 Information
2016-09-27 16:50 (unknown), Rajat Jain
2016-09-27 16:57 ` Rajat Jain
2016-07-02 10:04 Re: Mr. Bun Sam
2016-06-27 8:24 Re: Fidelity Loans
2016-05-02 7:35 Re: Maria-Elisabeth Schaeffler
2016-04-17 18:03 Ali Saeed
2016-04-02 8:16 re: Ali Saeed
2015-12-02 3:54 oder
2015-10-29 2:40 Unknown,
2015-10-24 5:01 RE: JO Bower
2015-10-18 17:08 RE!!!! Qatar Foundation
2015-08-19 14:04 christain147
2015-08-03 22:58 (unknown), Pravin B Shelar
2015-08-04 0:17 ` Pravin Shelar
[not found] <90BA5B564A2E4B4782C6F4398C32EE104E54369A@NHS-PCLI-MBC003.AD1.NHS.NET>
2015-05-21 10:43 ` Ratnakumar Sagana (KING'S COLLEGE HOSPITAL NHS FOUNDATION TRUST)
[not found] <1E0B78595229FD4BABEA7D53921C2C0921FFA882D2@NHS-PCLI-MBC034.AD1.NHS.NET>
2015-05-21 9:07 ` RE: Stock David (NHS GREAT YARMOUTH AND WAVENEY CCG)
2015-05-21 9:07 ` RE: Stock David (NHS GREAT YARMOUTH AND WAVENEY CCG)
2015-01-17 23:32 luiz.malaquias
2014-10-13 6:18 Re: geohughes
2014-09-20 19:19 Re: Richard Wong
[not found] <6A286AB51AD8EC4180C4B2E9EF1D0A027AAD7EFF1E@exmb01.wrschool.net>
2014-09-08 17:36 ` Deborah Mayher
2014-08-18 15:38 Mrs. Hajar Vaserman.
2014-08-06 8:11 Re: Mr Takuo HIROTA
2014-07-24 8:35 Re: Richard Wong
[not found] <web-184297243@uni-stuttgart.de>
2014-06-29 18:53 ` Re: Josko Ozbolt
[not found] <2D5ACE8BD40CD541B552C523B551F244287FAA9C@EXCHDB8.medctr.ad.wfubmc.edu>
2014-06-26 8:36 ` Vernon Ross
2014-06-16 7:51 Angela D.Dawes
2014-05-30 21:39 Re: Mrs.Margaret Woelflein
2014-01-11 2:11 Re: Mr. Jerry Natai
2013-09-23 22:41 (unknown) Tom Herbert
2013-09-23 22:45 ` Tom Herbert
[not found] <B719EF0A9FB7A247B5147CD67A83E60E011FEB76D1@EXCH10-MB3.paterson.k12.nj.us>
2013-08-23 10:52 ` Ruiz, Irma
2013-08-20 9:21 EMIRATES AIRLINE
2013-07-29 13:18 (unknown), Thomas Richter
2013-07-29 15:17 ` Stephen Hemminger
2013-06-09 22:16 Abraham Lincon
2013-02-04 0:47 JUMBO PROMO
2013-02-01 18:30 Re: Young Chang
2013-02-01 18:28 Re: Young Chang
2012-11-17 13:14 UNITED NATION
[not found] <CABNhDQxBMr37chpY_+y_KUh3P1ELDtOERpcn4s=Gy1OMJ2ZHVQ@mail.gmail.com>
2012-10-17 15:18 ` Shravan Mishra
2012-09-08 14:13 (unknown), ranjith kumar
2012-09-08 14:35 ` Rémi Denis-Courmont
2012-05-20 22:27 Re: Mr. Peter Wong
2012-04-12 0:45 Felicia
2012-02-25 12:45 Student Government, SGA
2012-01-19 19:21 Re: BBC Online
2012-01-05 19:49 Re: young Chang
2011-11-10 15:38 Re: Steve Wilson
2011-10-28 16:03 Re: Young Chang
2011-10-28 15:55 Re: Young Chang
2011-10-20 16:53 Re: Linda Williams
2011-10-14 9:54 Re: Hamde Nazar
2011-09-23 12:21 Re: BBC Online
2011-08-18 22:07 (unknown) San Mehat
2011-08-18 22:08 ` San Mehat
2011-02-10 23:13 Re: Young Chang
2011-02-02 13:47 young chang
2011-02-01 10:01 Young Chang
2011-01-28 20:41 Re: Young Chang
2010-10-21 3:07 (unknown), Debashis Dutt
2010-10-21 7:56 ` (unknown) David Miller
2010-10-21 19:48 ` Debashis Dutt
2010-09-27 20:05 (unknown) Jason Gunthorpe
[not found] ` <20100927200500.GB25879-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2010-09-27 20:14 ` David Stevens
[not found] ` <OF056C7E7C.A9A5EFC7-ON882577AB.006E6B89-882577AB.006F2C1E-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2010-09-27 20:23 ` Re: Christoph Lameter
[not found] ` <alpine.DEB.2.00.1009271521510.14117-sBS69tsa9Uj/9pzu0YdTqQ@public.gmane.org>
2010-09-27 20:54 ` Re: Bob Arendt
2010-09-27 22:01 ` Re: David Stevens
2010-09-27 21:50 ` Re: David Stevens
2010-09-28 15:49 ` Re: Christoph Lameter
2010-03-23 7:53 RE, FROM CENTRAL BANK
2010-02-25 13:39 Re; William Wilcox
2009-12-19 16:03 OFFICE OF THE SENATE
2009-09-25 23:16 RE: Irish News Center
2009-09-17 9:37 (unknown), Marc Kleine-Budde
[not found] ` <1253180254-11910-1-git-send-email-mkl-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2009-09-17 9:50 ` Wolfgang Grandegger
2007-08-14 23:04 [PATCH 0/24] make atomic_read() behave consistently across all architectures Chris Snook
2007-08-15 6:49 ` Herbert Xu
2007-08-15 8:18 ` Heiko Carstens
2007-08-15 13:53 ` Stefan Richter
2007-08-15 14:35 ` Satyam Sharma
2007-08-15 14:52 ` Herbert Xu
2007-08-15 16:09 ` Stefan Richter
2007-08-15 16:27 ` Paul E. McKenney
2007-08-15 18:31 ` Segher Boessenkool
2007-08-15 18:57 ` Paul E. McKenney
2007-08-15 19:54 ` Satyam Sharma
2007-08-15 20:47 ` Segher Boessenkool
2007-08-16 0:36 ` (unknown) Satyam Sharma
2007-08-16 1:38 ` Segher Boessenkool
2007-07-05 15:52 (unknown), Bhanu Kalyan Chetlapalli
2007-07-06 3:44 ` pradeep singh
2007-07-06 4:03 ` Re: Bhanu Kalyan Chetlapalli
2006-09-30 6:28 [PATCH] bonding: fix deadlock on high loads in bond_alb_monitor(), Jay Vosburgh
2006-10-05 11:03 ` Jeff Garzik
2006-05-30 8:57 Stanley Morse
2006-05-25 10:41 RE: Sheryl Felix
2006-05-16 10:34 (unknown), Chris Boot
2006-05-16 12:34 ` Arnaldo Carvalho de Melo
2006-04-17 14:44 Re: Teresa Dewitt
2005-08-14 1:22 Re: Îâñàíà
2004-07-05 8:08 Gennie Letty
2004-06-08 20:58 Roman
2003-04-03 16:27 Re: Patty Crazon
2003-01-03 8:56 (unknown), Gao XiaoPeng
2003-01-03 10:11 ` ZHAO Wei
2002-04-28 1:02 Georges PICARD
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230522103652.4c1680bb945cba22ccba6a79@kernel.org \
--to=mhiramat@kernel.org \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=haoluo@google.com \
--cc=john.fastabend@gmail.com \
--cc=kafai@fb.com \
--cc=kpsingh@chromium.org \
--cc=kpsingh@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-trace-kernel@vger.kernel.org \
--cc=martin.lau@linux.dev \
--cc=netdev@vger.kernel.org \
--cc=olsajiri@gmail.com \
--cc=paulmck@kernel.org \
--cc=rostedt@goodmis.org \
--cc=sdf@google.com \
--cc=song@kernel.org \
--cc=songliubraving@fb.com \
--cc=yhs@fb.com \
--cc=yhs@meta.com \
--cc=zegao2021@gmail.com \
--cc=zegao@tencent.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).