This question already has an answer here:

I've made a simple bash script that checks the entropy pool level in /dev/random. I realize that the way I do it, I lower it very slightly at each check (cat /proc/sys/kernel/random/entropy_avail) but since I checked its level at a frequency of once every 2 seconds, it had more than enough time to fully recover and even increase. I did the measurement for 1 hour and 40 minutes. Meanwhile I wasn't doing anything that I thought would lower the entropy (like creating SSH keys, etc.). But I've been told (on IRC) that the simple fact of being connected to the Internet may lower my entropy, so I repeated the experiment on a laptop totally disconnected from the web, and the exact same behavior appeared.

I don't know which program(s) is lowering the entropy in the pool. I have a very minimal arch linux installation (646 packages installed in total) on the disconnected laptop and my main laptop which was connected to the Internet during the measurements was running gentoo with about 800 packages installed and no particular program running in the background other than the "default" ones. I do have a DE installed on both machines (xfce). Here's the plot of the data: Entropy pool level vs time

Edit: Here's the data from my Internet-less laptop: Entropy pool level on laptop

Edit2: Disabling ASLR (added the norandmaps kernel parameter when booting with grub) still yields the same behavior, so ASLR isn't the culprit. Another plot to show the data with ASLR disabled: With norandmaps kernel parameter, same behavior

Edit 3: Apparently my question is a duplicate of this question. I've followed the commands given as accepted answer, namely sudo perf record -e random:\* -g -a -D 1000 -T sleep 60 and perf script. The output file is gigantic (4.4 Mb of text data), here are the first few lines:

 swapper     0 [000]  3491.433002: random:mix_pool_bytes_nolock: ffffffff8173e956 pool: bytes 16 caller add_interrupt_randomness
              5ea5d9 __mix_pool_bytes (/lib/modules/4.6.2-1-ARCH/build/vmlinux)
              5ec601 add_interrupt_randomness (/lib/modules/4.6.2-1-ARCH/build/vmlinux)
              2d5729 handle_irq_event_percpu (/lib/modules/4.6.2-1-ARCH/build/vmlinux)
              2d58b9 handle_irq_event (/lib/modules/4.6.2-1-ARCH/build/vmlinux)
              2d8e2f handle_fasteoi_irq (/lib/modules/4.6.2-1-ARCH/build/vmlinux)
              230e6a handle_irq (/lib/modules/4.6.2-1-ARCH/build/vmlinux)
              7c9abb do_IRQ (/lib/modules/4.6.2-1-ARCH/build/vmlinux)
              7c7bc2 ret_from_intr (/lib/modules/4.6.2-1-ARCH/build/vmlinux)
              6756c7 cpuidle_enter (/lib/modules/4.6.2-1-ARCH/build/vmlinux)
              2bd9fa call_cpuidle (/lib/modules/4.6.2-1-ARCH/build/vmlinux)
              2bde18 cpu_startup_entry (/lib/modules/4.6.2-1-ARCH/build/vmlinux)
              7ba434 rest_init (/lib/modules/4.6.2-1-ARCH/build/vmlinux)
              d0cff0 start_kernel ([kernel.vmlinux].init.text)
              d0c346 x86_64_start_reservations ([kernel.vmlinux].init.text)
              d0c494 x86_64_start_kernel ([kernel.vmlinux].init.text)

swapper 0 [000] 3491.433025: random:credit_entropy_bits: ffffffff8173e956 pool: bits 1 entropy_count 871 entropy_total 141 caller add_interrupt_randomness 5eaab6 credit_entropy_bits (/lib/modules/4.6.2-1-ARCH/build/vmlinux) 5ec644 add_interrupt_randomness (/lib/modules/4.6.2-1-ARCH/build/vmlinux) 2d5729 handle_irq_event_percpu (/lib/modules/4.6.2-1-ARCH/build/vmlinux) 2d58b9 handle_irq_event (/lib/modules/4.6.2-1-ARCH/build/vmlinux) 2d8e2f handle_fasteoi_irq (/lib/modules/4.6.2-1-ARCH/build/vmlinux) 230e6a handle_irq (/lib/modules/4.6.2-1-ARCH/build/vmlinux) 7c9abb do_IRQ (/lib/modules/4.6.2-1-ARCH/build/vmlinux) 7c7bc2 ret_from_intr (/lib/modules/4.6.2-1-ARCH/build/vmlinux) 6756c7 cpuidle_enter (/lib/modules/4.6.2-1-ARCH/build/vmlinux) 2bd9fa call_cpuidle (/lib/modules/4.6.2-1-ARCH/build/vmlinux) 2bde18 cpu_startup_entry (/lib/modules/4.6.2-1-ARCH/build/vmlinux) 7ba434 rest_init (/lib/modules/4.6.2-1-ARCH/build/vmlinux) d0cff0 start_kernel ([kernel.vmlinux].init.text) d0c346 x86_64_start_reservations ([kernel.vmlinux].init.text) d0c494 x86_64_start_kernel ([kernel.vmlinux].init.text)

swapper 0 [000] 3491.876901: random:mix_pool_bytes: ffffffff8173e956 pool: bytes 16 caller add_timer_randomness 5ea6a3 mix_pool_bytes (/lib/modules/4.6.2-1-ARCH/build/vmlinux) 5eac36 add_timer_randomness (/lib/modules/4.6.2-1-ARCH/build/vmlinux) 5eb477 add_input_randomness (/lib/modules/4.6.2-1-ARCH/build/vmlinux) 655492 input_pass_values.part.1 (/lib/modules/4.6.2-1-ARCH/build/vmlinux) 655852 input_handle_event (/lib/modules/4.6.2-1-ARCH/build/vmlinux) 655d38 input_event (/lib/modules/4.6.2-1-ARCH/build/vmlinux) 3c28 hidinput_report_event ([hid]) 2506 hid_report_raw_event ([hid]) 27bb hid_input_report ([hid]) 1c5c hid_irq_in ([usbhid]) 9c05 __usb_hcd_giveback_urb ([usbcore]) 9ddf usb_hcd_giveback_urb ([usbcore]) 126ef xhci_irq ([xhci_hcd]) 13041 xhci_msi_irq ([xhci_hcd]) 2d56d1 handle_irq_event_percpu (/lib/modules/4.6.2-1-ARCH/build/vmlinux) 2d58b9 handle_irq_event (/lib/modules/4.6.2-1-ARCH/build/vmlinux) 2d8d1b handle_edge_irq (/lib/modules/4.6.2-1-ARCH/build/vmlinux) 230e6a handle_irq (/lib/modules/4.6.2-1-ARCH/build/vmlinux) 7c9abb do_IRQ (/lib/modules/4.6.2-1-ARCH/build/vmlinux) 7c7bc2 ret_from_intr (/lib/modules/4.6.2-1-ARCH/build/vmlinux) 6756c7 cpuidle_enter (/lib/modules/4.6.2-1-ARCH/build/vmlinux) 2bd9fa call_cpuidle (/lib/modules/4.6.2-1-ARCH/build/vmlinux) 2bde18 cpu_startup_entry (/lib/modules/4.6.2-1-ARCH/build/vmlinux) 7ba434 rest_init (/lib/modules/4.6.2-1-ARCH/build/vmlinux) d0cff0 start_kernel ([kernel.vmlinux].init.text) d0c346 x86_64_start_reservations ([kernel.vmlinux].init.text) d0c494 x86_64_start_kernel ([kernel.vmlinux].init.text)

swapper 0 [000] 3491.876931: random:credit_entropy_bits: ffffffff8173e956 pool: bits 9 entropy_count 876 entropy_total 150 caller add_timer_randomness 5eaab6 credit_entropy_bits (/lib/modules/4.6.2-1-ARCH/build/vmlinux) 5eacbd add_timer_randomness (/lib/modules/4.6.2-1-ARCH/build/vmlinux) 5eb477 add_input_randomness (/lib/modules/4.6.2-1-ARCH/build/vmlinux) 655492 input_pass_values.part.1 (/lib/modules/4.6.2-1-ARCH/build/vmlinux) 655852 input_handle_event (/lib/modules/4.6.2-1-ARCH/build/vmlinux) 655d38 input_event (/lib/modules/4.6.2-1-ARCH/build/vmlinux) 3c28 hidinput_report_event ([hid]) 2506 hid_report_raw_event ([hid]) 27bb hid_input_report ([hid]) 1c5c hid_irq_in ([usbhid]) 9c05 __usb_hcd_giveback_urb ([usbcore]) 9ddf usb_hcd_giveback_urb ([usbcore]) 126ef xhci_irq ([xhci_hcd]) 13041 xhci_msi_irq ([xhci_hcd]) 2d56d1 handle_irq_event_percpu (/lib/modules/4.6.2-1-ARCH/build/vmlinux) 2d58b9 handle_irq_event (/lib/modules/4.6.2-1-ARCH/build/vmlinux) 2d8d1b handle_edge_irq (/lib/modules/4.6.2-1-ARCH/build/vmlinux) 230e6a handle_irq (/lib/modules/4.6.2-1-ARCH/build/vmlinux) 7c9abb do_IRQ (/lib/modules/4.6.2-1-ARCH/build/vmlinux) 7c7bc2 ret_from_intr (/lib/modules/4.6.2-1-ARCH/build/vmlinux) 6756c7 cpuidle_enter (/lib/modules/4.6.2-1-ARCH/build/vmlinux) 2bd9fa call_cpuidle (/lib/modules/4.6.2-1-ARCH/build/vmlinux) 2bde18 cpu_startup_entry (/lib/modules/4.6.2-1-ARCH/build/vmlinux) 7ba434 rest_init (/lib/modules/4.6.2-1-ARCH/build/vmlinux) d0cff0 start_kernel ([kernel.vmlinux].init.text) d0c346 x86_64_start_reservations ([kernel.vmlinux].init.text) d0c494 x86_64_start_kernel ([kernel.vmlinux].init.text)

swapper 0 [000] 3491.876945: random:add_input_randomness: input_pool_bits 876 5eb4c7 add_input_randomness (/lib/modules/4.6.2-1-ARCH/build/vmlinux) 655492 input_pass_values.part.1 (/lib/modules/4.6.2-1-ARCH/build/vmlinux) 655852 input_handle_event (/lib/modules/4.6.2-1-ARCH/build/vmlinux) 655d38 input_event (/lib/modules/4.6.2-1-ARCH/build/vmlinux) 3c28 hidinput_report_event ([hid]) 2506 hid_report_raw_event ([hid]) 27bb hid_input_report ([hid]) 1c5c hid_irq_in ([usbhid]) 9c05 __usb_hcd_giveback_urb ([usbcore]) 9ddf usb_hcd_giveback_urb ([usbcore]) 126ef xhci_irq ([xhci_hcd]) 13041 xhci_msi_irq ([xhci_hcd]) 2d56d1 handle_irq_event_percpu (/lib/modules/4.6.2-1-ARCH/build/vmlinux) 2d58b9 handle_irq_event (/lib/modules/4.6.2-1-ARCH/build/vmlinux) 2d8d1b handle_edge_irq (/lib/modules/4.6.2-1-ARCH/build/vmlinux) 230e6a handle_irq (/lib/modules/4.6.2-1-ARCH/build/vmlinux) 7c9abb do_IRQ (/lib/modules/4.6.2-1-ARCH/build/vmlinux) 7c7bc2 ret_from_intr (/lib/modules/4.6.2-1-ARCH/build/vmlinux) 6756c7 cpuidle_enter (/lib/modules/4.6.2-1-ARCH/build/vmlinux) 2bd9fa call_cpuidle (/lib/modules/4.6.2-1-ARCH/build/vmlinux) 2bde18 cpu_startup_entry (/lib/modules/4.6.2-1-ARCH/build/vmlinux) 7ba434 rest_init (/lib/modules/4.6.2-1-ARCH/build/vmlinux) d0cff0 start_kernel ([kernel.vmlinux].init.text) d0c346 x86_64_start_reservations ([kernel.vmlinux].init.text) d0c494 x86_64_start_kernel ([kernel.vmlinux].init.text)

swapper 0 [000] 3491.884903: random:mix_pool_bytes: ffffffff8173e956 pool: bytes 16 caller add_timer_randomness 5ea6a3 mix_pool_bytes (/lib/modules/4.6.2-1-ARCH/build/vmlinux) 5eac36 add_timer_randomness (/lib/modules/4.6.2-1-ARCH/build/vmlinux) 5eb477 add_input_randomness (/lib/modules/4.6.2-1-ARCH/build/vmlinux) 655492 input_pass_values.part.1 (/lib/modules/4.6.2-1-ARCH/build/vmlinux) 655852 input_handle_event (/lib/modules/4.6.2-1-ARCH/build/vmlinux) 655d38 input_event (/lib/modules/4.6.2-1-ARCH/build/vmlinux) 3c28 hidinput_report_event ([hid]) 2506 hid_report_raw_event ([hid]) 27bb hid_input_report ([hid]) 1c5c hid_irq_in ([usbhid]) 9c05 __usb_hcd_giveback_urb ([usbcore]) 9ddf usb_hcd_giveback_urb ([usbcore]) 126ef xhci_irq ([xhci_hcd]) 13041 xhci_msi_irq ([xhci_hcd]) 2d56d1 handle_irq_event_percpu (/lib/modules/4.6.2-1-ARCH/build/vmlinux) 2d58b9 handle_irq_event (/lib/modules/4.6.2-1-ARCH/build/vmlinux) 2d8d1b handle_edge_irq (/lib/modules/4.6.2-1-ARCH/build/vmlinux) 230e6a handle_irq (/lib/modules/4.6.2-1-ARCH/build/vmlinux) 7c9abb do_IRQ (/lib/modules/4.6.2-1-ARCH/build/vmlinux) 7c7bc2 ret_from_intr (/lib/modules/4.6.2-1-ARCH/build/vmlinux) 6756c7 cpuidle_enter (/lib/modules/4.6.2-1-ARCH/build/vmlinux) 2bd9fa call_cpuidle (/lib/modules/4.6.2-1-ARCH/build/vmlinux) 2bde18 cpu_startup_entry (/lib/modules/4.6.2-1-ARCH/build/vmlinux) 7ba434 rest_init (/lib/modules/4.6.2-1-ARCH/build/vmlinux) d0cff0 start_kernel ([kernel.vmlinux].init.text) d0c346 x86_64_start_reservations ([kernel.vmlinux].init.text) d0c494 x86_64_start_kernel ([kernel.vmlinux].init.text)

swapper 0 [000] 3491.884933: random:credit_entropy_bits: ffffffff8173e956 pool: bits 1 entropy_count 876 entropy_total 151 caller add_timer_randomness 5eaab6 credit_entropy_bits (/lib/modules/4.6.2-1-ARCH/build/vmlinux) 5eacbd add_timer_randomness (/lib/modules/4.6.2-1-ARCH/build/vmlinux) 5eb477 add_input_randomness (/lib/modules/4.6.2-1-ARCH/build/vmlinux) 655492 input_pass_values.part.1 (/lib/modules/4.6.2-1-ARCH/build/vmlinux) 655852 input_handle_event (/lib/modules/4.6.2-1-ARCH/build/vmlinux) 655d38 input_event (/lib/modules/4.6.2-1-ARCH/build/vmlinux) 3c28 hidinput_report_event ([hid]) 2506 hid_report_raw_event ([hid]) 27bb hid_input_report ([hid]) 1c5c hid_irq_in ([usbhid]) 9c05 __usb_hcd_giveback_urb ([usbcore]) 9ddf usb_hcd_giveback_urb ([usbcore]) 126ef xhci_irq ([xhci_hcd]) 13041 xhci_msi_irq ([xhci_hcd]) 2d56d1 handle_irq_event_percpu (/lib/modules/4.6.2-1-ARCH/build/vmlinux) 2d58b9 handle_irq_event (/lib/modules/4.6.2-1-ARCH/build/vmlinux) 2d8d1b handle_edge_irq (/lib/modules/4.6.2-1-ARCH/build/vmlinux) 230e6a handle_irq (/lib/modules/4.6.2-1-ARCH/build/vmlinux) 7c9abb do_IRQ (/lib/modules/4.6.2-1-ARCH/build/vmlinux) 7c7bc2 ret_from_intr (/lib/modules/4.6.2-1-ARCH/build/vmlinux) 6756c7 cpuidle_enter (/lib/modules/4.6.2-1-ARCH/build/vmlinux) 2bd9fa call_cpuidle (/lib/modules/4.6.2-1-ARCH/build/vmlinux) 2bde18 cpu_startup_entry (/lib/modules/4.6.2-1-ARCH/build/vmlinux) 7ba434 rest_init (/lib/modules/4.6.2-1-ARCH/build/vmlinux) d0cff0 start_kernel ([kernel.vmlinux].init.text) d0c346 x86_64_start_reservations ([kernel.vmlinux].init.text) d0c494 x86_64_start_kernel ([kernel.vmlinux].init.text)

(...)

swapper 0 [000] 3491.916850: random:add_input_randomness: input_pool_bits 876 5eb4c7 add_input_randomness (/lib/modules/4.6.2-1-ARCH/build/vmlinux) 655492 input_pass_values.part.1 (/lib/modules/4.6.2-1-ARCH/build/vmlinux) 655852 input_handle_event (/lib/modules/4.6.2-1-ARCH/build/vmlinux) 655d38 input_event (/lib/modules/4.6.2-1-ARCH/build/vmlinux) 3c28 hidinput_report_event ([hid]) 2506 hid_report_raw_event ([hid]) 27bb hid_input_report ([hid]) 1c5c hid_irq_in ([usbhid]) 9c05 __usb_hcd_giveback_urb ([usbcore]) 9ddf usb_hcd_giveback_urb ([usbcore]) 126ef xhci_irq ([xhci_hcd]) 13041 xhci_msi_irq ([xhci_hcd]) 2d56d1 handle_irq_event_percpu (/lib/modules/4.6.2-1-ARCH/build/vmlinux) 2d58b9 handle_irq_event (/lib/modules/4.6.2-1-ARCH/build/vmlinux) 2d8d1b handle_edge_irq (/lib/modules/4.6.2-1-ARCH/build/vmlinux) 230e6a handle_irq (/lib/modules/4.6.2-1-ARCH/build/vmlinux) 7c9abb do_IRQ (/lib/modules/4.6.2-1-ARCH/build/vmlinux) 7c7bc2 ret_from_intr (/lib/modules/4.6.2-1-ARCH/build/vmlinux) 6756c7 cpuidle_enter (/lib/modules/4.6.2-1-ARCH/build/vmlinux) 2bd9fa call_cpuidle (/lib/modules/4.6.2-1-ARCH/build/vmlinux) 2bde18 cpu_startup_entry (/lib/modules/4.6.2-1-ARCH/build/vmlinux) 7ba434 rest_init (/lib/modules/4.6.2-1-ARCH/build/vmlinux) d0cff0 start_kernel ([kernel.vmlinux].init.text) d0c346 x86_64_start_reservations ([kernel.vmlinux].init.text) d0c494 x86_64_start_kernel ([kernel.vmlinux].init.text)

swapper 0 [000] 3491.924973: random:mix_pool_bytes: ffffffff8173e956 pool: bytes 16 caller add_timer_randomness 5ea6a3 mix_pool_bytes (/lib/modules/4.6.2-1-ARCH/build/vmlinux) 5eac36 add_timer_randomness (/lib/modules/4.6.2-1-ARCH/build/vmlinux) 5eb477 add_input_randomness (/lib/modules/4.6.2-1-ARCH/build/vmlinux) 655492 input_pass_values.part.1 (/lib/modules/4.6.2-1-ARCH/build/vmlinux) 655852 input_handle_event (/lib/modules/4.6.2-1-ARCH/build/vmlinux) 655d38 input_event (/lib/modules/4.6.2-1-ARCH/build/vmlinux) 3c28 hidinput_report_event ([hid]) 2506 hid_report_raw_event ([hid]) 27bb hid_input_report ([hid]) 1c5c hid_irq_in ([usbhid]) 9c05 __usb_hcd_giveback_urb ([usbcore]) 9ddf usb_hcd_giveback_urb ([usbcore]) 126ef xhci_irq ([xhci_hcd]) 13041 xhci_msi_irq ([xhci_hcd]) 2d56d1 handle_irq_event_percpu (/lib/modules/4.6.2-1-ARCH/build/vmlinux) 2d58b9 handle_irq_event (/lib/modules/4.6.2-1-ARCH/build/vmlinux) 2d8d1b handle_edge_irq (/lib/modules/4.6.2-1-ARCH/build/vmlinux) 230e6a handle_irq (/lib/modules/4.6.2-1-ARCH/build/vmlinux) 7c9abb do_IRQ (/lib/modules/4.6.2-1-ARCH/build/vmlinux) 7c7bc2 ret_from_intr (/lib/modules/4.6.2-1-ARCH/build/vmlinux) 6756c7 cpuidle_enter (/lib/modules/4.6.2-1-ARCH/build/vmlinux) 2bd9fa call_cpuidle (/lib/modules/4.6.2-1-ARCH/build/vmlinux) 2bde18 cpu_startup_entry (/lib/modules/4.6.2-1-ARCH/build/vmlinux) 7ba434 rest_init (/lib/modules/4.6.2-1-ARCH/build/vmlinux) d0cff0 start_kernel ([kernel.vmlinux].init.text) d0c346 x86_64_start_reservations ([kernel.vmlinux].init.text) d0c494 x86_64_start_kernel ([kernel.vmlinux].init.text)

swapper 0 [000] 3491.925003: random:add_input_randomness: input_pool_bits 876 5eb4c7 add_input_randomness (/lib/modules/4.6.2-1-ARCH/build/vmlinux) 655492 input_pass_values.part.1 (/lib/modules/4.6.2-1-ARCH/build/vmlinux) 655852 input_handle_event (/lib/modules/4.6.2-1-ARCH/build/vmlinux) 655d38 input_event (/lib/modules/4.6.2-1-ARCH/build/vmlinux) 3c28 hidinput_report_event ([hid]) 2506 hid_report_raw_event ([hid]) 27bb hid_input_report ([hid]) 1c5c hid_irq_in ([usbhid]) 9c05 __usb_hcd_giveback_urb ([usbcore]) 9ddf usb_hcd_giveback_urb ([usbcore]) 126ef xhci_irq ([xhci_hcd]) 13041 xhci_msi_irq ([xhci_hcd]) 2d56d1 handle_irq_event_percpu (/lib/modules/4.6.2-1-ARCH/build/vmlinux) 2d58b9 handle_irq_event (/lib/modules/4.6.2-1-ARCH/build/vmlinux) 2d8d1b handle_edge_irq (/lib/modules/4.6.2-1-ARCH/build/vmlinux) 230e6a handle_irq (/lib/modules/4.6.2-1-ARCH/build/vmlinux) 7c9abb do_IRQ (/lib/modules/4.6.2-1-ARCH/build/vmlinux) 7c7bc2 ret_from_intr (/lib/modules/4.6.2-1-ARCH/build/vmlinux) 6756c7 cpuidle_enter (/lib/modules/4.6.2-1-ARCH/build/vmlinux) 2bd9fa call_cpuidle (/lib/modules/4.6.2-1-ARCH/build/vmlinux) 2bde18 cpu_startup_entry (/lib/modules/4.6.2-1-ARCH/build/vmlinux) 7ba434 rest_init (/lib/modules/4.6.2-1-ARCH/build/vmlinux) d0cff0 start_kernel ([kernel.vmlinux].init.text) d0c346 x86_64_start_reservations ([kernel.vmlinux].init.text) d0c494 x86_64_start_kernel ([kernel.vmlinux].init.text)

firefox 827 [000] 3491.932654: random:mix_pool_bytes: ffffffff8173e956 pool: bytes 16 caller add_timer_randomness 5ea6a3 mix_pool_bytes (/lib/modules/4.6.2-1-ARCH/build/vmlinux) 5eac36 add_timer_randomness (/lib/modules/4.6.2-1-ARCH/build/vmlinux) 5eb477 add_input_randomness (/lib/modules/4.6.2-1-ARCH/build/vmlinux) 655492 input_pass_values.part.1 (/lib/modules/4.6.2-1-ARCH/build/vmlinux) 655852 input_handle_event (/lib/modules/4.6.2-1-ARCH/build/vmlinux) 655d38 input_event (/lib/modules/4.6.2-1-ARCH/build/vmlinux) 3c28 hidinput_report_event ([hid]) 2506 hid_report_raw_event ([hid]) 27bb hid_input_report ([hid]) 1c5c hid_irq_in ([usbhid]) 9c05 __usb_hcd_giveback_urb ([usbcore]) 9ddf usb_hcd_giveback_urb ([usbcore]) 126ef xhci_irq ([xhci_hcd]) 13041 xhci_msi_irq ([xhci_hcd]) 2d56d1 handle_irq_event_percpu (/lib/modules/4.6.2-1-ARCH/build/vmlinux) 2d58b9 handle_irq_event (/lib/modules/4.6.2-1-ARCH/build/vmlinux) 2d8d1b handle_edge_irq (/lib/modules/4.6.2-1-ARCH/build/vmlinux) 230e6a handle_irq (/lib/modules/4.6.2-1-ARCH/build/vmlinux) 7c9abb do_IRQ (/lib/modules/4.6.2-1-ARCH/build/vmlinux) 7c7bc2 ret_from_intr (/lib/modules/4.6.2-1-ARCH/build/vmlinux) 1f6fd81 [unknown] (/usr/lib/firefox/libxul.so) 100000001 [unknown] ([unknown])

My problem is that I'm unable to understand the output well. I don't see which program is draining the entropy. Can anyone shed some light on this output? (P.S.: I ran these last commands with firefox running in the background so it may have drained some entropy, I'm more interested in the other processes.)

marked as duplicate by Lekensteyn, MelBurslan, garethTheRed, Wouter Verhelst, jimmij Jun 21 '16 at 21:08

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • That is a super cool idea. I'm going to try to duplicate it. – Bruce Ediger Mar 19 '16 at 15:09
  • 1
    ASLR, maybe? You're aware that Linux's “entropy level” is a theoretical measure with essentially no practical value, in particular not suitability for cryptography, right? – Gilles Mar 19 '16 at 16:02
  • @Gilles Yes I'm aware that /dev/random is useless for over 99% of things one wants to do, including generating "random" passwords, etc. About ASLR, I have no idea. If you could justify it or explain why it would lower the entropy, I'd appreciate to accept this as an answer. Also, does it lower the entropy continuously (i.e. several times per second for instance?) – coniferous_smellerULPBG-W8ZgjR Mar 19 '16 at 16:40
  • @Gilles I'm currently testing the ASLR hypothesis. I've added "norandmaps" to the kernel options, this should disable the ASLR thing. So I couldn't even reach the desktop and startx would fail due to "IOPL for I/O (operation not permitted)" message. But I could still access a tty and run the script. So we'll see how it goes. – coniferous_smellerULPBG-W8ZgjR Mar 19 '16 at 17:02
  • @Gilles unfortunately the theory failed. I've updated my original post to include the details. So it's not (only at least) ASLR. – coniferous_smellerULPBG-W8ZgjR Mar 19 '16 at 17:15

A comment of push_to_pool function from /drivers/char/random.c says:

/*
 * Used as a workqueue function so that when the input pool is getting
 * full, we can "spill over" some entropy to the output pools.  That
 * way the output pools can store some of the excess entropy instead
 * of letting it go to waste.
 */

If I understand correctly, the kernel itself is purging old entropy from the entropy pool when it is getting full.

  • 1
    Actually it is moving entropy from an "input pool" (sources of entropy as far as I can understand) to "output pools" (the pools used by /dev/random and /dev/urandom). – Lekensteyn Jun 21 '16 at 12:49

Heres a thought that could help someone give an explanation.

I am not sure how to test or confirm it (as I am not sure how you generated the graphs), but from some of your graphs, there may be a 'beat frequency' phenomena at play. If so, a beat frequency is usually symptomatic of the measuring frequency being ever so slightly different to the frequency of what is being measured. An 'aliasing' if you will.

Ok this implies there may be a regular measured entropy level change also -and even worse I note this does not answer your query - what causes the changes - in fact it compounds your query.

Maybe the clock tick or certain multiples that are used to trigger the entropy creation compared to the clock tick/round robin used to kick off your routine to measure the entropy level is the cause of the aliasing in your measurements showing as a beat frequency.

Like I said it is just a thought.

Not the answer you're looking for? Browse other questions tagged or ask your own question.