Story Details

  • Some __nonstring__ Turbulence

    Posted: 2025-04-25 06:46:45

    The Linux kernel's random-number generator (RNG) has undergone changes to improve its handling of non-string entropy sources. Previously, attempts to feed non-string data into the RNG's add_random_regular_quality() function could lead to unintended truncation or corruption. This was due to the function expecting a string and applying string-length calculations to potentially binary data. The patch series rectifies this by introducing a new field to explicitly specify the length of the input data, regardless of its type, ensuring that all provided entropy is correctly incorporated. This improves the reliability and security of the RNG by preventing the loss of potentially valuable entropy and ensuring the generator starts in a more robust state.

    Summary of Comments ( 61 )
    https://news.ycombinator.com/item?id=43790855

    HN commenters discuss the implications of PEP 703, which proposes making the CPython interpreter's GIL per-interpreter, not per-process. Several express excitement about the potential performance improvements, especially for multi-threaded applications. Some raise concerns about the potential for breakage in existing C extensions and the complexities of debugging in a per-interpreter GIL world. Others discuss the trade-offs between the proposed "nogil" build and the standard GIL build, wondering about potential performance regressions in single-threaded applications. A few commenters also highlight the extensive testing and careful consideration that has gone into this proposal, expressing confidence in the core developers. The overall sentiment seems to be positive, with anticipation for the performance gains outweighing concerns about compatibility.