From: Stanislav Meduna <stano@meduna.org>
To: user-mode-linux-devel@lists.sourceforge.net
Cc: openssl-dev@openssl.org
Subject: Re: [uml-devel] /dev/random problems .. or FP registers corruption?!
Date: Thu, 07 Aug 2008 14:13:17 +0200 [thread overview]
Message-ID: <489AE6DD.2000200@meduna.org> (raw)
In-Reply-To: <489AC525.3060305@meduna.org>
Stanislav Meduna wrote:
> Am I seeing ghosts? Anyone got other mysterious
> problems with current UML kernel? Could it be that
> some state-saving method is corrupting fp registers
> or something like that? Was there some change in the
> UML / vanilla kernel recently?
Confirmed: I can reproduce openssl changing a double
value in unrelated process. I was not able to come
up with a code not relying on external software yet:
===
#include <stdlib.h>
#include <unistd.h>
#include <stdio.h>
#include <time.h>
#include <signal.h>
testdblchg()
{
volatile double x0 = 2.0;
volatile double x1;
int iter = 0;
fprintf(stderr, "Starting loop, pid=%d\n", getpid());
while(1)
{
++iter;
x1 = x0;
x0 += 1.0;
if (x0 != x1 + 1)
{
kill(getppid(), SIGTERM);
fprintf(stderr, "Double variable changed! pid=%d, iteration=%d, should=%g,
is=%g\n", getpid(), iter, x1+1, x0);
exit(1);
}
sleep(1);
}
}
testcrypto()
{
while(1)
{
system("openssl genrsa -out /dev/null 4096");
sleep(1);
}
}
main()
{
if (fork() == 0)
testdblchg();
testcrypto();
}
===
Output:
$ ./a.out
Starting loop, pid=16920
Generating RSA private key, 4096 bit long modulus
......++
.......................................................................................................................................................................++
e is 65537 (0x10001)
Generating RSA private key, 4096 bit long modulus
...................................Double variable changed! pid=16920, iteration=15,
should=nan, is=nan
Terminated
$ uname -a
Linux dirk 2.6.26 #1 Wed Jul 30 10:56:10 CEST 2008 i686 GNU/Linux
$ cat /proc/cpuinfo
processor : 0
vendor_id : User Mode Linux
model name : UML
mode : skas
host : Linux seldon-base 2.6.23.17 #2 SMP Sat Jun 21 15:04:22 CEST 2008 i686
bogomips : 4771.02
$ gcc -v
Using built-in specs.
Target: i486-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian 4.3.1-2'
--with-bugurl=file:///usr/share/doc/gcc-4.3/README.Bugs
--enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --enable-shared
--with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix
--enable-nls --with-gxx-include-dir=/usr/include/c++/4.3 --program-suffix=-4.3
--enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc --enable-mpfr
--enable-targets=all --enable-cld --enable-checking=release --build=i486-linux-gnu
--host=i486-linux-gnu --target=i486-linux-gnu
Thread model: posix
gcc version 4.3.1 (Debian 4.3.1-2)
$ dpkg -l libc6
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Cfg-files/Unpacked/Failed-cfg/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad)
||/ Name Version Description
+++-==============-==============-============================================
ii libc6 2.7-10 GNU C Library: Shared libraries
Regards
--
Stano
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
next prev parent reply other threads:[~2008-08-07 12:14 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-04 12:40 [uml-devel] /dev/random problems _not_ solved in 2.6.26 Stanislav Meduna
2008-08-04 16:42 ` Jeff Dike
2008-08-05 19:37 ` Stanislav Meduna
2008-08-05 21:32 ` Brock, Anthony - NET
2008-08-06 8:13 ` Stanislav Meduna
2008-08-07 9:49 ` [uml-devel] /dev/random problems .. or FP registers corruption?! Stanislav Meduna
2008-08-07 12:13 ` Stanislav Meduna [this message]
2008-08-08 12:35 ` [uml-devel] FP registers corruption Stanislav Meduna
2008-08-25 21:51 ` Jeff Dike
2008-08-26 7:20 ` Stanislav Meduna
2008-08-26 17:46 ` Jeff Dike
2008-08-26 18:07 ` Stanislav Meduna
2008-08-26 18:44 ` Jeff Dike
2008-08-26 18:51 ` Stanislav Meduna
2008-08-27 14:59 ` Jeff Dike
2008-09-08 12:13 ` Stanislav Meduna
2008-09-09 22:56 ` Stanislav Meduna
2008-09-12 20:27 ` Stanislav Meduna
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=489AE6DD.2000200@meduna.org \
--to=stano@meduna.org \
--cc=openssl-dev@openssl.org \
--cc=user-mode-linux-devel@lists.sourceforge.net \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.