News: 0001482532

  ARM Give a man a fire and he's warm for a day, but set fire to him and he's warm for the rest of his life (Terry Pratchett, Jingo)

Glibc Patch Being Reviewed For getrandom vDSO Support

([Programming] 5 Hours Ago getrandom in the vDSO)


One of the many exciting features merged for Linux 6.11 is [1]getrandom() in the vDSO for [2]very fast yet secure random number generation . Now that the kernel bits have landed, it's on to making use of it in the GNU C Library and other libc implementations.

Going back to early getrandom in the vDSO work from 2022, [3]there's been a glibc patch for testing while this week developer Jason Donenfeld sent out the firmed up patch now that the kernel support is upstream. Donenfeld wrote in that glibc patch:

"Linux 6.11 gains support for calling getrandom() from the vDSO. It operates on a thread-local opaque state allocated with mmap using flags specified by the vDSO.

Multiple states are allocated at once, as many as fit into a page, and these are held in an array of available states to be doled out to each thread upon first use, and recycled when a thread terminates. As these states run low, more are allocated.

To make this procedure async-signal-safe, a simple guard is used in the LSB of the opaque state address, falling back to the syscall if there's reentrancy contention.

This implementation is intentionally kept somewhat basic. We can add optimizations later, but for now, the idea is to get the bones set.

It's currently enabled for x86_64. As the kernel support gains more platforms (arm64 is in the works), this can be easily turned on for those."

[4]The glibc patch is now under review.



[1] https://www.phoronix.com/news/Linux-6.11-Lands-getrandom-vDSO

[2] https://www.phoronix.com/news/getrandom-vDSO-RNG-Linux-6.11

[3] https://www.phoronix.com/news/Linux-getrandom-vDSO-v7

[4] https://inbox.sourceware.org/libc-alpha/20240730132440.1181819-1-Jason@zx2c4.com/



phoronix

1 Billion dollars of budget deficit = 1 Gramm-Rudman
6.023 x 10 to the 23rd power alligator pears = Avocado's number
2 pints = 1 Cavort
Basic unit of Laryngitis = The Hoarsepower
Shortest distance between two jokes = A straight line
6 Curses = 1 Hexahex
3500 Calories = 1 Food Pound
1 Mole = 007 Secret Agents
1 Mole = 25 Cagey Bees
1 Dog Pound = 16 oz. of Alpo
1000 beers served at a Twins game = 1 Killibrew
2.4 statute miles of surgical tubing at Yale U. = 1 I.V.League
2000 pounds of Chinese soup = 1 Won Ton
10 to the minus 6th power mouthwashes = 1 Microscope
Speed of a tortoise breaking the sound barrier = 1 Machturtle
8 Catfish = 1 Octo-puss
365 Days of drinking Lo-Cal beer. = 1 Lite-year
16.5 feet in the Twilight Zone = 1 Rod Serling
Force needed to accelerate 2.2lbs of cookies = 1 Fig-newton
to 1 meter per second
One half large intestine = 1 Semicolon
10 to the minus 6th power Movie = 1 Microfilm
1000 pains = 1 Megahertz
1 Word = 1 Millipicture
1 Sagan = Billions & Billions
1 Angstrom: measure of computer anxiety = 1000 nail-bytes
10 to the 12th power microphones = 1 Megaphone
10 to the 6th power Bicycles = 2 megacycles
The amount of beauty required launch 1 ship = 1 Millihelen