Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S261325AbUK0U43 (ORCPT ); Sat, 27 Nov 2004 15:56:29 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S261323AbUK0U43 (ORCPT ); Sat, 27 Nov 2004 15:56:29 -0500 Received: from linux01.gwdg.de ([134.76.13.21]:64697 "EHLO linux01.gwdg.de") by vger.kernel.org with ESMTP id S261325AbUK0U4C (ORCPT ); Sat, 27 Nov 2004 15:56:02 -0500 Date: Sat, 27 Nov 2004 21:56:00 +0100 (MET) From: Jan Engelhardt To: Bernard Normier cc: linux-kernel@vger.kernel.org Subject: Re: Concurrent access to /dev/urandom In-Reply-To: <006001c4d4c2$14470880$6400a8c0@centrino> Message-ID: References: <006001c4d4c2$14470880$6400a8c0@centrino> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=UTF-8 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 762 Lines: 21 >As long as I serialize access to /dev/urandom, I get different values. >However, with concurrent access to /dev/urandom, I quickly get duplicate How do you concurrently read from urandom? That's only possible with 2 or more CPUs, and even then, I hope that the urandom chardev has some spinlock. >#include >[...] Rule of thumb: Post the smallest possible code that shows the problem. Jan Engelhardt -- Gesellschaft für Wissenschaftliche Datenverarbeitung Am Fassberg, 37077 Göttingen, www.gwdg.de - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/