* [jolsa-perf:trampoline_multi_10 10/21] kernel/trace/ftrace.c:6149: warning: Function parameter or struct member 'hash' not described in 'modify_ftrace_direct_nolock_hash'
@ 2024-10-23 7:57 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2024-10-23 7:57 UTC (permalink / raw)
To: Jiri Olsa; +Cc: llvm, oe-kbuild-all
tree: https://git.kernel.org/pub/scm/linux/kernel/git/jolsa/perf.git trampoline_multi_10
head: 48132820c5a21b82d1a4507a86a67b3742fb110e
commit: 981740a59cbb2e997c7cb9a640ef5e8a1d4fe471 [10/21] ftrace: Add modify_ftrace_direct_[nolock_]hash function
config: x86_64-kexec (https://download.01.org/0day-ci/archive/20241023/202410231555.ZGW6mgh1-lkp@intel.com/config)
compiler: clang version 18.1.8 (https://github.com/llvm/llvm-project 3b5b5c1ec4a3095ab096dd780e84d7ab81f3d7ff)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241023/202410231555.ZGW6mgh1-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202410231555.ZGW6mgh1-lkp@intel.com/
All warnings (new ones prefixed by >>):
kernel/trace/ftrace.c:5887: warning: Function parameter or struct member 'hash' not described in 'register_ftrace_direct_hash'
kernel/trace/ftrace.c:5887: warning: expecting prototype for register_ftrace_direct(). Prototype was for register_ftrace_direct_hash() instead
kernel/trace/ftrace.c:6001: warning: Function parameter or struct member 'hash' not described in 'unregister_ftrace_direct_hash'
kernel/trace/ftrace.c:6001: warning: expecting prototype for unregister_ftrace_direct(). Prototype was for unregister_ftrace_direct_hash() instead
>> kernel/trace/ftrace.c:6149: warning: Function parameter or struct member 'hash' not described in 'modify_ftrace_direct_nolock_hash'
>> kernel/trace/ftrace.c:6149: warning: expecting prototype for modify_ftrace_direct_nolock(). Prototype was for modify_ftrace_direct_nolock_hash() instead
>> kernel/trace/ftrace.c:6197: warning: Function parameter or struct member 'hash' not described in 'modify_ftrace_direct_hash'
>> kernel/trace/ftrace.c:6197: warning: expecting prototype for modify_ftrace_direct(). Prototype was for modify_ftrace_direct_hash() instead
vim +6149 kernel/trace/ftrace.c
f96f644ab97abe Song Liu 2022-07-19 6128
f96f644ab97abe Song Liu 2022-07-19 6129 /**
da8bdfbd422333 Florent Revest 2023-03-21 6130 * modify_ftrace_direct_nolock - Modify an existing direct 'multi' call
f96f644ab97abe Song Liu 2022-07-19 6131 * to call something else
f96f644ab97abe Song Liu 2022-07-19 6132 * @ops: The address of the struct ftrace_ops object
c488fe4b50d896 Jiri Olsa 2024-09-30 6133 * @ip: The address of the function to attach
f96f644ab97abe Song Liu 2022-07-19 6134 * @addr: The address of the new trampoline to call at @ops functions
f96f644ab97abe Song Liu 2022-07-19 6135 *
f96f644ab97abe Song Liu 2022-07-19 6136 * This is used to unregister currently registered direct caller and
f96f644ab97abe Song Liu 2022-07-19 6137 * register new one @addr on functions registered in @ops object.
f96f644ab97abe Song Liu 2022-07-19 6138 *
f96f644ab97abe Song Liu 2022-07-19 6139 * Note there's window between ftrace_shutdown and ftrace_startup calls
f96f644ab97abe Song Liu 2022-07-19 6140 * where there will be no callbacks called.
f96f644ab97abe Song Liu 2022-07-19 6141 *
f96f644ab97abe Song Liu 2022-07-19 6142 * Caller should already have direct_mutex locked, so we don't lock
f96f644ab97abe Song Liu 2022-07-19 6143 * direct_mutex here.
f96f644ab97abe Song Liu 2022-07-19 6144 *
f96f644ab97abe Song Liu 2022-07-19 6145 * Returns: zero on success. Non zero on error, which includes:
f96f644ab97abe Song Liu 2022-07-19 6146 * -EINVAL - The @ops object was not properly registered.
f96f644ab97abe Song Liu 2022-07-19 6147 */
981740a59cbb2e Jiri Olsa 2024-10-15 6148 int modify_ftrace_direct_nolock_hash(struct ftrace_ops *ops, struct ftrace_hash *hash)
f96f644ab97abe Song Liu 2022-07-19 @6149 {
f96f644ab97abe Song Liu 2022-07-19 6150 if (check_direct_multi(ops))
f96f644ab97abe Song Liu 2022-07-19 6151 return -EINVAL;
f96f644ab97abe Song Liu 2022-07-19 6152 if (!(ops->flags & FTRACE_OPS_FL_ENABLED))
f96f644ab97abe Song Liu 2022-07-19 6153 return -EINVAL;
c488fe4b50d896 Jiri Olsa 2024-09-30 6154 if (direct_functions == EMPTY_HASH)
c488fe4b50d896 Jiri Olsa 2024-09-30 6155 return -EINVAL;
f96f644ab97abe Song Liu 2022-07-19 6156
981740a59cbb2e Jiri Olsa 2024-10-15 6157 return __modify_ftrace_direct(ops, hash);
f96f644ab97abe Song Liu 2022-07-19 6158 }
da8bdfbd422333 Florent Revest 2023-03-21 6159 EXPORT_SYMBOL_GPL(modify_ftrace_direct_nolock);
f96f644ab97abe Song Liu 2022-07-19 6160
981740a59cbb2e Jiri Olsa 2024-10-15 6161 int modify_ftrace_direct_nolock(struct ftrace_ops *ops, unsigned long ip, unsigned long addr)
981740a59cbb2e Jiri Olsa 2024-10-15 6162 {
981740a59cbb2e Jiri Olsa 2024-10-15 6163 struct ftrace_hash *hash;
981740a59cbb2e Jiri Olsa 2024-10-15 6164 int err = -EINVAL;
981740a59cbb2e Jiri Olsa 2024-10-15 6165
981740a59cbb2e Jiri Olsa 2024-10-15 6166 hash = alloc_ftrace_hash(FTRACE_HASH_DEFAULT_BITS);
981740a59cbb2e Jiri Olsa 2024-10-15 6167 if (!hash)
981740a59cbb2e Jiri Olsa 2024-10-15 6168 return -ENOMEM;
981740a59cbb2e Jiri Olsa 2024-10-15 6169
981740a59cbb2e Jiri Olsa 2024-10-15 6170 if (add_hash_entry_direct(hash, ip, addr) == NULL)
981740a59cbb2e Jiri Olsa 2024-10-15 6171 goto free_hash;
981740a59cbb2e Jiri Olsa 2024-10-15 6172
981740a59cbb2e Jiri Olsa 2024-10-15 6173 err = modify_ftrace_direct_nolock_hash(ops, hash);
981740a59cbb2e Jiri Olsa 2024-10-15 6174
981740a59cbb2e Jiri Olsa 2024-10-15 6175 free_hash:
981740a59cbb2e Jiri Olsa 2024-10-15 6176 free_ftrace_hash(hash);
981740a59cbb2e Jiri Olsa 2024-10-15 6177 return err;
981740a59cbb2e Jiri Olsa 2024-10-15 6178 }
981740a59cbb2e Jiri Olsa 2024-10-15 6179
f96f644ab97abe Song Liu 2022-07-19 6180 /**
da8bdfbd422333 Florent Revest 2023-03-21 6181 * modify_ftrace_direct - Modify an existing direct 'multi' call
f96f644ab97abe Song Liu 2022-07-19 6182 * to call something else
f96f644ab97abe Song Liu 2022-07-19 6183 * @ops: The address of the struct ftrace_ops object
c488fe4b50d896 Jiri Olsa 2024-09-30 6184 * @ip: The address of the function to attach
f96f644ab97abe Song Liu 2022-07-19 6185 * @addr: The address of the new trampoline to call at @ops functions
f96f644ab97abe Song Liu 2022-07-19 6186 *
f96f644ab97abe Song Liu 2022-07-19 6187 * This is used to unregister currently registered direct caller and
f96f644ab97abe Song Liu 2022-07-19 6188 * register new one @addr on functions registered in @ops object.
f96f644ab97abe Song Liu 2022-07-19 6189 *
f96f644ab97abe Song Liu 2022-07-19 6190 * Note there's window between ftrace_shutdown and ftrace_startup calls
f96f644ab97abe Song Liu 2022-07-19 6191 * where there will be no callbacks called.
f96f644ab97abe Song Liu 2022-07-19 6192 *
f96f644ab97abe Song Liu 2022-07-19 6193 * Returns: zero on success. Non zero on error, which includes:
f96f644ab97abe Song Liu 2022-07-19 6194 * -EINVAL - The @ops object was not properly registered.
f96f644ab97abe Song Liu 2022-07-19 6195 */
981740a59cbb2e Jiri Olsa 2024-10-15 6196 int modify_ftrace_direct_hash(struct ftrace_ops *ops, struct ftrace_hash *hash)
f96f644ab97abe Song Liu 2022-07-19 @6197 {
f96f644ab97abe Song Liu 2022-07-19 6198 int err;
f96f644ab97abe Song Liu 2022-07-19 6199
f96f644ab97abe Song Liu 2022-07-19 6200 if (check_direct_multi(ops))
f96f644ab97abe Song Liu 2022-07-19 6201 return -EINVAL;
f96f644ab97abe Song Liu 2022-07-19 6202 if (!(ops->flags & FTRACE_OPS_FL_ENABLED))
f96f644ab97abe Song Liu 2022-07-19 6203 return -EINVAL;
c488fe4b50d896 Jiri Olsa 2024-09-30 6204 if (direct_functions == EMPTY_HASH)
c488fe4b50d896 Jiri Olsa 2024-09-30 6205 return -EINVAL;
f96f644ab97abe Song Liu 2022-07-19 6206
f96f644ab97abe Song Liu 2022-07-19 6207 mutex_lock(&direct_mutex);
981740a59cbb2e Jiri Olsa 2024-10-15 6208 err = __modify_ftrace_direct(ops, hash);
ccf5a89efd6f0a Jiri Olsa 2021-10-08 6209 mutex_unlock(&direct_mutex);
ccf5a89efd6f0a Jiri Olsa 2021-10-08 6210 return err;
ccf5a89efd6f0a Jiri Olsa 2021-10-08 6211 }
da8bdfbd422333 Florent Revest 2023-03-21 6212 EXPORT_SYMBOL_GPL(modify_ftrace_direct);
981740a59cbb2e Jiri Olsa 2024-10-15 6213
:::::: The code at line 6149 was first introduced by commit
:::::: f96f644ab97abeed3f7007c953836a574ce928cc ftrace: Add modify_ftrace_direct_multi_nolock
:::::: TO: Song Liu <song@kernel.org>
:::::: CC: Daniel Borkmann <daniel@iogearbox.net>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2024-10-23 7:57 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-23 7:57 [jolsa-perf:trampoline_multi_10 10/21] kernel/trace/ftrace.c:6149: warning: Function parameter or struct member 'hash' not described in 'modify_ftrace_direct_nolock_hash' kernel test robot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox