Re: [LEDE-DEV] [PATCH v5] base-files: seed /dev/urandom

2016-07-19 Thread Etienne Champetier
2016-07-19 2:44 GMT+02:00 Daniel Golle : > Hi Etienne, > Hi Arjen, > Hi John, > Hi Jo, Hi Daniel > > while wondering which process is blocking my rootfs from being > unmounted for sysupgrade I discovered that getrandom story going > on and while waiting for blocking I/O read from /dev/urandom, it

Re: [LEDE-DEV] [PATCH v5] base-files: seed /dev/urandom

2016-07-18 Thread Etienne Champetier
2016-07-19 7:40 GMT+02:00 Etienne Champetier : > 2016-07-19 7:09 GMT+02:00 Jo-Philipp Wich : >> Hi Daniel, >> >> interesting failure mode ;( >> >> To me it seems the easiest fix is changing the getrandom syscall wrapper >> utility to use the GRND_NONBLOCK flag in order to be interruptible by >> sig

Re: [LEDE-DEV] [PATCH v5] base-files: seed /dev/urandom

2016-07-18 Thread Etienne Champetier
2016-07-19 7:09 GMT+02:00 Jo-Philipp Wich : > Hi Daniel, > > interesting failure mode ;( > > To me it seems the easiest fix is changing the getrandom syscall wrapper > utility to use the GRND_NONBLOCK flag in order to be interruptible by > signals. > > Thoughts? According to the man page it's alre

Re: [LEDE-DEV] [PATCH v5] base-files: seed /dev/urandom

2016-07-18 Thread Jo-Philipp Wich
Hi Daniel, interesting failure mode ;( To me it seems the easiest fix is changing the getrandom syscall wrapper utility to use the GRND_NONBLOCK flag in order to be interruptible by signals. Thoughts? ~ Jo ___ Lede-dev mailing list Lede-dev@lists.inf

Re: [LEDE-DEV] [PATCH v5] base-files: seed /dev/urandom

2016-07-18 Thread Daniel Golle
Hi Etienne, Hi Arjen, Hi John, Hi Jo, while wondering which process is blocking my rootfs from being unmounted for sysupgrade I discovered that getrandom story going on and while waiting for blocking I/O read from /dev/urandom, it even ignored any TERM or KILL signals. This then prevented the root

Re: [LEDE-DEV] [PATCH v5] base-files: seed /dev/urandom

2016-06-28 Thread Etienne Champetier
Hi Arjen, 2016-06-28 11:52 GMT+02:00 Arjen de Korte : > Citeren John Crispin : > >> On 28/06/2016 10:28, Jo-Philipp Wich wrote: >>> >>> Hi Etienne, >>> >>> I like this approach, fine with me now. >>> >> >> same here, we could not also consider adding a uci-defaults script that >> check if rootfs i

Re: [LEDE-DEV] [PATCH v5] base-files: seed /dev/urandom

2016-06-28 Thread Arjen de Korte
Citeren John Crispin : On 28/06/2016 10:28, Jo-Philipp Wich wrote: Hi Etienne, I like this approach, fine with me now. same here, we could not also consider adding a uci-defaults script that check if rootfs is on a mtd or real lbock device and change the default during firstboot, but i gues

Re: [LEDE-DEV] [PATCH v5] base-files: seed /dev/urandom

2016-06-28 Thread John Crispin
On 28/06/2016 10:28, Jo-Philipp Wich wrote: > Hi Etienne, > > I like this approach, fine with me now. > same here, we could not also consider adding a uci-defaults script that check if rootfs is on a mtd or real lbock device and change the default during firstboot, but i guess that would be a

Re: [LEDE-DEV] [PATCH v5] base-files: seed /dev/urandom

2016-06-28 Thread Jo-Philipp Wich
Hi Etienne, I like this approach, fine with me now. On 06/27/2016 05:53 PM, Etienne CHAMPETIER wrote: > This commit: > 1) seed /dev/urandom with the saved seeds as early as possible >(see /lib/preinit/81_urandom_seed) > 2) save a seed at /etc/urandom.seed if it doesn't exists > 3) save a new

[LEDE-DEV] [PATCH v5] base-files: seed /dev/urandom

2016-06-27 Thread Etienne CHAMPETIER
This commit: 1) seed /dev/urandom with the saved seeds as early as possible (see /lib/preinit/81_urandom_seed) 2) save a seed at /etc/urandom.seed if it doesn't exists 3) save a new seed each boot at "system.@system[0].urandom_seed" (see /etc/init.d/urandom_seed) We use getrandom() so we are