Hacker News — AI on Front Page · · 2 min read

Linux eliminates the strncpy API after six years of work, 360 patches

Mirrored from Hacker News — AI on Front Page for archival readability. Support the source by reading on the original site.

227 pts · 214 comments on Hacker News

strncpy


This merge on Friday eliminated the strncpy API and the last per CPU architecture strncpy implementations.

In place of strncpy, Linux kernel code should use strscpy() for NUL terminated destinations, strscpy_pad() for NUl-terminated destinations with zero-padding, strtomem_pad() for non-NUL-terminated fixed-width fields, memcpy_and_pad() for bounded copies with explicit padding, or memcpy() for known-length memory copies.
25 Comments
Tweet
Linux's KUnit Finally Supporting JUnit Output
Linux 7.2 Gets Rid Of The Last Optimized MD5 Implementation
AF_ALG Deprecation Approved For Linux 7.2, Useless & Insecure Crypto Driver Code Removed
Linux 7.2 Protects Against "Stupid Or Malicious" DoS Attempts By Arming Timers In The Past
Linux 7.2 Slab Changes Include More Performance Optimizations
Initial AMDGPU HDMI 2.1 FRL Support Successfully Merged For Linux 7.2

Michael Larabel is the principal author of Phoronix.com and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via MichaelLarabel.com.

Arch Linux Now Believes Malware Incident Under Control: More Than 1,500 Affected Packages
Arch Linux AUR Hit By Another Wave Of Now More Sophisticated Malware Attack
Linux Finally Eliminates The strncpy API After Six Years Of Work, 360+ Patches
Russian Spam & Profanities Are Now Plaguing The Arch Linux AUR
AMD Opens Pre-Orders For The Linux-Friendly Ryzen AI Halo Developer Platform
Linux 7.1 Released: New NTFS Driver, Intel FRED For Panther Lake, Faster Arc Graphics
systemd 261 Released With New systemd-sysinstall OS Installer, IMDSD & Storagectl
Linux 7.2 Optimization Shows +5% IOPS For EXT4 & XFS After Moving Around Two Lines Of Code

Discussion (0)

Sign in to join the discussion. Free account, 30 seconds — email code or GitHub.

Sign in →

No comments yet. Sign in and be the first to say something.

More from Hacker News — AI on Front Page