kernel/trace/ftrace.c:5477:35: sparse: expected struct ftrace_hash __rcu ftrace_graph_hash

From: kernel test robot
Date: Tue Aug 11 2020 - 05:25:34 EST


tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 00e4db51259a5f936fec1424b884f029479d3981
commit: 670d0a4b10704667765f7d18f7592993d02783aa sparse: use identifiers to define address spaces
date: 8 weeks ago
config: arm64-randconfig-s032-20200811 (attached as .config)
compiler: aarch64-linux-gcc (GCC) 9.3.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.2-168-g9554805c-dirty
git checkout 670d0a4b10704667765f7d18f7592993d02783aa
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=arm64

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>


sparse warnings: (new ones prefixed by >>)

kernel/trace/ftrace.c:292:16: sparse: expected struct ftrace_ops **p
kernel/trace/ftrace.c:292:16: sparse: got struct ftrace_ops [noderef] __rcu **list
kernel/trace/ftrace.c:292:50: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct ftrace_ops **p @@ got struct ftrace_ops [noderef] __rcu ** @@
kernel/trace/ftrace.c:292:50: sparse: expected struct ftrace_ops **p
kernel/trace/ftrace.c:292:50: sparse: got struct ftrace_ops [noderef] __rcu **
kernel/trace/ftrace.c:299:12: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct ftrace_ops * @@ got struct ftrace_ops [noderef] __rcu *next @@
kernel/trace/ftrace.c:299:12: sparse: expected struct ftrace_ops *
kernel/trace/ftrace.c:299:12: sparse: got struct ftrace_ops [noderef] __rcu *next
kernel/trace/ftrace.c:587:5: sparse: sparse: symbol 'ftrace_profile_pages_init' was not declared. Should it be static?
kernel/trace/ftrace.c:1043:43: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected struct ftrace_hash [noderef] __rcu *notrace_hash @@ got struct ftrace_hash * @@
kernel/trace/ftrace.c:1043:43: sparse: expected struct ftrace_hash [noderef] __rcu *notrace_hash
kernel/trace/ftrace.c:1043:43: sparse: got struct ftrace_hash *
kernel/trace/ftrace.c:1044:43: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected struct ftrace_hash [noderef] __rcu *filter_hash @@ got struct ftrace_hash * @@
kernel/trace/ftrace.c:1044:43: sparse: expected struct ftrace_hash [noderef] __rcu *filter_hash
kernel/trace/ftrace.c:1044:43: sparse: got struct ftrace_hash *
kernel/trace/ftrace.c:1263:40: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct ftrace_hash *hash @@ got struct ftrace_hash [noderef] __rcu *filter_hash @@
kernel/trace/ftrace.c:1263:40: sparse: expected struct ftrace_hash *hash
kernel/trace/ftrace.c:1263:40: sparse: got struct ftrace_hash [noderef] __rcu *filter_hash
kernel/trace/ftrace.c:1264:40: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct ftrace_hash *hash @@ got struct ftrace_hash [noderef] __rcu *notrace_hash @@
kernel/trace/ftrace.c:1264:40: sparse: expected struct ftrace_hash *hash
kernel/trace/ftrace.c:1264:40: sparse: got struct ftrace_hash [noderef] __rcu *notrace_hash
kernel/trace/ftrace.c:1959:54: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected struct ftrace_hash *old_hash @@ got struct ftrace_hash [noderef] __rcu *filter_hash @@
kernel/trace/ftrace.c:1959:54: sparse: expected struct ftrace_hash *old_hash
kernel/trace/ftrace.c:1959:54: sparse: got struct ftrace_hash [noderef] __rcu *filter_hash
kernel/trace/ftrace.c:1445:9: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/trace/ftrace.c:1445:9: sparse: struct ftrace_hash [noderef] __rcu *
kernel/trace/ftrace.c:1445:9: sparse: struct ftrace_hash *
kernel/trace/ftrace.c:1461:39: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct ftrace_hash *hash @@ got struct ftrace_hash [noderef] __rcu *filter_hash @@
kernel/trace/ftrace.c:1461:39: sparse: expected struct ftrace_hash *hash
kernel/trace/ftrace.c:1461:39: sparse: got struct ftrace_hash [noderef] __rcu *filter_hash
kernel/trace/ftrace.c:1462:40: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct ftrace_hash *hash @@ got struct ftrace_hash [noderef] __rcu *filter_hash @@
kernel/trace/ftrace.c:1462:40: sparse: expected struct ftrace_hash *hash
kernel/trace/ftrace.c:1462:40: sparse: got struct ftrace_hash [noderef] __rcu *filter_hash
kernel/trace/ftrace.c:1463:40: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct ftrace_hash *hash @@ got struct ftrace_hash [noderef] __rcu *notrace_hash @@
kernel/trace/ftrace.c:1463:40: sparse: expected struct ftrace_hash *hash
kernel/trace/ftrace.c:1463:40: sparse: got struct ftrace_hash [noderef] __rcu *notrace_hash
kernel/trace/ftrace.c:1464:42: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct ftrace_hash *hash @@ got struct ftrace_hash [noderef] __rcu *notrace_hash @@
kernel/trace/ftrace.c:1464:42: sparse: expected struct ftrace_hash *hash
kernel/trace/ftrace.c:1464:42: sparse: got struct ftrace_hash [noderef] __rcu *notrace_hash
kernel/trace/ftrace.c:1618:18: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct ftrace_ops *ops @@ got struct ftrace_ops [noderef] __rcu *[addressable] [toplevel] ftrace_ops_list @@
kernel/trace/ftrace.c:1618:18: sparse: expected struct ftrace_ops *ops
kernel/trace/ftrace.c:1618:18: sparse: got struct ftrace_ops [noderef] __rcu *[addressable] [toplevel] ftrace_ops_list
kernel/trace/ftrace.c:1619:43: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct ftrace_ops *ops @@ got struct ftrace_ops [noderef] __rcu *next @@
kernel/trace/ftrace.c:1619:43: sparse: expected struct ftrace_ops *ops
kernel/trace/ftrace.c:1619:43: sparse: got struct ftrace_ops [noderef] __rcu *next
kernel/trace/ftrace.c:1665:22: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct ftrace_hash *hash @@ got struct ftrace_hash [noderef] __rcu *filter_hash @@
kernel/trace/ftrace.c:1665:22: sparse: expected struct ftrace_hash *hash
kernel/trace/ftrace.c:1665:22: sparse: got struct ftrace_hash [noderef] __rcu *filter_hash
kernel/trace/ftrace.c:1666:28: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct ftrace_hash *other_hash @@ got struct ftrace_hash [noderef] __rcu *notrace_hash @@
kernel/trace/ftrace.c:1666:28: sparse: expected struct ftrace_hash *other_hash
kernel/trace/ftrace.c:1666:28: sparse: got struct ftrace_hash [noderef] __rcu *notrace_hash
kernel/trace/ftrace.c:1671:22: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct ftrace_hash *hash @@ got struct ftrace_hash [noderef] __rcu *notrace_hash @@
kernel/trace/ftrace.c:1671:22: sparse: expected struct ftrace_hash *hash
kernel/trace/ftrace.c:1671:22: sparse: got struct ftrace_hash [noderef] __rcu *notrace_hash
kernel/trace/ftrace.c:1672:28: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct ftrace_hash *other_hash @@ got struct ftrace_hash [noderef] __rcu *filter_hash @@
kernel/trace/ftrace.c:1672:28: sparse: expected struct ftrace_hash *other_hash
kernel/trace/ftrace.c:1672:28: sparse: got struct ftrace_hash [noderef] __rcu *filter_hash
kernel/trace/ftrace.c:1937:50: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected struct ftrace_hash *hash @@ got struct ftrace_hash [noderef] __rcu *filter_hash @@
kernel/trace/ftrace.c:1937:50: sparse: expected struct ftrace_hash *hash
kernel/trace/ftrace.c:1937:50: sparse: got struct ftrace_hash [noderef] __rcu *filter_hash
kernel/trace/ftrace.c:1948:50: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected struct ftrace_hash *hash @@ got struct ftrace_hash [noderef] __rcu *filter_hash @@
kernel/trace/ftrace.c:1948:50: sparse: expected struct ftrace_hash *hash
kernel/trace/ftrace.c:1948:50: sparse: got struct ftrace_hash [noderef] __rcu *filter_hash
kernel/trace/ftrace.c:3220:14: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct ftrace_hash *hash @@ got struct ftrace_hash [noderef] __rcu *filter_hash @@
kernel/trace/ftrace.c:3220:14: sparse: expected struct ftrace_hash *hash
kernel/trace/ftrace.c:3220:14: sparse: got struct ftrace_hash [noderef] __rcu *filter_hash
kernel/trace/ftrace.c:3237:22: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct ftrace_hash *hash @@ got struct ftrace_hash [noderef] __rcu *filter_hash @@
kernel/trace/ftrace.c:3237:22: sparse: expected struct ftrace_hash *hash
kernel/trace/ftrace.c:3237:22: sparse: got struct ftrace_hash [noderef] __rcu *filter_hash
kernel/trace/ftrace.c:3712:22: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct ftrace_hash *hash @@ got struct ftrace_hash [noderef] __rcu *notrace_hash @@
kernel/trace/ftrace.c:3712:22: sparse: expected struct ftrace_hash *hash
kernel/trace/ftrace.c:3712:22: sparse: got struct ftrace_hash [noderef] __rcu *notrace_hash
kernel/trace/ftrace.c:3715:22: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct ftrace_hash *hash @@ got struct ftrace_hash [noderef] __rcu *filter_hash @@
kernel/trace/ftrace.c:3715:22: sparse: expected struct ftrace_hash *hash
kernel/trace/ftrace.c:3715:22: sparse: got struct ftrace_hash [noderef] __rcu *filter_hash
kernel/trace/ftrace.c:4117:27: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct ftrace_hash **orig_hash @@ got struct ftrace_hash [noderef] __rcu ** @@
kernel/trace/ftrace.c:4117:27: sparse: expected struct ftrace_hash **orig_hash
kernel/trace/ftrace.c:4117:27: sparse: got struct ftrace_hash [noderef] __rcu **
kernel/trace/ftrace.c:4119:27: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct ftrace_hash **orig_hash @@ got struct ftrace_hash [noderef] __rcu ** @@
kernel/trace/ftrace.c:4119:27: sparse: expected struct ftrace_hash **orig_hash
kernel/trace/ftrace.c:4119:27: sparse: got struct ftrace_hash [noderef] __rcu **
kernel/trace/ftrace.c:4491:19: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct ftrace_hash **orig_hash @@ got struct ftrace_hash [noderef] __rcu ** @@
kernel/trace/ftrace.c:4491:19: sparse: expected struct ftrace_hash **orig_hash
kernel/trace/ftrace.c:4491:19: sparse: got struct ftrace_hash [noderef] __rcu **
kernel/trace/ftrace.c:4633:19: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct ftrace_hash **orig_hash @@ got struct ftrace_hash [noderef] __rcu ** @@
kernel/trace/ftrace.c:4633:19: sparse: expected struct ftrace_hash **orig_hash
kernel/trace/ftrace.c:4633:19: sparse: got struct ftrace_hash [noderef] __rcu **
kernel/trace/ftrace.c:4639:34: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct ftrace_hash [noderef] __rcu *filter_hash @@ got struct ftrace_hash *[assigned] old_hash @@
kernel/trace/ftrace.c:4639:34: sparse: expected struct ftrace_hash [noderef] __rcu *filter_hash
kernel/trace/ftrace.c:4639:34: sparse: got struct ftrace_hash *[assigned] old_hash
kernel/trace/ftrace.c:4891:27: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct ftrace_hash **orig_hash @@ got struct ftrace_hash [noderef] __rcu ** @@
kernel/trace/ftrace.c:4891:27: sparse: expected struct ftrace_hash **orig_hash
kernel/trace/ftrace.c:4891:27: sparse: got struct ftrace_hash [noderef] __rcu **
kernel/trace/ftrace.c:4893:27: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct ftrace_hash **orig_hash @@ got struct ftrace_hash [noderef] __rcu ** @@
kernel/trace/ftrace.c:4893:27: sparse: expected struct ftrace_hash **orig_hash
kernel/trace/ftrace.c:4893:27: sparse: got struct ftrace_hash [noderef] __rcu **
kernel/trace/ftrace.c:5477:35: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct ftrace_hash [noderef] __rcu *extern [addressable] [toplevel] ftrace_graph_hash @@ got struct ftrace_hash *[assigned] hash @@
>> kernel/trace/ftrace.c:5477:35: sparse: expected struct ftrace_hash [noderef] __rcu *extern [addressable] [toplevel] ftrace_graph_hash
kernel/trace/ftrace.c:5477:35: sparse: got struct ftrace_hash *[assigned] hash
kernel/trace/ftrace.c:5479:43: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct ftrace_hash [noderef] __rcu *extern [addressable] [toplevel] ftrace_graph_notrace_hash @@ got struct ftrace_hash *[assigned] hash @@
>> kernel/trace/ftrace.c:5479:43: sparse: expected struct ftrace_hash [noderef] __rcu *extern [addressable] [toplevel] ftrace_graph_notrace_hash
kernel/trace/ftrace.c:5479:43: sparse: got struct ftrace_hash *[assigned] hash
kernel/trace/ftrace.c:5538:35: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct ftrace_hash **orig_hash @@ got struct ftrace_hash [noderef] __rcu ** @@
kernel/trace/ftrace.c:5538:35: sparse: expected struct ftrace_hash **orig_hash
kernel/trace/ftrace.c:5538:35: sparse: got struct ftrace_hash [noderef] __rcu **
kernel/trace/ftrace.c:5542:35: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct ftrace_hash **orig_hash @@ got struct ftrace_hash [noderef] __rcu ** @@
kernel/trace/ftrace.c:5542:35: sparse: expected struct ftrace_hash **orig_hash
kernel/trace/ftrace.c:5542:35: sparse: got struct ftrace_hash [noderef] __rcu **
kernel/trace/ftrace.c:5596:47: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected struct ftrace_hash [noderef] __rcu *[addressable] [toplevel] ftrace_graph_hash @@ got struct ftrace_hash * @@
>> kernel/trace/ftrace.c:5596:47: sparse: expected struct ftrace_hash [noderef] __rcu *[addressable] [toplevel] ftrace_graph_hash
kernel/trace/ftrace.c:5596:47: sparse: got struct ftrace_hash *
kernel/trace/ftrace.c:5597:55: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected struct ftrace_hash [noderef] __rcu *[addressable] [toplevel] ftrace_graph_notrace_hash @@ got struct ftrace_hash * @@
>> kernel/trace/ftrace.c:5597:55: sparse: expected struct ftrace_hash [noderef] __rcu *[addressable] [toplevel] ftrace_graph_notrace_hash
kernel/trace/ftrace.c:5597:55: sparse: got struct ftrace_hash *
kernel/trace/ftrace.c:6192:18: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct ftrace_ops *ops @@ got struct ftrace_ops [noderef] __rcu *[addressable] [toplevel] ftrace_ops_list @@
kernel/trace/ftrace.c:6192:18: sparse: expected struct ftrace_ops *ops
kernel/trace/ftrace.c:6192:18: sparse: got struct ftrace_ops [noderef] __rcu *[addressable] [toplevel] ftrace_ops_list
kernel/trace/ftrace.c:6192:66: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct ftrace_ops *ops @@ got struct ftrace_ops [noderef] __rcu *next @@
kernel/trace/ftrace.c:6192:66: sparse: expected struct ftrace_ops *ops
kernel/trace/ftrace.c:6192:66: sparse: got struct ftrace_ops [noderef] __rcu *next
kernel/trace/ftrace.c:6233:59: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected struct ftrace_hash *hash @@ got struct ftrace_hash [noderef] __rcu *filter_hash @@
kernel/trace/ftrace.c:6233:59: sparse: expected struct ftrace_hash *hash
kernel/trace/ftrace.c:6233:59: sparse: got struct ftrace_hash [noderef] __rcu *filter_hash
kernel/trace/ftrace.c:6234:59: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected struct ftrace_hash *hash @@ got struct ftrace_hash [noderef] __rcu *notrace_hash @@
kernel/trace/ftrace.c:6234:59: sparse: expected struct ftrace_hash *hash
kernel/trace/ftrace.c:6234:59: sparse: got struct ftrace_hash [noderef] __rcu *notrace_hash
kernel/trace/ftrace.c:6589:62: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected struct ftrace_hash *hash @@ got struct ftrace_hash [noderef] __rcu *filter_hash @@
kernel/trace/ftrace.c:6589:62: sparse: expected struct ftrace_hash *hash
kernel/trace/ftrace.c:6589:62: sparse: got struct ftrace_hash [noderef] __rcu *filter_hash
kernel/trace/ftrace.c:6590:62: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected struct ftrace_hash *hash @@ got struct ftrace_hash [noderef] __rcu *notrace_hash @@
kernel/trace/ftrace.c:6590:62: sparse: expected struct ftrace_hash *hash
kernel/trace/ftrace.c:6590:62: sparse: got struct ftrace_hash [noderef] __rcu *notrace_hash
kernel/trace/ftrace.c:6636:36: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/trace/ftrace.c:6636:36: sparse: struct ftrace_ops [noderef] __rcu *
kernel/trace/ftrace.c:6636:36: sparse: struct ftrace_ops *
kernel/trace/ftrace.c:7423:43: sparse: sparse: incorrect type in argument 3 (different address spaces) @@ expected void * @@ got void [noderef] __user *buffer @@
kernel/trace/ftrace.c:7423:43: sparse: expected void *
kernel/trace/ftrace.c:7423:43: sparse: got void [noderef] __user *buffer
kernel/trace/ftrace.c:203:20: sparse: sparse: dereference of noderef expression
kernel/trace/ftrace.c:203:20: sparse: sparse: dereference of noderef expression
kernel/trace/ftrace.c:203:20: sparse: sparse: dereference of noderef expression
kernel/trace/ftrace.c:3011:46: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct ftrace_hash *hash @@ got struct ftrace_hash [noderef] __rcu *filter_hash @@
kernel/trace/ftrace.c:3011:46: sparse: expected struct ftrace_hash *hash
kernel/trace/ftrace.c:3011:46: sparse: got struct ftrace_hash [noderef] __rcu *filter_hash
kernel/trace/ftrace.c:3012:47: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct ftrace_hash *hash @@ got struct ftrace_hash [noderef] __rcu *filter_hash @@
kernel/trace/ftrace.c:3012:47: sparse: expected struct ftrace_hash *hash
kernel/trace/ftrace.c:3012:47: sparse: got struct ftrace_hash [noderef] __rcu *filter_hash
kernel/trace/ftrace.c:3016:44: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct ftrace_hash *hash @@ got struct ftrace_hash [noderef] __rcu *notrace_hash @@
kernel/trace/ftrace.c:3016:44: sparse: expected struct ftrace_hash *hash
kernel/trace/ftrace.c:3016:44: sparse: got struct ftrace_hash [noderef] __rcu *notrace_hash
kernel/trace/ftrace.c:2988:48: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct ftrace_hash *hash @@ got struct ftrace_hash [noderef] __rcu *filter_hash @@
kernel/trace/ftrace.c:2988:48: sparse: expected struct ftrace_hash *hash
kernel/trace/ftrace.c:2988:48: sparse: got struct ftrace_hash [noderef] __rcu *filter_hash
kernel/trace/ftrace.c:2989:49: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct ftrace_hash *hash @@ got struct ftrace_hash [noderef] __rcu *notrace_hash @@
kernel/trace/ftrace.c:2989:49: sparse: expected struct ftrace_hash *hash
kernel/trace/ftrace.c:2989:49: sparse: got struct ftrace_hash [noderef] __rcu *notrace_hash

vim +5477 kernel/trace/ftrace.c

0d7d9a16ce11268 Namhyung Kim 2014-06-13 5456
0d7d9a16ce11268 Namhyung Kim 2014-06-13 5457 static void __init set_ftrace_early_graph(char *buf, int enable)
369bc18f9a6c4e2 Stefan Assmann 2009-10-12 5458 {
369bc18f9a6c4e2 Stefan Assmann 2009-10-12 5459 int ret;
369bc18f9a6c4e2 Stefan Assmann 2009-10-12 5460 char *func;
b9b0c831bed2682 Namhyung Kim 2017-01-20 5461 struct ftrace_hash *hash;
0d7d9a16ce11268 Namhyung Kim 2014-06-13 5462
92ad18ec26611e8 Steven Rostedt (VMware 2017-03-02 5463) hash = alloc_ftrace_hash(FTRACE_HASH_DEFAULT_BITS);
24589e3a20876dc Steven Rostedt (VMware 2020-01-25 5464) if (MEM_FAIL(!hash, "Failed to allocate hash\n"))
92ad18ec26611e8 Steven Rostedt (VMware 2017-03-02 5465) return;
369bc18f9a6c4e2 Stefan Assmann 2009-10-12 5466
369bc18f9a6c4e2 Stefan Assmann 2009-10-12 5467 while (buf) {
369bc18f9a6c4e2 Stefan Assmann 2009-10-12 5468 func = strsep(&buf, ",");
369bc18f9a6c4e2 Stefan Assmann 2009-10-12 5469 /* we allow only one expression at a time */
b9b0c831bed2682 Namhyung Kim 2017-01-20 5470 ret = ftrace_graph_set_hash(hash, func);
369bc18f9a6c4e2 Stefan Assmann 2009-10-12 5471 if (ret)
369bc18f9a6c4e2 Stefan Assmann 2009-10-12 5472 printk(KERN_DEBUG "ftrace: function %s not "
369bc18f9a6c4e2 Stefan Assmann 2009-10-12 5473 "traceable\n", func);
369bc18f9a6c4e2 Stefan Assmann 2009-10-12 5474 }
92ad18ec26611e8 Steven Rostedt (VMware 2017-03-02 5475)
92ad18ec26611e8 Steven Rostedt (VMware 2017-03-02 5476) if (enable)
92ad18ec26611e8 Steven Rostedt (VMware 2017-03-02 @5477) ftrace_graph_hash = hash;
92ad18ec26611e8 Steven Rostedt (VMware 2017-03-02 5478) else
92ad18ec26611e8 Steven Rostedt (VMware 2017-03-02 @5479) ftrace_graph_notrace_hash = hash;
369bc18f9a6c4e2 Stefan Assmann 2009-10-12 5480 }
369bc18f9a6c4e2 Stefan Assmann 2009-10-12 5481 #endif /* CONFIG_FUNCTION_GRAPH_TRACER */
369bc18f9a6c4e2 Stefan Assmann 2009-10-12 5482
2a85a37f168d2b4 Steven Rostedt 2011-12-19 5483 void __init
2a85a37f168d2b4 Steven Rostedt 2011-12-19 5484 ftrace_set_early_filter(struct ftrace_ops *ops, char *buf, int enable)
2af15d6a44b871a Steven Rostedt 2009-05-28 5485 {
2af15d6a44b871a Steven Rostedt 2009-05-28 5486 char *func;
2af15d6a44b871a Steven Rostedt 2009-05-28 5487
f04f24fb7e48d44 Masami Hiramatsu 2013-05-09 5488 ftrace_ops_init(ops);
f04f24fb7e48d44 Masami Hiramatsu 2013-05-09 5489
2af15d6a44b871a Steven Rostedt 2009-05-28 5490 while (buf) {
2af15d6a44b871a Steven Rostedt 2009-05-28 5491 func = strsep(&buf, ",");
f45948e898e7bc7 Steven Rostedt 2011-05-02 5492 ftrace_set_regex(ops, func, strlen(func), 0, enable);
2af15d6a44b871a Steven Rostedt 2009-05-28 5493 }
2af15d6a44b871a Steven Rostedt 2009-05-28 5494 }
2af15d6a44b871a Steven Rostedt 2009-05-28 5495
2af15d6a44b871a Steven Rostedt 2009-05-28 5496 static void __init set_ftrace_early_filters(void)
2af15d6a44b871a Steven Rostedt 2009-05-28 5497 {
2af15d6a44b871a Steven Rostedt 2009-05-28 5498 if (ftrace_filter_buf[0])
2a85a37f168d2b4 Steven Rostedt 2011-12-19 5499 ftrace_set_early_filter(&global_ops, ftrace_filter_buf, 1);
2af15d6a44b871a Steven Rostedt 2009-05-28 5500 if (ftrace_notrace_buf[0])
2a85a37f168d2b4 Steven Rostedt 2011-12-19 5501 ftrace_set_early_filter(&global_ops, ftrace_notrace_buf, 0);
369bc18f9a6c4e2 Stefan Assmann 2009-10-12 5502 #ifdef CONFIG_FUNCTION_GRAPH_TRACER
369bc18f9a6c4e2 Stefan Assmann 2009-10-12 5503 if (ftrace_graph_buf[0])
0d7d9a16ce11268 Namhyung Kim 2014-06-13 5504 set_ftrace_early_graph(ftrace_graph_buf, 1);
0d7d9a16ce11268 Namhyung Kim 2014-06-13 5505 if (ftrace_graph_notrace_buf[0])
0d7d9a16ce11268 Namhyung Kim 2014-06-13 5506 set_ftrace_early_graph(ftrace_graph_notrace_buf, 0);
369bc18f9a6c4e2 Stefan Assmann 2009-10-12 5507 #endif /* CONFIG_FUNCTION_GRAPH_TRACER */
2af15d6a44b871a Steven Rostedt 2009-05-28 5508 }
2af15d6a44b871a Steven Rostedt 2009-05-28 5509
fc13cb0ce45296f Steven Rostedt 2011-12-19 5510 int ftrace_regex_release(struct inode *inode, struct file *file)
5072c59fd45e997 Steven Rostedt 2008-05-12 5511 {
5072c59fd45e997 Steven Rostedt 2008-05-12 5512 struct seq_file *m = (struct seq_file *)file->private_data;
5072c59fd45e997 Steven Rostedt 2008-05-12 5513 struct ftrace_iterator *iter;
33dc9b1267d59ce Steven Rostedt 2011-05-02 5514 struct ftrace_hash **orig_hash;
689fd8b65d669b9 jolsa@xxxxxxxxxx 2009-09-11 5515 struct trace_parser *parser;
ed926f9b35cda09 Steven Rostedt 2011-05-03 5516 int filter_hash;
33dc9b1267d59ce Steven Rostedt 2011-05-02 5517 int ret;
5072c59fd45e997 Steven Rostedt 2008-05-12 5518
5072c59fd45e997 Steven Rostedt 2008-05-12 5519 if (file->f_mode & FMODE_READ) {
5072c59fd45e997 Steven Rostedt 2008-05-12 5520 iter = m->private;
5072c59fd45e997 Steven Rostedt 2008-05-12 5521 seq_release(inode, file);
5072c59fd45e997 Steven Rostedt 2008-05-12 5522 } else
5072c59fd45e997 Steven Rostedt 2008-05-12 5523 iter = file->private_data;
5072c59fd45e997 Steven Rostedt 2008-05-12 5524
689fd8b65d669b9 jolsa@xxxxxxxxxx 2009-09-11 5525 parser = &iter->parser;
689fd8b65d669b9 jolsa@xxxxxxxxxx 2009-09-11 5526 if (trace_parser_loaded(parser)) {
1cf41dd79993389 Steven Rostedt 2011-04-29 5527 ftrace_match_records(iter->hash, parser->buffer, parser->idx);
5072c59fd45e997 Steven Rostedt 2008-05-12 5528 }
5072c59fd45e997 Steven Rostedt 2008-05-12 5529
058e297d34a404c Steven Rostedt 2011-04-29 5530 trace_parser_put(parser);
058e297d34a404c Steven Rostedt 2011-04-29 5531
33b7f99cf003ca6 Steven Rostedt (Red Hat 2014-08-15 5532) mutex_lock(&iter->ops->func_hash->regex_lock);
3f2367ba7cbf13e Masami Hiramatsu 2013-05-09 5533
058e297d34a404c Steven Rostedt 2011-04-29 5534 if (file->f_mode & FMODE_WRITE) {
ed926f9b35cda09 Steven Rostedt 2011-05-03 5535 filter_hash = !!(iter->flags & FTRACE_ITER_FILTER);
ed926f9b35cda09 Steven Rostedt 2011-05-03 5536
8c08f0d5c6fb10f Steven Rostedt (VMware 2017-06-26 5537) if (filter_hash) {
33b7f99cf003ca6 Steven Rostedt (Red Hat 2014-08-15 5538) orig_hash = &iter->ops->func_hash->filter_hash;
69d71879d2cf67a Steven Rostedt (VMware 2017-07-05 5539) if (iter->tr && !list_empty(&iter->tr->mod_trace))
8c08f0d5c6fb10f Steven Rostedt (VMware 2017-06-26 5540) iter->hash->flags |= FTRACE_HASH_FL_MOD;
8c08f0d5c6fb10f Steven Rostedt (VMware 2017-06-26 5541) } else
33b7f99cf003ca6 Steven Rostedt (Red Hat 2014-08-15 5542) orig_hash = &iter->ops->func_hash->notrace_hash;
33dc9b1267d59ce Steven Rostedt 2011-05-02 5543
e6ea44e9b4c1232 Steven Rostedt 2009-02-14 5544 mutex_lock(&ftrace_lock);
e16b35ddb840788 Steven Rostedt (VMware 2017-04-04 5545) ret = ftrace_hash_move_and_update_ops(iter->ops, orig_hash,
e16b35ddb840788 Steven Rostedt (VMware 2017-04-04 5546) iter->hash, filter_hash);
e6ea44e9b4c1232 Steven Rostedt 2009-02-14 5547 mutex_unlock(&ftrace_lock);
c20489dad156dd9 Steven Rostedt (VMware 2017-03-29 5548) } else {
c20489dad156dd9 Steven Rostedt (VMware 2017-03-29 5549) /* For read only, the hash is the ops hash */
c20489dad156dd9 Steven Rostedt (VMware 2017-03-29 5550) iter->hash = NULL;
058e297d34a404c Steven Rostedt 2011-04-29 5551 }
3f2367ba7cbf13e Masami Hiramatsu 2013-05-09 5552
33b7f99cf003ca6 Steven Rostedt (Red Hat 2014-08-15 5553) mutex_unlock(&iter->ops->func_hash->regex_lock);
33dc9b1267d59ce Steven Rostedt 2011-05-02 5554 free_ftrace_hash(iter->hash);
9ef16693aff8137 Steven Rostedt (VMware 2019-10-11 5555) if (iter->tr)
9ef16693aff8137 Steven Rostedt (VMware 2019-10-11 5556) trace_array_put(iter->tr);
33dc9b1267d59ce Steven Rostedt 2011-05-02 5557 kfree(iter);
689fd8b65d669b9 jolsa@xxxxxxxxxx 2009-09-11 5558
5072c59fd45e997 Steven Rostedt 2008-05-12 5559 return 0;
5072c59fd45e997 Steven Rostedt 2008-05-12 5560 }
5072c59fd45e997 Steven Rostedt 2008-05-12 5561
5e2336a0d47c966 Steven Rostedt 2009-03-05 5562 static const struct file_operations ftrace_avail_fops = {
5072c59fd45e997 Steven Rostedt 2008-05-12 5563 .open = ftrace_avail_open,
5072c59fd45e997 Steven Rostedt 2008-05-12 5564 .read = seq_read,
5072c59fd45e997 Steven Rostedt 2008-05-12 5565 .llseek = seq_lseek,
3be04b471b95b87 Li Zefan 2009-08-17 5566 .release = seq_release_private,
5072c59fd45e997 Steven Rostedt 2008-05-12 5567 };
5072c59fd45e997 Steven Rostedt 2008-05-12 5568
647bcd03d5b2fb4 Steven Rostedt 2011-05-03 5569 static const struct file_operations ftrace_enabled_fops = {
647bcd03d5b2fb4 Steven Rostedt 2011-05-03 5570 .open = ftrace_enabled_open,
647bcd03d5b2fb4 Steven Rostedt 2011-05-03 5571 .read = seq_read,
647bcd03d5b2fb4 Steven Rostedt 2011-05-03 5572 .llseek = seq_lseek,
647bcd03d5b2fb4 Steven Rostedt 2011-05-03 5573 .release = seq_release_private,
647bcd03d5b2fb4 Steven Rostedt 2011-05-03 5574 };
647bcd03d5b2fb4 Steven Rostedt 2011-05-03 5575
5e2336a0d47c966 Steven Rostedt 2009-03-05 5576 static const struct file_operations ftrace_filter_fops = {
5072c59fd45e997 Steven Rostedt 2008-05-12 5577 .open = ftrace_filter_open,
850a80cfaa5aec3 Lai Jiangshan 2009-03-13 5578 .read = seq_read,
5072c59fd45e997 Steven Rostedt 2008-05-12 5579 .write = ftrace_filter_write,
098c879e1f2d6ee Steven Rostedt (Red Hat 2013-12-21 5580) .llseek = tracing_lseek,
1cf41dd79993389 Steven Rostedt 2011-04-29 5581 .release = ftrace_regex_release,
5072c59fd45e997 Steven Rostedt 2008-05-12 5582 };
5072c59fd45e997 Steven Rostedt 2008-05-12 5583
5e2336a0d47c966 Steven Rostedt 2009-03-05 5584 static const struct file_operations ftrace_notrace_fops = {
41c52c0db9607e5 Steven Rostedt 2008-05-22 5585 .open = ftrace_notrace_open,
850a80cfaa5aec3 Lai Jiangshan 2009-03-13 5586 .read = seq_read,
41c52c0db9607e5 Steven Rostedt 2008-05-22 5587 .write = ftrace_notrace_write,
098c879e1f2d6ee Steven Rostedt (Red Hat 2013-12-21 5588) .llseek = tracing_lseek,
1cf41dd79993389 Steven Rostedt 2011-04-29 5589 .release = ftrace_regex_release,
41c52c0db9607e5 Steven Rostedt 2008-05-22 5590 };
41c52c0db9607e5 Steven Rostedt 2008-05-22 5591
ea4e2bc4d9f7370 Steven Rostedt 2008-12-03 5592 #ifdef CONFIG_FUNCTION_GRAPH_TRACER
ea4e2bc4d9f7370 Steven Rostedt 2008-12-03 5593
ea4e2bc4d9f7370 Steven Rostedt 2008-12-03 5594 static DEFINE_MUTEX(graph_lock);
ea4e2bc4d9f7370 Steven Rostedt 2008-12-03 5595
24a9729f831462b Amol Grover 2020-02-01 @5596 struct ftrace_hash __rcu *ftrace_graph_hash = EMPTY_HASH;
fd0e6852c407dd9 Amol Grover 2020-02-05 @5597 struct ftrace_hash __rcu *ftrace_graph_notrace_hash = EMPTY_HASH;
b9b0c831bed2682 Namhyung Kim 2017-01-20 5598

:::::: The code at line 5477 was first introduced by commit
:::::: 92ad18ec26611e8a47639e600bd9dc42fbe2edcf ftrace/graph: Do not modify the EMPTY_HASH for the function_graph filter

:::::: TO: Steven Rostedt (VMware) <rostedt@xxxxxxxxxxx>
:::::: CC: Steven Rostedt (VMware) <rostedt@xxxxxxxxxxx>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx

Attachment: .config.gz
Description: application/gzip