From: Steven Rostedt <rostedt@goodmis.org>
To: linux-kernel@vger.kernel.org
Cc: Ingo Molnar <mingo@kernel.org>,
Andrew Morton <akpm@linux-foundation.org>,
Alexei Starovoitov <ast@kernel.org>
Subject: [for-next][PATCH 03/10] ftrace: Return ENOTSUPP when DYNAMIC_FTRACE_WITH_DIRECT_CALLS is not configured
Date: Sat, 23 Nov 2019 13:12:00 -0500 [thread overview]
Message-ID: <20191123181241.108477734@goodmis.org> (raw)
In-Reply-To: <20191123181157.851427201@goodmis.org>
From: Alexei Starovoitov <alexei.starovoitov@gmail.com>
When CONFIG_DYNAMIC_FTRACE_WITH_DIRECT_CALLS is not set it's best to
have the stub functions return ENOTSUPP instead of ENODEV,
otherwise ENODEV is a valid error when ip is incorrect which is
indistinguishable from ftrace not compiled in.
Link: http://lkml.kernel.org/r/CAADnVQ+OzTikM9EhrfsC7NFsVYhATW1SVHxK64w3xn9qpk81pg@mail.gmail.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
---
include/linux/ftrace.h | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/include/linux/ftrace.h b/include/linux/ftrace.h
index dfaa37e1943d..af79b0f8cdc1 100644
--- a/include/linux/ftrace.h
+++ b/include/linux/ftrace.h
@@ -268,16 +268,16 @@ int ftrace_modify_direct_caller(struct ftrace_func_entry *entry,
# define ftrace_direct_func_count 0
static inline int register_ftrace_direct(unsigned long ip, unsigned long addr)
{
- return -ENODEV;
+ return -ENOTSUPP;
}
static inline int unregister_ftrace_direct(unsigned long ip, unsigned long addr)
{
- return -ENODEV;
+ return -ENOTSUPP;
}
static inline int modify_ftrace_direct(unsigned long ip,
unsigned long old_addr, unsigned long new_addr)
{
- return -ENODEV;
+ return -ENOTSUPP;
}
static inline struct ftrace_direct_func *ftrace_find_direct_func(unsigned long addr)
{
--
2.24.0
next prev parent reply other threads:[~2019-11-23 18:12 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-23 18:11 [for-next][PATCH 00/10] tracing: More updates for 5.5 Steven Rostedt
2019-11-23 18:11 ` [for-next][PATCH 01/10] ftrace: Add a helper function to modify_ftrace_direct() to allow arch optimization Steven Rostedt
2019-11-23 18:11 ` [for-next][PATCH 02/10] ftrace: Rename ftrace_graph_stub to ftrace_stub_graph Steven Rostedt
2019-11-23 18:12 ` Steven Rostedt [this message]
2019-11-23 18:12 ` [for-next][PATCH 04/10] ftrace: Use BIT() macro Steven Rostedt
2019-11-23 18:12 ` [for-next][PATCH 05/10] ring-buffer: Fix typos in function ring_buffer_producer Steven Rostedt
2019-11-23 18:12 ` [for-next][PATCH 06/10] tracing: Fix Kconfig indentation Steven Rostedt
2019-11-23 18:12 ` [for-next][PATCH 07/10] tracing: Adding new functions for kernel access to Ftrace instances Steven Rostedt
2019-11-23 18:12 ` [for-next][PATCH 08/10] tracing: Sample module to demonstrate " Steven Rostedt
2019-11-23 18:12 ` [for-next][PATCH 09/10] tracing: Use xarray for syscall trace events Steven Rostedt
2019-11-23 18:12 ` [for-next][PATCH 10/10] tracing: Enable syscall optimization for MIPS Steven Rostedt
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=20191123181241.108477734@goodmis.org \
--to=rostedt@goodmis.org \
--cc=akpm@linux-foundation.org \
--cc=ast@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
/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
Powered by JetHome