[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAOnJCU+kMJCrwJ5MD2pYRoub1TpVGgpfX=6nNG2uFB6PNJLEiA@mail.gmail.com>
Date: Tue, 3 Nov 2020 07:33:37 -0800
From: Atish Patra <atishp@...shpatra.org>
To: Guo Ren <guoren@...nel.org>
Cc: Steven Rostedt <rostedt@...dmis.org>, Zong Li <zong.li@...ive.com>,
Paul McKenney <paulmck@...nel.org>, josh@...htriplett.org,
mathieu.desnoyers@...icios.com, jiangshanlai@...il.com,
joel@...lfernandes.org, vincent.whitchurch@...s.com,
Thomas Gleixner <tglx@...utronix.de>,
Paul Walmsley <paul.walmsley@...ive.com>,
Palmer Dabbelt <palmerdabbelt@...gle.com>,
Masami Hiramatsu <mhiramat@...nel.org>,
Greentime Hu <greentime.hu@...ive.com>,
Colin Ian King <colin.king@...onical.com>,
rcu@...r.kernel.org,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
linux-riscv <linux-riscv@...ts.infradead.org>
Subject: Re: [PATCH] stop_machine: Mark functions as notrace
On Sat, Oct 31, 2020 at 12:42 AM Guo Ren <guoren@...nel.org> wrote:
>
> On Sat, Oct 31, 2020 at 8:28 AM Steven Rostedt <rostedt@...dmis.org> wrote:
> >
> > On Fri, 30 Oct 2020 14:47:56 -0700
> > Atish Patra <atishp@...shpatra.org> wrote:
> >
> > > > Look at arm64, they __kprobes flag and I guess it would also prevent
> > > > ftrace call site.
> > > >
> > >
> > > Are you sure about that ? __kprobes puts the code in .kprobes.text section
> > > which is under whitelist sections in recordmcount.pl & recordmcount.c.
> >
> > Correct, ftrace can trace functions marked with __kprobes. That said,
> I guess wrong, thx for correct me.
>
> > the instruction you are looking at here, is in a file that is
> > blacklisted from recordmcount.
> >
> > CFLAGS_REMOVE_insn.o = $(CC_FLAGS_FTRACE)
> >
> > All ftrace flags are removed from the compiling of insn.c, and every
> > function in that file will not be traced.
> Yes, arm64 prevents the whole file from ftrace. My patch just use
> notrace flag setting on some functions.
>
> @Atish How do think:
> CFLAGS_REMOVE_cacheflush.o = $(CC_FLAGS_FTRACE)
> CFLAGS_REMOVE_sbi.o = $(CC_FLAGS_FTRACE)
>
Looks good to me. What should be done for copy_to_kernel_nofault ?
That is also in the calling path.
> --
> Best Regards
> Guo Ren
>
> ML: https://lore.kernel.org/linux-csky/
--
Regards,
Atish
Powered by blists - more mailing lists