Menu

Post image 1
Post image 2
1 / 2
298

Linux Finally Eliminates The strncpy API After Six Years Of Work, 360+ Patches

Hacker News·3 months ago
#PTgtGWuf
Reading 0:00
15s threshold

Linux 7.2 has finally eliminated the strncpy API from the Linux kernel. The strncpy() function for copying up to a specified number of bytes has long been deprecated and after six years of work and hundreds of patches, no more users of the strncpy interface within the Linux kernel remained that it has now been eliminated. The strncpy function within the Linux kernel has been a "persistent source of bugs" for years due to counter-intuitive semantics and behavior around NUL termination along with performance issues due to redundant zero-filling of the destination. It took work over the last six years with around 362 commits to eliminate users of strncpy code within the kernel, but they are over the finish line for Linux 7.2. This merge on Friday eliminated the strncpy API and the last per CPU architecture strncpy implementations.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.

Read More