oe-kbuild-all.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Qing Zhang <zhangqing@loongson.cn>,
	Huacai Chen <chenhuacai@kernel.org>,
	WANG Xuerui <kernel@xen0n.name>
Cc: oe-kbuild-all@lists.linux.dev,
	Jiaxun Yang <jiaxun.yang@flygoat.com>,
	loongarch@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] LoongArch: Add pad structure members for explicit alignment
Date: Wed, 19 Apr 2023 01:28:39 +0800	[thread overview]
Message-ID: <202304190108.aA4uyDQZ-lkp@intel.com> (raw)
In-Reply-To: <20230418091348.9239-1-zhangqing@loongson.cn>

Hi Qing,

kernel test robot noticed the following build errors:

[auto build test ERROR on linus/master]
[also build test ERROR on v6.3-rc7 next-20230417]
[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/Qing-Zhang/LoongArch-Adjust-the-user_regset_copyin-parameter-to-the-correct-offset/20230418-171556
patch link:    https://lore.kernel.org/r/20230418091348.9239-1-zhangqing%40loongson.cn
patch subject: [PATCH 1/2] LoongArch: Add pad structure members for explicit alignment
config: loongarch-defconfig (https://download.01.org/0day-ci/archive/20230419/202304190108.aA4uyDQZ-lkp@intel.com/config)
compiler: loongarch64-linux-gcc (GCC) 12.1.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/intel-lab-lkp/linux/commit/dace28025b7b1f35b35042ddac8bdb1e412c2d7f
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Qing-Zhang/LoongArch-Adjust-the-user_regset_copyin-parameter-to-the-correct-offset/20230418-171556
        git checkout dace28025b7b1f35b35042ddac8bdb1e412c2d7f
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=loongarch olddefconfig
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=loongarch SHELL=/bin/bash

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>
| Link: https://lore.kernel.org/oe-kbuild-all/202304190108.aA4uyDQZ-lkp@intel.com/

All errors (new ones prefixed by >>):

   arch/loongarch/kernel/ptrace.c: In function 'hw_break_set':
>> arch/loongarch/kernel/ptrace.c:626:60: error: 'PTRACE_HBP_PAD_SZ' undeclared (first use in this function); did you mean 'PTRACE_HBP_MASK_SZ'?
     626 |                                           offset, offset + PTRACE_HBP_PAD_SZ);
         |                                                            ^~~~~~~~~~~~~~~~~
         |                                                            PTRACE_HBP_MASK_SZ
   arch/loongarch/kernel/ptrace.c:626:60: note: each undeclared identifier is reported only once for each function it appears in


vim +626 arch/loongarch/kernel/ptrace.c

   571	
   572	static int hw_break_set(struct task_struct *target,
   573				const struct user_regset *regset,
   574				unsigned int pos, unsigned int count,
   575				const void *kbuf, const void __user *ubuf)
   576	{
   577		u32 ctrl;
   578		u64 addr, mask;
   579		int ret, idx = 0, offset, limit;
   580		unsigned int note_type = regset->core_note_type;
   581	
   582		/* Resource info and pad */
   583		offset = offsetof(struct user_watch_state, dbg_regs);
   584		user_regset_copyin_ignore(&pos, &count, &kbuf, &ubuf, 0, offset);
   585	
   586		/* (address, ctrl) registers */
   587		limit = regset->n * regset->size;
   588		while (count && offset < limit) {
   589			if (count < PTRACE_HBP_ADDR_SZ)
   590				return -EINVAL;
   591	
   592			ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, &addr,
   593						 offset, offset + PTRACE_HBP_ADDR_SZ);
   594			if (ret)
   595				return ret;
   596	
   597			ret = ptrace_hbp_set_addr(note_type, target, idx, addr);
   598			if (ret)
   599				return ret;
   600			offset += PTRACE_HBP_ADDR_SZ;
   601	
   602			if (!count)
   603				break;
   604	
   605			ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, &mask,
   606						 offset, offset + PTRACE_HBP_ADDR_SZ);
   607			if (ret)
   608				return ret;
   609	
   610			ret = ptrace_hbp_set_mask(note_type, target, idx, mask);
   611			if (ret)
   612				return ret;
   613			offset += PTRACE_HBP_MASK_SZ;
   614	
   615			ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, &mask,
   616						 offset, offset + PTRACE_HBP_MASK_SZ);
   617			if (ret)
   618				return ret;
   619	
   620			ret = ptrace_hbp_set_ctrl(note_type, target, idx, ctrl);
   621			if (ret)
   622				return ret;
   623			offset += PTRACE_HBP_CTRL_SZ;
   624	
   625			user_regset_copyin_ignore(&pos, &count, &kbuf, &ubuf,
 > 626						  offset, offset + PTRACE_HBP_PAD_SZ);
   627			offset += PTRACE_HBP_PAD_SZ;
   628			idx++;
   629		}
   630	
   631		return 0;
   632	}
   633	

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

           reply	other threads:[~2023-04-18 17:29 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <20230418091348.9239-1-zhangqing@loongson.cn>]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202304190108.aA4uyDQZ-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=chenhuacai@kernel.org \
    --cc=jiaxun.yang@flygoat.com \
    --cc=kernel@xen0n.name \
    --cc=linux-kernel@vger.kernel.org \
    --cc=loongarch@lists.linux.dev \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=zhangqing@loongson.cn \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).