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>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202503112205.joXgt8gR-lkp@intel.com>
Date: Tue, 11 Mar 2025 23:03:04 +0800
From: kernel test robot <lkp@...el.com>
To: "Masami Hiramatsu (Google)" <mhiramat@...nel.org>,
	Steven Rostedt <rostedt@...dmis.org>
Cc: llvm@...ts.linux.dev, oe-kbuild-all@...ts.linux.dev,
	Masami Hiramatsu <mhiramat@...nel.org>,
	linux-kernel@...r.kernel.org, linux-trace-kernel@...r.kernel.org,
	Mark Rutland <mark.rutland@....com>,
	Mathieu Desnoyers <mathieu.desnoyers@...icios.com>
Subject: Re: [PATCH v3] tracing: Show last module text symbols in the
 stacktrace

Hi Masami,

kernel test robot noticed the following build errors:

[auto build test ERROR on trace/for-next]
[cannot apply to linus/master v6.14-rc6 next-20250311]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Masami-Hiramatsu-Google/tracing-Show-last-module-text-symbols-in-the-stacktrace/20250310-214849
base:   https://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace for-next
patch link:    https://lore.kernel.org/r/174161444691.1063601.16690699136628689205.stgit%40devnote2
patch subject: [PATCH v3] tracing: Show last module text symbols in the stacktrace
config: i386-buildonly-randconfig-004-20250311 (https://download.01.org/0day-ci/archive/20250311/202503112205.joXgt8gR-lkp@intel.com/config)
compiler: clang version 19.1.7 (https://github.com/llvm/llvm-project cd708029e0b2869e80abe31ddb175f7c35361f90)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250311/202503112205.joXgt8gR-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@...el.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202503112205.joXgt8gR-lkp@intel.com/

All errors (new ones prefixed by >>):

   kernel/trace/trace.c:6072:38: error: incomplete definition of type 'struct module'
    6072 |         entry->mod_addr = (unsigned long)mod->mem[MOD_TEXT].base;
         |                                          ~~~^
   include/linux/printk.h:394:8: note: forward declaration of 'struct module'
     394 | struct module;
         |        ^
   kernel/trace/trace.c:6072:44: error: use of undeclared identifier 'MOD_TEXT'
    6072 |         entry->mod_addr = (unsigned long)mod->mem[MOD_TEXT].base;
         |                                                   ^
   kernel/trace/trace.c:6073:30: error: incomplete definition of type 'struct module'
    6073 |         strscpy(entry->mod_name, mod->name);
         |                                  ~~~^
   include/linux/string.h:114:55: note: expanded from macro 'strscpy'
     114 |         CONCATENATE(__strscpy, COUNT_ARGS(__VA_ARGS__))(dst, src, __VA_ARGS__)
         |                                                              ^~~
   include/linux/string.h:80:21: note: expanded from macro '__strscpy0'
      80 |         sized_strscpy(dst, src, sizeof(dst) + __must_be_array(dst) +    \
         |                            ^~~
   include/linux/printk.h:394:8: note: forward declaration of 'struct module'
     394 | struct module;
         |        ^
   kernel/trace/trace.c:9411:18: error: incomplete definition of type 'struct module'
    9411 |                 if (!strcmp(mod->name, entry->mod_name)) {
         |                             ~~~^
   include/linux/printk.h:394:8: note: forward declaration of 'struct module'
     394 | struct module;
         |        ^
   kernel/trace/trace.c:9412:11: error: incomplete definition of type 'struct module'
    9412 |                         if (mod->state == MODULE_STATE_GOING)
         |                             ~~~^
   include/linux/printk.h:394:8: note: forward declaration of 'struct module'
     394 | struct module;
         |        ^
>> kernel/trace/trace.c:9412:22: error: use of undeclared identifier 'MODULE_STATE_GOING'
    9412 |                         if (mod->state == MODULE_STATE_GOING)
         |                                           ^
   kernel/trace/trace.c:9415:41: error: incomplete definition of type 'struct module'
    9415 |                                 module_delta[i] = (unsigned long)mod->mem[MOD_TEXT].base
         |                                                                  ~~~^
   include/linux/printk.h:394:8: note: forward declaration of 'struct module'
     394 | struct module;
         |        ^
   kernel/trace/trace.c:9415:47: error: use of undeclared identifier 'MOD_TEXT'
    9415 |                                 module_delta[i] = (unsigned long)mod->mem[MOD_TEXT].base
         |                                                                           ^
   8 errors generated.


vim +/MODULE_STATE_GOING +9412 kernel/trace/trace.c

  9398	
  9399	static int make_mod_delta(struct module *mod, void *data)
  9400	{
  9401		struct trace_scratch *tscratch;
  9402		struct trace_mod_entry *entry;
  9403		struct trace_array *tr = data;
  9404		long *module_delta;
  9405		int i;
  9406	
  9407		tscratch = tr->scratch;
  9408		module_delta = READ_ONCE(tscratch->module_delta);
  9409		for (i = 0; i < tscratch->nr_entries; i++) {
  9410			entry = &tscratch->entries[i];
  9411			if (!strcmp(mod->name, entry->mod_name)) {
> 9412				if (mod->state == MODULE_STATE_GOING)
  9413					module_delta[i] = 0;
  9414				else
  9415					module_delta[i] = (unsigned long)mod->mem[MOD_TEXT].base
  9416							 - entry->mod_addr;
  9417				break;
  9418			}
  9419		}
  9420		return 0;
  9421	}
  9422	

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ