From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49284) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xdykk-0006Yu-Ur for qemu-devel@nongnu.org; Tue, 14 Oct 2014 05:50:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xdykf-0004hb-76 for qemu-devel@nongnu.org; Tue, 14 Oct 2014 05:50:50 -0400 Received: from mail-la0-x235.google.com ([2a00:1450:4010:c03::235]:40855) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xdyke-0004hD-VS for qemu-devel@nongnu.org; Tue, 14 Oct 2014 05:50:45 -0400 Received: by mail-la0-f53.google.com with SMTP id gq15so8339163lab.12 for ; Tue, 14 Oct 2014 02:50:43 -0700 (PDT) Received: from reftel-build.spotify.net ([80.239.169.202]) by mx.google.com with ESMTPSA id l1sm3973793lag.42.2014.10.14.02.50.43 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 14 Oct 2014 02:50:43 -0700 (PDT) From: Magnus Reftel Date: Tue, 14 Oct 2014 11:50:21 +0200 Message-Id: <1413280222-10383-1-git-send-email-reftel@spotify.com> Subject: [Qemu-devel] [PATCH v4] linux-user: Let user specify random seed List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org linux-user uses the rand function for generating the value of the AT_RANDOM elf aux vector entry, and explicitly seeds the random number generator with the current time. This makes it impossible to reproduce runs that use the AT_RANDOM bytes. This patch adds a command line option and a matching environment variable for setting the random seed, so that the AT_RANDOM values can be predictable when the user chooses. The default is still to seed the random number generator with the current time. This is an updated version of the patch, addressing a review comment from Eric Blake on version 3.