惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

月光博客
月光博客
C
Check Point Blog
J
Java Code Geeks
腾讯CDC
Apple Machine Learning Research
Apple Machine Learning Research
宝玉的分享
宝玉的分享
Microsoft Azure Blog
Microsoft Azure Blog
WordPress大学
WordPress大学
量子位
Google DeepMind News
Google DeepMind News
I
InfoQ
The GitHub Blog
The GitHub Blog
aimingoo的专栏
aimingoo的专栏
N
Netflix TechBlog - Medium
Hugging Face - Blog
Hugging Face - Blog
博客园 - Franky
V
V2EX
Blog — PlanetScale
Blog — PlanetScale
T
The Blog of Author Tim Ferriss
小众软件
小众软件
博客园_首页
人人都是产品经理
人人都是产品经理
博客园 - 聂微东
IT之家
IT之家

Phoronix

KDE Linux Prunes Its Insecure & Unused Software Linux 7.1-rc6 To Support The ASUS ROG RAIKIRI II & Nova 2 Lite Controllers Linux Might Finally Disable The Microsoft RNDIS Protocol Drivers In 2026 Wine-Staging 11.10 Fixes 14 Year Old Bug, Also Fixes Issue Of Some Games Being Too Dark Servo 0.2 Released With Revamped Android Browser UI Zrythm 2.0 Alpha Released For Rewriting The Digital Audio Workstation In C++ & Qt/QML Linux 7.1-rc6 To Hide The Documentation On "clearcpuid" Feature AV2 v1.0 Specification Released For Next-Gen Video Coding Various USB Quirks Merged Ahead Of Linux 7.1-rc6 Rust Coreutils 0.9 Released With Additional Security Hardening, Zero-Copy I/O NixOS 26.05 Released With 20,442 New Packages, Stage 1 Now Based On systemd By Default AMD Submits More Graphics Driver Changes For Linux 7.2 AMD Expands The Range Of Zen 6 CPUs Detected By The Linux Kernel G7 Agrees On Shared Language Around Open-Source AI, Open Weights AI GNOME Circle Takes Stand Against AI Slop, Resources App Makes It Into GNOME Incubator Plasma 6.6, 6.7 & 6.8 See Plenty Of Bug Fixing This Week Genode OS 26.05 Released, Finishes Moving From GitHub To Codeberg SteamOS 3.8.6 Beta Released With Initial Native Support For AMD HDMI VRR Ubuntu 26.10 Snapshot 1 Released For Testing Wine 11.10 Released With VKD3D 2.0, Improved VBScript Compatibility Fwupd 2.1.4 Brings Many Fixes For Bugs Spotted By Anthrophic's Mythos, Firmware Update Support For Intel Arc Pro B65/B70 AMD ROCm 7.2.4 Released With Performance & Stability Fixes CachyOS Delivers Lead Over Arch Linux, Pop!_OS & Ubuntu On System76 Thelio Major Linux Networking Still Seeing "Significantly Bigger" Pull Requests Due To AI Btrfs Change Coming For Linux 7.2 Yields Very Healthy Performance Gain Intel To Support DRM Background Color Property With Linux 7.2 Fedora 45 Considering Use Of PURL Metadata For Uniquely Identifying Software Packages Linux 7.2 To Bring Graphics Driver Fix For Old Integrated Graphics On Intel Sandy Bridge Radeon Software For Linux 26.12 Brings Ubuntu 26.04 Support Intel Sends Out Revised Linux Patches For Directed Package Thermal Interrupts
Linux Finally Eliminates The strncpy API After Six Years ...
Written by Michael Larabel in Linux Kernel on 20 June 2026 at 10 · 2026-06-20 · via Phoronix

LINUX KERNEL

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.

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.