Opened 15 months ago

Closed 15 months ago

Last modified 15 months ago

#9416 closed enhancement (fixed)

dev/random needs to be writable

Reported by: fishpond Owned by: nobody
Priority: normal Milestone: R1
Component: Drivers Version: R1/Development
Keywords: random, OpenJDK Cc: hamish
Blocked By: Blocking:
Has a Patch: yes Platform: All

Description

dev/random currently is read-only. On other OSs, writing data to it is used for seeding or increasing the entropy.
OpenJDK's NativePRNG class uses dev/random writes and will thus throw exceptions on re-seeding.
With the attached patch, I'm able to run Netbeans 7.3beta2 with only few problems remaining.

Attachments (2)

driver.patch (981 bytes) - added by fishpond 15 months ago.
Patch for add-ons/kernel/drivers/random/driver.cpp
0001-Added-capability-to-accept-writes-to-dev-random.patch (2.4 KB) - added by fishpond 15 months ago.

Download all attachments as: .zip

Change History (10)

Changed 15 months ago by fishpond

Patch for add-ons/kernel/drivers/random/driver.cpp

comment:1 Changed 15 months ago by fishpond

  • Has a Patch set

comment:2 Changed 15 months ago by fishpond

  • Type changed from bug to enhancement

comment:3 Changed 15 months ago by diver

Thanks for the patch! Could you recreate it using git format-patch.

comment:4 Changed 15 months ago by fishpond

Here you go! Also removed the tracing which was still activated in the last patch.

comment:5 Changed 15 months ago by korli

Patch is acceptable as is, but it seems like C style, whereas the file is C++. This should be improved at a later time.

comment:6 Changed 15 months ago by korli

  • Resolution set to fixed
  • Status changed from new to closed

Edited and applied in hrev45228. Thanks!

comment:7 Changed 15 months ago by korli

  • Cc hamish added

Hamish, this could be of interest for you in relation to http://hg.openjdk.java.net/haiku/haiku/jdk/rev/140b6d549a5e

comment:8 Changed 15 months ago by hamish

It is indeed. I've removed the workaround now. Thanks korli, and thanks fishpond for the patch.

Note: See TracTickets for help on using tickets.