• [$] Checked-size array parameters in C

    From LWN.net@1337:1/100 to All on Monday, December 01, 2025 21:15:07
    [$] Checked-size array parameters in C

    Date:
    Mon, 01 Dec 2025 21:11:05 +0000

    Description:
    There are many possible programmer mistakes that are not caught by the
    minimal checks specified by the C language; among those is passing an array
    of the wrong size to a function. A recent attempt to add some safety
    around array parameters within the crypto layer involved the use of some
    clever tricks, but it turns out that clever tricks are unnecessary in this case. There is an obscure C feature that can cause this checking to
    happen, and it is already in use in a few places within the kernel.

    ======================================================================
    Link to news story:
    https://lwn.net/Articles/1046840/


    --- Mystic BBS v1.12 A49 (Linux/64)
    * Origin: tqwNet UK HUB @ hub.uk.erb.pw (1337:1/100)