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: <20210119171637.GA14704@1wt.eu>
Date:   Tue, 19 Jan 2021 18:16:37 +0100
From:   Willy Tarreau <w@....eu>
To:     Mark Rutland <mark.rutland@....com>
Cc:     "Paul E. McKenney" <paulmck@...nel.org>,
        linux-kernel@...r.kernel.org, valentin.schneider@....com
Subject: Re: rcutorture initrd/nolibc build on ARMv8?

Hi Mark,

On Tue, Jan 19, 2021 at 05:02:38PM +0000, Mark Rutland wrote:
> > I can't spot from the report above the original C file that was attempted
> > to be built, it makes me think we tried to compile directly the .h file.
> 
> That was the inline snippet in
> tools/testing/selftests/rcutorture/bin/mkinitrd.sh:
> 
> | #ifndef NOLIBC
> | #include <unistd.h>
> | #include <sys/time.h>
> | #endif
> | 
> | volatile unsigned long delaycount;
> | 
> | int main(int argc, int argv[])
> | {
> |         int i;
> |         struct timeval tv;
> |         struct timeval tvb;
> | 
> |         for (;;) {
> |                 sleep(1);
> |                 /* Need some userspace time. */
> |                 if (gettimeofday(&tvb, NULL))
> |                         continue;
> |                 do {
> |                         for (i = 0; i < 1000 * 100; i++)
> |                                 delaycount = i * i;
> |                         if (gettimeofday(&tv, NULL))
> |                                 break;
> |                         tv.tv_sec -= tvb.tv_sec;
> |                         if (tv.tv_sec > 1)
> |                                 break;
> |                         tv.tv_usec += tv.tv_sec * 1000 * 1000;
> |                         tv.tv_usec -= tvb.tv_usec;
> |                 } while (tv.tv_usec < 1000);
> |         }
> |         return 0;
> | }
> 
> ... which gets written to a file called init.c, and then built with:
> 
> | ${CROSS_COMPILE}gcc -fno-asynchronous-unwind-tables -fno-ident \
> |         -nostdlib -include ../../../../include/nolibc/nolibc.h \
> |         -lgcc -s -static -Os -o init init.c

OK I'll retry this, thank you!

> I was building natively on an arm64 box:
> 
> | ./tools/testing/selftests/rcutorture/bin/kvm.sh \
> |         --cpus 250 --trust-make --configs "TREE03" \
> |         --kmake-arg "CROSS_COMPILE=aarch64-linux-gnu- ARCH=arm64"
> 
> > Having it run through sh -x would help me try to locate the root cause or
> > possibly even attempt to reproduce it.
> 
> I ran with sh -x, but it didn't log the compiler invocation; hopefully
> the above is sufficient?

I guess so, yes. I'm pretty sure I'll come back with new questions
soon :-)

Thanks,
Willy

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ