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] [thread-next>] [day] [month] [year] [list]
Message-ID: <ce65b110-259a-4edf-a84b-4015c6160f52@t-8ch.de>
Date: Fri, 1 Nov 2024 21:23:48 +0000
From: Thomas Weißschuh <linux@...ssschuh.net>
To: "Paul E. McKenney" <paulmck@...nel.org>
Cc: Shuah Khan <skhan@...uxfoundation.org>, Willy Tarreau <w@....eu>, 
	linux-kernel@...r.kernel.org
Subject: Re: [GIT PULL] nolibc changes for v6.13

Hi Paul,

On 2024-11-01 13:22:17-0700, Paul E. McKenney wrote:
> On Fri, Nov 01, 2024 at 02:22:13PM +0000, Thomas Weißschuh wrote:
> > (resend to add missing Cc: LKML)
> > 
> > 
> > Hi Paul,
> > 
> > The following changes since commit 9852d85ec9d492ebef56dc5f229416c925758edc:
> > 
> >   Linux 6.12-rc1 (2024-09-29 15:06:19 -0700)
> > 
> > are available in the Git repository at:
> > 
> >   https://git.kernel.org/pub/scm/linux/kernel/git/nolibc/linux-nolibc.git tags/nolibc-20241101-for-6.13-1
> > 
> > for you to fetch changes up to ad0558f3883130954ca724697f2d19aef93967b3:
> > 
> >   selftests/nolibc: start qemu with 1 GiB of memory (2024-10-07 21:57:45 +0200)
> 
> Thank you!  I have pulled this into -rcu at signed tag nolibc.2024.11.01a,
> which copies from your signed tag.

Thanks!

> The usual "make run" and "make user" worked fine, but "make libc-test"
> gave me the build errors shown below.  Is there some setup step that
> I omitted?  Or is this not really a necessary test?

That test does not actually test nolibc but the nolibc test suite.
It uses your system libc and makes sure that the nolibc test
expectations match the behaviour of a "real" libc.
The missing strlcat() function was added to glibc only in 2.38, so I
guess you have an older version.
On my glibc 2.40 "make libc-test" works and the test itself succeeds.

I'll see if there is a reasonable to make libc-test work on older glibc.
But it shouldn't impact this cycle.

For better architecture coverage I would recommend ./run-tests.sh over
"make run/user". Speaking about this I remember the discussion from the
6.12 PR where Willy proposed an improved run-tests.sh error message.
It seems he didn't push it as a commit, so let's add keep it in mind for
next cycle.

> 							Thanx, Paul
> 
> ------------------------------------------------------------------------
> 
>   CC      libc-test
> nolibc-test.c: In function ‘run_syscall’:
> nolibc-test.c:1083:63: warning: argument 1 null where non-null expected [-Wnonnull]
>  1083 |                 CASE_TEST(stat_fault);        EXPECT_SYSER(1, stat(NULL, &stat_buf), -1, EFAULT); break;
>       |                                                               ^~~~
> nolibc-test.c:358:77: note: in definition of macro ‘EXPECT_SYSER2’
>   358 |         do { if (!(cond)) result(llen, SKIPPED); else ret += expect_syserr2(expr, expret, experr1, experr2, llen); } while (0)
>       |                                                                             ^~~~
> nolibc-test.c:1083:47: note: in expansion of macro ‘EXPECT_SYSER’
>  1083 |                 CASE_TEST(stat_fault);        EXPECT_SYSER(1, stat(NULL, &stat_buf), -1, EFAULT); break;
>       |                                               ^~~~~~~~~~~~
> In file included from nolibc-test.c:26:
> /usr/include/x86_64-linux-gnu/sys/stat.h:205:12: note: in a call to function ‘stat’ declared ‘nonnull’
>   205 | extern int stat (const char *__restrict __file,
>       |            ^~~~
> nolibc-test.c: In function ‘run_stdlib’:
> nolibc-test.c:1137:75: warning: implicit declaration of function ‘strlcat’; did you mean ‘strncat’? [-Wimplicit-function-declaration]
>  1137 |                 CASE_TEST(strlcat_0);          EXPECT_STRBUFEQ(is_nolibc, strlcat(buf, "bar", 0), buf, 3, "test"); break;
>       |                                                                           ^~~~~~~
> nolibc-test.c:613:80: note: in definition of macro ‘EXPECT_STRBUFEQ’
>   613 |         do { if (!(cond)) result(llen, SKIPPED); else ret += expect_str_buf_eq(expr, buf, val, llen, cmp); } while (0)
>       |                                                                                ^~~~
> nolibc-test.c:1143:75: warning: implicit declaration of function ‘strlcpy’; did you mean ‘strncpy’? [-Wimplicit-function-declaration]
>  1143 |                 CASE_TEST(strlcpy_0);          EXPECT_STRBUFEQ(is_nolibc, strlcpy(buf, "bar", 0), buf, 3, "test"); break;
>       |                                                                           ^~~~~~~
> nolibc-test.c:613:80: note: in definition of macro ‘EXPECT_STRBUFEQ’
>   613 |         do { if (!(cond)) result(llen, SKIPPED); else ret += expect_str_buf_eq(expr, buf, val, llen, cmp); } while (0)
>       |                                                                                ^~~~
> nolibc-test.c: In function ‘run_syscall’:
> nolibc-test.c:358:62: warning: argument 1 is null but the corresponding size argument 2 value is 1 [-Wnonnull]
>   358 |         do { if (!(cond)) result(llen, SKIPPED); else ret += expect_syserr2(expr, expret, experr1, experr2, llen); } while (0)
>       |                                                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> nolibc-test.c:361:9: note: in expansion of macro ‘EXPECT_SYSER2’
>   361 |         EXPECT_SYSER2(cond, expr, expret, experr, 0)
>       |         ^~~~~~~~~~~~~
> nolibc-test.c:1073:47: note: in expansion of macro ‘EXPECT_SYSER’
>  1073 |                 CASE_TEST(poll_fault);        EXPECT_SYSER(1, poll(NULL, 1, 0), -1, EFAULT); break;
>       |                                               ^~~~~~~~~~~~
> In file included from /usr/include/poll.h:1,
>                  from nolibc-test.c:35:
> /usr/include/x86_64-linux-gnu/sys/poll.h:54:12: note: in a call to function ‘poll’ declared with attribute ‘access (write_only, 1, 2)’
>    54 | extern int poll (struct pollfd *__fds, nfds_t __nfds, int __timeout)
>       |            ^~~~
> /usr/bin/ld: /tmp/ccvUtmw4.o: in function `run_stdlib':
> nolibc-test.c:(.text+0x44f9): undefined reference to `strlcat'
> /usr/bin/ld: nolibc-test.c:(.text+0x4580): undefined reference to `strlcat'
> /usr/bin/ld: nolibc-test.c:(.text+0x4607): undefined reference to `strlcat'
> /usr/bin/ld: nolibc-test.c:(.text+0x468e): undefined reference to `strlcat'
> /usr/bin/ld: nolibc-test.c:(.text+0x4715): undefined reference to `strlcat'
> /usr/bin/ld: /tmp/ccvUtmw4.o:nolibc-test.c:(.text+0x479c): more undefined references to `strlcat' follow
> /usr/bin/ld: /tmp/ccvUtmw4.o: in function `run_stdlib':
> nolibc-test.c:(.text+0x4823): undefined reference to `strlcpy'
> /usr/bin/ld: nolibc-test.c:(.text+0x48aa): undefined reference to `strlcpy'
> /usr/bin/ld: nolibc-test.c:(.text+0x4931): undefined reference to `strlcpy'
> /usr/bin/ld: nolibc-test.c:(.text+0x49b8): undefined reference to `strlcpy'
> /usr/bin/ld: nolibc-test.c:(.text+0x4a3f): undefined reference to `strlcpy'
> collect2: error: ld returned 1 exit status
> make: *** [Makefile:230: libc-test] Error 1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ