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] [day] [month] [year] [list]
Message-ID: <2d711526-3cee-436a-a563-0d70faf537e2@kylinos.cn>
Date: Fri, 30 Jan 2026 09:31:09 +0800
From: Feng Jiang <jiangfeng@...inos.cn>
To: kernel test robot <lkp@...el.com>, pjw@...nel.org, palmer@...belt.com,
 aou@...s.berkeley.edu, alex@...ti.fr, akpm@...ux-foundation.org,
 kees@...nel.org, andy@...nel.org, ebiggers@...nel.org,
 martin.petersen@...cle.com, herbert@...dor.apana.org.au,
 samuel.holland@...ive.com, ajones@...tanamicro.com, charlie@...osinc.com,
 conor.dooley@...rochip.com, linus.walleij@...aro.org, nathan@...nel.org
Cc: llvm@...ts.linux.dev, oe-kbuild-all@...ts.linux.dev,
 linux-riscv@...ts.infradead.org, linux-kernel@...r.kernel.org,
 linux-hardening@...r.kernel.org
Subject: Re: [PATCH v6 1/8] lib/string_kunit: add correctness test for
 strlen()

On 2026/1/30 00:55, kernel test robot wrote:
> Hi Feng,
> 
> kernel test robot noticed the following build errors:
> 
> [auto build test ERROR on kees/for-next/hardening]
> [also build test ERROR on akpm-mm/mm-nonmm-unstable akpm-mm/mm-everything linus/master v6.19-rc7 next-20260128]
> [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/Feng-Jiang/lib-string_kunit-add-correctness-test-for-strlen/20260129-151036
> base:   https://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git for-next/hardening
> patch link:    https://lore.kernel.org/r/20260129070227.220866-2-jiangfeng%40kylinos.cn
> patch subject: [PATCH v6 1/8] lib/string_kunit: add correctness test for strlen()
> config: x86_64-randconfig-001-20260129 (https://download.01.org/0day-ci/archive/20260130/202601300014.gbv48Y5D-lkp@intel.com/config)
> compiler: clang version 20.1.8 (https://github.com/llvm/llvm-project 87f0227cb60147a26a1eeb4fb06e3b505e9c7261)
> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260130/202601300014.gbv48Y5D-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/202601300014.gbv48Y5D-lkp@intel.com/
> 
> All errors (new ones prefixed by >>):
> 
>>> lib/tests/string_kunit.c:116:13: error: call to undeclared function 'PAGE_ALIGN'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
>      116 |         buf_size = PAGE_ALIGN(STRING_TEST_MAX_LEN + STRING_TEST_MAX_OFFSET + 1);
>          |                    ^
>    1 error generated.
> 
> 
> vim +/PAGE_ALIGN +116 lib/tests/string_kunit.c
> 

Thanks for the report.

I apologize for the build error. This was caused by the missing <linux/mm.h> header
for the PAGE_ALIGN macro in the new test logic. I will include the necessary header
and fix this in the v7 patch set.

>    110	
>    111	static void string_test_strlen(struct kunit *test)
>    112	{
>    113		size_t buf_size;
>    114		char *buf, *s;
>    115	
>  > 116		buf_size = PAGE_ALIGN(STRING_TEST_MAX_LEN + STRING_TEST_MAX_OFFSET + 1);
>    117		buf = vmalloc(buf_size);
>    118		KUNIT_ASSERT_NOT_ERR_OR_NULL(test, buf);
>    119	
>    120		memset(buf, 'A', buf_size);
>    121	
>    122		for (size_t offset = 0; offset < STRING_TEST_MAX_OFFSET; offset++) {
>    123			for (size_t len = 0; len <= STRING_TEST_MAX_LEN; len++) {
>    124				s = buf + buf_size - 1 - offset - len;
>    125				s[len] = '\0';
>    126				KUNIT_EXPECT_EQ_MSG(test, strlen(s), len,
>    127					"offset:%zu len:%zu", offset, len);
>    128				s[len] = 'A';
>    129			}
>    130		}
>    131	
>    132		vfree(buf);
>    133	}
>    134	
> 

-- 
With Best Regards,
Feng Jiang


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ