[PATCH 1/1] arm64: print alloc free paths for address in registers

kernel test robot lkp at intel.com
Fri Mar 19 14:14:09 GMT 2021


Hi Maninder,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on arm64/for-next/core]
[also build test WARNING on v5.12-rc3 next-20210319]
[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]

url:    https://github.com/0day-ci/linux/commits/Maninder-Singh/arm64-print-alloc-free-paths-for-address-in-registers/20210319-192241
base:   https://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-next/core
config: arm64-randconfig-r013-20210318 (attached as .config)
compiler: aarch64-linux-gcc (GCC) 9.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://github.com/0day-ci/linux/commit/80431a06fb1d63d8cca96411426b612ce049f545
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Maninder-Singh/arm64-print-alloc-free-paths-for-address-in-registers/20210319-192241
        git checkout 80431a06fb1d63d8cca96411426b612ce049f545
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arm64 

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

All warnings (new ones prefixed by >>):

   arch/arm64/kernel/process.c:261:6: warning: no previous prototype for '__show_regs' [-Wmissing-prototypes]
     261 | void __show_regs(struct pt_regs *regs)
         |      ^~~~~~~~~~~
>> arch/arm64/kernel/process.c:307:6: warning: no previous prototype for '__show_regs_alloc_free' [-Wmissing-prototypes]
     307 | void __show_regs_alloc_free(struct pt_regs *regs)
         |      ^~~~~~~~~~~~~~~~~~~~~~
   arch/arm64/kernel/process.c:365:5: warning: no previous prototype for 'arch_dup_task_struct' [-Wmissing-prototypes]
     365 | int arch_dup_task_struct(struct task_struct *dst, struct task_struct *src)
         |     ^~~~~~~~~~~~~~~~~~~~
   arch/arm64/kernel/process.c:546:41: warning: no previous prototype for '__switch_to' [-Wmissing-prototypes]
     546 | __notrace_funcgraph struct task_struct *__switch_to(struct task_struct *prev,
         |                                         ^~~~~~~~~~~
   arch/arm64/kernel/process.c:710:25: warning: no previous prototype for 'arm64_preempt_schedule_irq' [-Wmissing-prototypes]
     710 | asmlinkage void __sched arm64_preempt_schedule_irq(void)
         |                         ^~~~~~~~~~~~~~~~~~~~~~~~~~


vim +/__show_regs_alloc_free +307 arch/arm64/kernel/process.c

   260	
 > 261	void __show_regs(struct pt_regs *regs)
   262	{
   263		int i, top_reg;
   264		u64 lr, sp;
   265	
   266		if (compat_user_mode(regs)) {
   267			lr = regs->compat_lr;
   268			sp = regs->compat_sp;
   269			top_reg = 12;
   270		} else {
   271			lr = regs->regs[30];
   272			sp = regs->sp;
   273			top_reg = 29;
   274		}
   275	
   276		show_regs_print_info(KERN_DEFAULT);
   277		print_pstate(regs);
   278	
   279		if (!user_mode(regs)) {
   280			printk("pc : %pS\n", (void *)regs->pc);
   281			printk("lr : %pS\n", (void *)ptrauth_strip_insn_pac(lr));
   282		} else {
   283			printk("pc : %016llx\n", regs->pc);
   284			printk("lr : %016llx\n", lr);
   285		}
   286	
   287		printk("sp : %016llx\n", sp);
   288	
   289		if (system_uses_irq_prio_masking())
   290			printk("pmr_save: %08llx\n", regs->pmr_save);
   291	
   292		i = top_reg;
   293	
   294		while (i >= 0) {
   295			printk("x%-2d: %016llx ", i, regs->regs[i]);
   296			i--;
   297	
   298			if (i % 2 == 0) {
   299				pr_cont("x%-2d: %016llx ", i, regs->regs[i]);
   300				i--;
   301			}
   302	
   303			pr_cont("\n");
   304		}
   305	}
   306	
 > 307	void __show_regs_alloc_free(struct pt_regs *regs)
   308	{
   309		int i;
   310	
   311		/* check for x0 - x29 only */
   312		for (i = 0; i <= 29; i++) {
   313			pr_alert("Register x%d information:", i);
   314			mem_dump_obj((void *)regs->regs[i]);
   315		}
   316	}
   317	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: .config.gz
Type: application/gzip
Size: 26579 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20210319/938816c4/attachment-0001.gz>


More information about the linux-arm-kernel mailing list