lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202301070624.nQt4vmXg-lkp@intel.com>
Date:   Sat, 7 Jan 2023 06:08:12 +0800
From:   kernel test robot <lkp@...el.com>
To:     Qing Zhang <zhangqing@...ngson.cn>
Cc:     oe-kbuild-all@...ts.linux.dev, linux-kernel@...r.kernel.org,
        Huacai Chen <chenhuacai@...nel.org>,
        Jinyang He <hejinyang@...ngson.cn>
Subject: kernel/trace/trace.h:988:16: sparse: sparse: incorrect type in
 argument 1 (different address spaces)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   1f5abbd77e2c1787e74b7c2caffac97def78ba52
commit: dbe3ba3018ec1fc53ea0d0adf0f687f5d438039d LoongArch/ftrace: Add basic support
date:   3 weeks ago
config: loongarch-randconfig-s031-20230106
compiler: loongarch64-linux-gcc (GCC) 12.1.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.4-39-gce1a6720-dirty
        # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=dbe3ba3018ec1fc53ea0d0adf0f687f5d438039d
        git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
        git fetch --no-tags linus master
        git checkout dbe3ba3018ec1fc53ea0d0adf0f687f5d438039d
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=loongarch olddefconfig
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=loongarch SHELL=/bin/bash kernel/

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@...el.com>

sparse warnings: (new ones prefixed by >>)
   kernel/trace/trace_functions_graph.c: note: in included file:
>> kernel/trace/trace.h:988:16: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void *ptr @@     got int [noderef] __percpu * @@
   kernel/trace/trace.h:988:16: sparse:     expected void *ptr
   kernel/trace/trace.h:988:16: sparse:     got int [noderef] __percpu *
>> kernel/trace/trace.h:988:16: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void *ptr @@     got int [noderef] __percpu * @@
   kernel/trace/trace.h:988:16: sparse:     expected void *ptr
   kernel/trace/trace.h:988:16: sparse:     got int [noderef] __percpu *
>> kernel/trace/trace.h:988:16: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void *ptr @@     got int [noderef] __percpu * @@
   kernel/trace/trace.h:988:16: sparse:     expected void *ptr
   kernel/trace/trace.h:988:16: sparse:     got int [noderef] __percpu *
>> kernel/trace/trace.h:988:16: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void *ptr @@     got int [noderef] __percpu * @@
   kernel/trace/trace.h:988:16: sparse:     expected void *ptr
   kernel/trace/trace.h:988:16: sparse:     got int [noderef] __percpu *

vim +988 kernel/trace/trace.h

c58b6b0372de0d Josef Bacik              2020-07-24   976  
92a68fa047ca5b Steven Rostedt (VMware   2017-03-31   977) struct ftrace_func_command {
92a68fa047ca5b Steven Rostedt (VMware   2017-03-31   978) 	struct list_head	list;
92a68fa047ca5b Steven Rostedt (VMware   2017-03-31   979) 	char			*name;
04ec7bb642b773 Steven Rostedt (VMware   2017-04-05   980) 	int			(*func)(struct trace_array *tr,
04ec7bb642b773 Steven Rostedt (VMware   2017-04-05   981) 					struct ftrace_hash *hash,
92a68fa047ca5b Steven Rostedt (VMware   2017-03-31   982) 					char *func, char *cmd,
92a68fa047ca5b Steven Rostedt (VMware   2017-03-31   983) 					char *params, int enable);
92a68fa047ca5b Steven Rostedt (VMware   2017-03-31   984) };
f1ed7c741fcd0c Steven Rostedt (Red Hat  2013-06-27   985) extern bool ftrace_filter_param __initdata;
345ddcc882d889 Steven Rostedt (Red Hat  2016-04-22   986) static inline int ftrace_trace_task(struct trace_array *tr)
804a685162a708 Steven Rostedt           2008-12-03   987  {
c58b6b0372de0d Josef Bacik              2020-07-24  @988  	return this_cpu_read(tr->array_buffer.data->ftrace_ignore_pid) !=
c58b6b0372de0d Josef Bacik              2020-07-24   989  		FTRACE_PID_IGNORE;
804a685162a708 Steven Rostedt           2008-12-03   990  }
e0a413f619ef8b Steven Rostedt           2011-09-29   991  extern int ftrace_is_dead(void);
591dffdade9f07 Steven Rostedt (Red Hat  2014-01-10   992) int ftrace_create_function_files(struct trace_array *tr,
591dffdade9f07 Steven Rostedt (Red Hat  2014-01-10   993) 				 struct dentry *parent);
591dffdade9f07 Steven Rostedt (Red Hat  2014-01-10   994) void ftrace_destroy_function_files(struct trace_array *tr);
4114fbfd02f12d Masami Hiramatsu         2020-09-10   995  int ftrace_allocate_ftrace_ops(struct trace_array *tr);
4114fbfd02f12d Masami Hiramatsu         2020-09-10   996  void ftrace_free_ftrace_ops(struct trace_array *tr);
4104d326b670c2 Steven Rostedt (Red Hat  2014-01-10   997) void ftrace_init_global_array_ops(struct trace_array *tr);
4104d326b670c2 Steven Rostedt (Red Hat  2014-01-10   998) void ftrace_init_array_ops(struct trace_array *tr, ftrace_func_t func);
4104d326b670c2 Steven Rostedt (Red Hat  2014-01-10   999) void ftrace_reset_array_ops(struct trace_array *tr);
345ddcc882d889 Steven Rostedt (Red Hat  2016-04-22  1000) void ftrace_init_tracefs(struct trace_array *tr, struct dentry *d_tracer);
501c2375253c07 Steven Rostedt (Red Hat  2016-07-05  1001) void ftrace_init_tracefs_toplevel(struct trace_array *tr,
501c2375253c07 Steven Rostedt (Red Hat  2016-07-05  1002) 				  struct dentry *d_tracer);
d879d0b8c183aa Namhyung Kim             2017-04-17  1003  void ftrace_clear_pids(struct trace_array *tr);
dbeafd0d6131d0 Steven Rostedt (VMware   2017-03-03  1004) int init_function_trace(void);
1e10486ffee0a5 Namhyung Kim             2017-04-17  1005  void ftrace_pid_follow_fork(struct trace_array *tr, bool enable);
1155de47cd66d0 Paul Mundt               2009-06-25  1006  #else
345ddcc882d889 Steven Rostedt (Red Hat  2016-04-22  1007) static inline int ftrace_trace_task(struct trace_array *tr)
1155de47cd66d0 Paul Mundt               2009-06-25  1008  {
1155de47cd66d0 Paul Mundt               2009-06-25  1009  	return 1;
1155de47cd66d0 Paul Mundt               2009-06-25  1010  }
e0a413f619ef8b Steven Rostedt           2011-09-29  1011  static inline int ftrace_is_dead(void) { return 0; }
591dffdade9f07 Steven Rostedt (Red Hat  2014-01-10  1012) static inline int
591dffdade9f07 Steven Rostedt (Red Hat  2014-01-10  1013) ftrace_create_function_files(struct trace_array *tr,
591dffdade9f07 Steven Rostedt (Red Hat  2014-01-10  1014) 			     struct dentry *parent)
591dffdade9f07 Steven Rostedt (Red Hat  2014-01-10  1015) {
591dffdade9f07 Steven Rostedt (Red Hat  2014-01-10  1016) 	return 0;
591dffdade9f07 Steven Rostedt (Red Hat  2014-01-10  1017) }
4114fbfd02f12d Masami Hiramatsu         2020-09-10  1018  static inline int ftrace_allocate_ftrace_ops(struct trace_array *tr)
4114fbfd02f12d Masami Hiramatsu         2020-09-10  1019  {
4114fbfd02f12d Masami Hiramatsu         2020-09-10  1020  	return 0;
4114fbfd02f12d Masami Hiramatsu         2020-09-10  1021  }
4114fbfd02f12d Masami Hiramatsu         2020-09-10  1022  static inline void ftrace_free_ftrace_ops(struct trace_array *tr) { }
591dffdade9f07 Steven Rostedt (Red Hat  2014-01-10  1023) static inline void ftrace_destroy_function_files(struct trace_array *tr) { }
4104d326b670c2 Steven Rostedt (Red Hat  2014-01-10  1024) static inline __init void
4104d326b670c2 Steven Rostedt (Red Hat  2014-01-10  1025) ftrace_init_global_array_ops(struct trace_array *tr) { }
4104d326b670c2 Steven Rostedt (Red Hat  2014-01-10  1026) static inline void ftrace_reset_array_ops(struct trace_array *tr) { }
345ddcc882d889 Steven Rostedt (Red Hat  2016-04-22  1027) static inline void ftrace_init_tracefs(struct trace_array *tr, struct dentry *d) { }
501c2375253c07 Steven Rostedt (Red Hat  2016-07-05  1028) static inline void ftrace_init_tracefs_toplevel(struct trace_array *tr, struct dentry *d) { }
d879d0b8c183aa Namhyung Kim             2017-04-17  1029  static inline void ftrace_clear_pids(struct trace_array *tr) { }
dbeafd0d6131d0 Steven Rostedt (VMware   2017-03-03  1030) static inline int init_function_trace(void) { return 0; }
1e10486ffee0a5 Namhyung Kim             2017-04-17  1031  static inline void ftrace_pid_follow_fork(struct trace_array *tr, bool enable) { }
4104d326b670c2 Steven Rostedt (Red Hat  2014-01-10  1032) /* ftace_func_t type is not defined, use macro instead of static inline */
4104d326b670c2 Steven Rostedt (Red Hat  2014-01-10  1033) #define ftrace_init_array_ops(tr, func) do { } while (0)
591dffdade9f07 Steven Rostedt (Red Hat  2014-01-10  1034) #endif /* CONFIG_FUNCTION_TRACER */
591dffdade9f07 Steven Rostedt (Red Hat  2014-01-10  1035) 

:::::: The code at line 988 was first introduced by commit
:::::: c58b6b0372de0d4cd0536d6585addd1b36b151ae ftrace: Fix ftrace_trace_task return value

:::::: TO: Josef Bacik <josef@...icpanda.com>
:::::: CC: Steven Rostedt (VMware) <rostedt@...dmis.org>

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests

View attachment "config" of type "text/plain" (144084 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ