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: <202204301323.qB6x1Lyu-lkp@intel.com>
Date:   Sat, 30 Apr 2022 13:42:15 +0800
From:   kernel test robot <lkp@...el.com>
To:     Mark Rutland <mark.rutland@....com>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org
Subject: [mark:arm64/stacktrace/speedups 12/12]
 arch/arm64/kernel/stacktrace.c:66:13: error: 'tsk' undeclared

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/mark/linux.git arm64/stacktrace/speedups
head:   cdc18713d4c3bb71acf2a7fde076b8cf08975dfd
commit: cdc18713d4c3bb71acf2a7fde076b8cf08975dfd [12/12] WIP: rework stacktrace structure
config: arm64-allyesconfig (https://download.01.org/0day-ci/archive/20220430/202204301323.qB6x1Lyu-lkp@intel.com/config)
compiler: aarch64-linux-gcc (GCC) 11.3.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://git.kernel.org/pub/scm/linux/kernel/git/mark/linux.git/commit/?id=cdc18713d4c3bb71acf2a7fde076b8cf08975dfd
        git remote add mark https://git.kernel.org/pub/scm/linux/kernel/git/mark/linux.git
        git fetch --no-tags mark arm64/stacktrace/speedups
        git checkout cdc18713d4c3bb71acf2a7fde076b8cf08975dfd
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.3.0 make.cross W=1 O=build_dir ARCH=arm64 SHELL=/bin/bash

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

All errors (new ones prefixed by >>):

   In file included from include/asm-generic/percpu.h:7,
                    from arch/arm64/include/asm/percpu.h:248,
                    from arch/arm64/include/asm/smp.h:28,
                    from include/linux/smp.h:113,
                    from include/linux/percpu.h:7,
                    from include/linux/context_tracking_state.h:5,
                    from include/linux/hardirq.h:5,
                    from include/linux/interrupt.h:11,
                    from include/linux/trace_recursion.h:5,
                    from include/linux/ftrace.h:10,
                    from arch/arm64/kernel/stacktrace.c:9:
   arch/arm64/include/asm/stacktrace.h: In function 'stackinfo_get_sdei_normal':
   arch/arm64/include/asm/stacktrace.h:122:57: error: 'sdei_stack_normal_ptr' undeclared (first use in this function)
     122 |         unsigned long low = (unsigned long)raw_cpu_read(sdei_stack_normal_ptr);
         |                                                         ^~~~~~~~~~~~~~~~~~~~~
   include/linux/percpu-defs.h:318:16: note: in definition of macro '__pcpu_size_call_return'
     318 |         typeof(variable) pscr_ret__;                                    \
         |                ^~~~~~~~
   arch/arm64/include/asm/stacktrace.h:122:44: note: in expansion of macro 'raw_cpu_read'
     122 |         unsigned long low = (unsigned long)raw_cpu_read(sdei_stack_normal_ptr);
         |                                            ^~~~~~~~~~~~
   arch/arm64/include/asm/stacktrace.h:122:57: note: each undeclared identifier is reported only once for each function it appears in
     122 |         unsigned long low = (unsigned long)raw_cpu_read(sdei_stack_normal_ptr);
         |                                                         ^~~~~~~~~~~~~~~~~~~~~
   include/linux/percpu-defs.h:318:16: note: in definition of macro '__pcpu_size_call_return'
     318 |         typeof(variable) pscr_ret__;                                    \
         |                ^~~~~~~~
   arch/arm64/include/asm/stacktrace.h:122:44: note: in expansion of macro 'raw_cpu_read'
     122 |         unsigned long low = (unsigned long)raw_cpu_read(sdei_stack_normal_ptr);
         |                                            ^~~~~~~~~~~~
   arch/arm64/include/asm/stacktrace.h: In function 'stackinfo_get_sdei_critical':
   arch/arm64/include/asm/stacktrace.h:134:57: error: 'sdei_stack_critical_ptr' undeclared (first use in this function); did you mean 'sdei_shadow_call_stack_critical_ptr'?
     134 |         unsigned long low = (unsigned long)raw_cpu_read(sdei_stack_critical_ptr);
         |                                                         ^~~~~~~~~~~~~~~~~~~~~~~
   include/linux/percpu-defs.h:318:16: note: in definition of macro '__pcpu_size_call_return'
     318 |         typeof(variable) pscr_ret__;                                    \
         |                ^~~~~~~~
   arch/arm64/include/asm/stacktrace.h:134:44: note: in expansion of macro 'raw_cpu_read'
     134 |         unsigned long low = (unsigned long)raw_cpu_read(sdei_stack_critical_ptr);
         |                                            ^~~~~~~~~~~~
   arch/arm64/kernel/stacktrace.c: In function 'unwind_frame_record':
>> arch/arm64/kernel/stacktrace.c:66:13: error: 'tsk' undeclared (first use in this function)
      66 |         if (tsk->ret_stack &&
         |             ^~~


vim +/tsk +66 arch/arm64/kernel/stacktrace.c

b07f3499661c61 Mark Brown               2021-03-19  50  
592700f094be22 Mark Rutland             2019-07-02  51  /*
592700f094be22 Mark Rutland             2019-07-02  52   * Unwind from one frame record (A) to the next frame record (B).
592700f094be22 Mark Rutland             2019-07-02  53   *
592700f094be22 Mark Rutland             2019-07-02  54   * We terminate early if the location of B indicates a malformed chain of frame
592700f094be22 Mark Rutland             2019-07-02  55   * records (e.g. a cycle), determined based on the location and fp value of A
592700f094be22 Mark Rutland             2019-07-02  56   * and the location (but not the fp value) of B.
592700f094be22 Mark Rutland             2019-07-02  57   */
60ffc30d565281 Catalin Marinas          2012-03-05  58  
60ffc30d565281 Catalin Marinas          2012-03-05  59  
cdc18713d4c3bb Mark Rutland             2022-04-25  60  static notrace int unwind_frame_record(struct unwind_state *state,
cdc18713d4c3bb Mark Rutland             2022-04-25  61  				       stack_trace_consume_fn consume_entry, void *cookie)
cdc18713d4c3bb Mark Rutland             2022-04-25  62  {
90131eb350137d Madhavan T. Venkataraman 2022-01-17  63  	state->pc = ptrauth_strip_insn_pac(state->pc);
c6d3cd32fd0064 Mark Rutland             2021-10-29  64  
20380bb390a443 AKASHI Takahiro          2015-12-15  65  #ifdef CONFIG_FUNCTION_GRAPH_TRACER
b5e7307d9d5a34 Mark Rutland             2016-09-23 @66  	if (tsk->ret_stack &&
90131eb350137d Madhavan T. Venkataraman 2022-01-17  67  		(state->pc == (unsigned long)return_to_handler)) {
c6d3cd32fd0064 Mark Rutland             2021-10-29  68  		unsigned long orig_pc;
20380bb390a443 AKASHI Takahiro          2015-12-15  69  		/*
20380bb390a443 AKASHI Takahiro          2015-12-15  70  		 * This is a case where function graph tracer has
20380bb390a443 AKASHI Takahiro          2015-12-15  71  		 * modified a return address (LR) in a stack frame
20380bb390a443 AKASHI Takahiro          2015-12-15  72  		 * to hook a function return.
20380bb390a443 AKASHI Takahiro          2015-12-15  73  		 * So replace it to an original value.
20380bb390a443 AKASHI Takahiro          2015-12-15  74  		 */
90131eb350137d Madhavan T. Venkataraman 2022-01-17  75  		orig_pc = ftrace_graph_ret_addr(tsk, NULL, state->pc,
90131eb350137d Madhavan T. Venkataraman 2022-01-17  76  						(void *)state->fp);
90131eb350137d Madhavan T. Venkataraman 2022-01-17  77  		if (WARN_ON_ONCE(state->pc == orig_pc))
a448276ce515c9 Steven Rostedt (VMware   2018-12-07  78) 			return -EINVAL;
90131eb350137d Madhavan T. Venkataraman 2022-01-17  79  		state->pc = orig_pc;
20380bb390a443 AKASHI Takahiro          2015-12-15  80  	}
20380bb390a443 AKASHI Takahiro          2015-12-15  81  #endif /* CONFIG_FUNCTION_GRAPH_TRACER */
cd9bc2c9258816 Masami Hiramatsu         2021-10-21  82  #ifdef CONFIG_KRETPROBES
90131eb350137d Madhavan T. Venkataraman 2022-01-17  83  	if (is_kretprobe_trampoline(state->pc))
90131eb350137d Madhavan T. Venkataraman 2022-01-17  84  		state->pc = kretprobe_find_ret_addr(tsk, (void *)state->fp, &state->kr_cur);
cd9bc2c9258816 Masami Hiramatsu         2021-10-21  85  #endif
20380bb390a443 AKASHI Takahiro          2015-12-15  86  
cdc18713d4c3bb Mark Rutland             2022-04-25  87  	if (!consume_entry(cookie, state->pc))
cdc18713d4c3bb Mark Rutland             2022-04-25  88  		return -ENOENT;
cdc18713d4c3bb Mark Rutland             2022-04-25  89  
60ffc30d565281 Catalin Marinas          2012-03-05  90  	return 0;
60ffc30d565281 Catalin Marinas          2012-03-05  91  }
cdc18713d4c3bb Mark Rutland             2022-04-25  92  NOKPROBE_SYMBOL(unwind_frame_record);
60ffc30d565281 Catalin Marinas          2012-03-05  93  

:::::: The code at line 66 was first introduced by commit
:::::: b5e7307d9d5a340d2c9fabbe1cee137d4c682c71 arm64: fix dump_backtrace/unwind_frame with NULL tsk

:::::: TO: Mark Rutland <mark.rutland@....com>
:::::: CC: Will Deacon <will.deacon@....com>

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ