Linux Kernel Selftest development
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Rong Tao <rtoax@foxmail.com>,
	andrii@kernel.org, vmalik@redhat.com, ast@kernel.org
Cc: oe-kbuild-all@lists.linux.dev, rtoax@foxmail.com,
	Rong Tao <rongtao@cestc.cn>,
	Daniel Borkmann <daniel@iogearbox.net>,
	Eduard Zingerman <eddyz87@gmail.com>,
	Kumar Kartikeya Dwivedi <memxor@gmail.com>,
	Martin KaFai Lau <martin.lau@linux.dev>,
	Song Liu <song@kernel.org>,
	Yonghong Song <yonghong.song@linux.dev>,
	Jiri Olsa <jolsa@kernel.org>,
	Emil Tsalapatis <emil@etsalapatis.com>,
	Shuah Khan <skhan@linuxfoundation.org>,
	Yuzuki Ishiyama <ishiyama@hpc.is.uec.ac.jp>,
	"(open list:BPF \\(Safe Dynamic Programs and Tools\\))"
	<bpf@vger.kernel.org>,
	linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH bpf-next v2 2/2] selftests/bpf: Test bpf_strcat,bpf_strncat kfuncs
Date: Sat, 8 Aug 2026 05:58:31 +0800	[thread overview]
Message-ID: <202608080502.lI7AVjty-lkp@intel.com> (raw)
In-Reply-To: <tencent_DB0510330C3A8574B3C62E6154165FCB4709@qq.com>

Hi Rong,

kernel test robot noticed the following build errors:

[auto build test ERROR on bpf-next/master]

url:    https://github.com/intel-lab-lkp/linux/commits/Rong-Tao/selftests-bpf-Test-bpf_strcat-bpf_strncat-kfuncs/20260807-065842
base:   https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git master
patch link:    https://lore.kernel.org/r/tencent_DB0510330C3A8574B3C62E6154165FCB4709%40qq.com
patch subject: [PATCH bpf-next v2 2/2] selftests/bpf: Test bpf_strcat,bpf_strncat kfuncs
config: s390-randconfig-r052-20260807 (https://download.01.org/0day-ci/archive/20260808/202608080502.lI7AVjty-lkp@intel.com/config)
compiler: clang version 24.0.0git (https://github.com/llvm/llvm-project 12df34b8469b8095359de8c249cb1b2753fadeea)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260808/202608080502.lI7AVjty-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@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202608080502.lI7AVjty-lkp@intel.com/

All errors (new ones prefixed by >>):

>> kernel/bpf/helpers.c:4228:3: error: invalid lvalue in asm output
    4228 |                 __put_kernel_nofault(dst + dlen + copied, &cs, char, err_out);
         |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/uaccess.h:612:2: note: expanded from macro '__put_kernel_nofault'
     612 |         arch_put_kernel_nofault(dst, src, type, local_label);   \
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   arch/s390/include/asm/uaccess.h:471:33: note: expanded from macro 'arch_put_kernel_nofault'
     471 | #define arch_put_kernel_nofault __mvc_kernel_nofault
         |                                 ^
   arch/s390/include/asm/uaccess.h:424:19: note: expanded from macro '__mvc_kernel_nofault'
     424 |                         : [_dst] "=Q" (*(type *)dst)                    \
         |                                        ^~~~~~~~~~~~
   kernel/bpf/helpers.c:4233:2: error: invalid lvalue in asm output
    4233 |         __put_kernel_nofault(dst + dlen + copied, &cs, char, err_out);
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/uaccess.h:612:2: note: expanded from macro '__put_kernel_nofault'
     612 |         arch_put_kernel_nofault(dst, src, type, local_label);   \
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   arch/s390/include/asm/uaccess.h:471:33: note: expanded from macro 'arch_put_kernel_nofault'
     471 | #define arch_put_kernel_nofault __mvc_kernel_nofault
         |                                 ^
   arch/s390/include/asm/uaccess.h:424:19: note: expanded from macro '__mvc_kernel_nofault'
     424 |                         : [_dst] "=Q" (*(type *)dst)                    \
         |                                        ^~~~~~~~~~~~
   2 errors generated.


vim +4228 kernel/bpf/helpers.c

  4197	
  4198	static int __bpf_strncat(char *dst, u32 dsz, const char *src, u32 sz)
  4199	{
  4200		int dlen, slen, space, copied;
  4201		char cs = '?';
  4202	
  4203		if (!copy_from_kernel_nofault_allowed(dst, 1) ||
  4204		    !copy_from_kernel_nofault_allowed(src, 1)) {
  4205			return -ERANGE;
  4206		}
  4207	
  4208		dlen = bpf_strnlen(dst, dsz);
  4209		if (dlen < 0)
  4210			return dlen;
  4211		slen = bpf_strnlen(src, sz);
  4212		if (slen < 0)
  4213			return slen;
  4214	
  4215		if (dlen >= dsz || sz == 0 || dsz == 0)
  4216			return -EINVAL;
  4217	
  4218		space = dsz - dlen;
  4219		if (space <= 1 || space < min(slen, sz) + 1)
  4220			return -E2BIG;
  4221	
  4222		guard(pagefault)();
  4223		for (copied = 0; copied < space - 1 && copied < slen; copied++) {
  4224			__get_kernel_nofault(&cs, src, char, err_out);
  4225			if (cs == '\0')
  4226				break;
  4227	
> 4228			__put_kernel_nofault(dst + dlen + copied, &cs, char, err_out);
  4229	
  4230			src++;
  4231		}
  4232		cs = '\0';
  4233		__put_kernel_nofault(dst + dlen + copied, &cs, char, err_out);
  4234	
  4235		__get_kernel_nofault(&cs, src, char, err_out);
  4236		if (cs != '\0' && sz > copied)
  4237			return -E2BIG;
  4238	
  4239		return dlen + copied;
  4240	err_out:
  4241		return -EFAULT;
  4242	}
  4243	

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

  reply	other threads:[~2026-08-07 21:59 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <cover.1784078494.git.rtoax@foxmail.com>
2026-07-15  1:27 ` [PATCH bpf-next v2 1/2] bpf: add bpf_strcat,bpf_strncat kfunc Rong Tao
2026-07-15  8:56   ` Viktor Malik
2026-07-16  8:16     ` Rong Tao
2026-07-15  1:27 ` [PATCH bpf-next v2 2/2] selftests/bpf: Test bpf_strcat,bpf_strncat kfuncs Rong Tao
2026-08-07 21:58   ` kernel test robot [this message]
2026-08-08  2:59   ` kernel test robot

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=202608080502.lI7AVjty-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=eddyz87@gmail.com \
    --cc=emil@etsalapatis.com \
    --cc=ishiyama@hpc.is.uec.ac.jp \
    --cc=jolsa@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=martin.lau@linux.dev \
    --cc=memxor@gmail.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=rongtao@cestc.cn \
    --cc=rtoax@foxmail.com \
    --cc=skhan@linuxfoundation.org \
    --cc=song@kernel.org \
    --cc=vmalik@redhat.com \
    --cc=yonghong.song@linux.dev \
    /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