<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/linux-finally-eliminates-the-strncpy-api-after-six-years-of-work-360-patches-sel6lcwdy" -->

---
title: Linux Finally Eliminates The strncpy API After Six Years...
description: Linux 7.2 has completed a six-year effort to eliminate the strncpy API from the kernel, requiring approximately 362 commits across that period. The function...
canonical: https://daily.dev/posts/linux-finally-eliminates-the-strncpy-api-after-six-years-of-work-360-patches-sel6lcwdy
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Linux Finally Eliminates The strncpy API After Six Years Of Work, 360+ Patches | daily.dev
og:description: Linux 7.2 has completed a six-year effort to eliminate the strncpy API from the kernel, requiring approximately 362 commits across that period. The function...
og:url: https://daily.dev/posts/linux-finally-eliminates-the-strncpy-api-after-six-years-of-work-360-patches-sel6lcwdy
og:image: https://api.daily.dev/og/posts/sEl6lCWdY.png
og:image:alt: Linux Finally Eliminates The strncpy API After Six Years Of Work, 360+ Patches
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

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

**[Phoronix](https://daily.dev/sources/phoronix)** · 1 min read · 1 upvotes · 0 comments

## Summary

Linux 7.2 has completed a six-year effort to eliminate the strncpy API from the kernel, requiring approximately 362 commits across that period. The function was removed due to counter-intuitive NUL termination semantics and performance overhead from redundant zero-filling. Developers should now 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.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://www.phoronix.com/news/Linux-7.2-Drops-strncpy>

## Similar posts on daily.dev

- [After 6 years and over 360 commits, Linux 7.2 finally removes "a persistent source of bugs"](https://daily.dev/posts/after-6-years-and-over-360-commits-linux-7-2-finally-removes-a-persistent-source-of-bugs--j2ne4knox) · XDA Developers · 1 upvotes · 0 comments
- [RISC-V Optimized strnlen Implementation For Linux 7.1 Yields Big Speed-Up](https://daily.dev/posts/risc-v-optimized-strnlen-implementation-for-linux-7-1-yields-big-speed-up-d8gluyo35) · Phoronix · 0 upvotes · 0 comments
- [no strcpy either](https://daily.dev/posts/no-strcpy-either-3zkws7ywj) · daniel.haxx.se · 9 upvotes · 0 comments

---

Tags: [#linux](https://daily.dev/tags/linux), [#c](https://daily.dev/tags/c)

[View this post on daily.dev](https://daily.dev/posts/linux-finally-eliminates-the-strncpy-api-after-six-years-of-work-360-patches-sel6lcwdy)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Linux Finally Eliminates The strncpy API After Six Years Of Work, 360+ Patches","url":"https://daily.dev/posts/linux-finally-eliminates-the-strncpy-api-after-six-years-of-work-360-patches-sel6lcwdy","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/linux-finally-eliminates-the-strncpy-api-after-six-years-of-work-360-patches-sel6lcwdy"},"datePublished":"2026-06-20T14:24:31.313Z","dateModified":"2026-06-20T18:20:00.908Z","description":"Linux 7.2 has completed a six-year effort to eliminate the strncpy API from the kernel, requiring approximately 362 commits across that period. The function...","image":"https://media.daily.dev/image/upload/s--0_ODbtD2--/f_auto/v1722860399/public/Placeholder%2008","thumbnailUrl":"https://media.daily.dev/image/upload/s--0_ODbtD2--/f_auto/v1722860399/public/Placeholder%2008","isAccessibleForFree":true,"articleSection":"Phoronix","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Phoronix","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/6a26ba379dd64932830aa0c9803dd7ee","url":"https://daily.dev/sources/phoronix"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/linux-finally-eliminates-the-strncpy-api-after-six-years-of-work-360-patches-sel6lcwdy","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":1},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"linux,c","timeRequired":"PT1M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Phoronix","item":"https://daily.dev/sources/phoronix"},{"@type":"ListItem","position":3,"name":"Linux Finally Eliminates The strncpy API After Six Years Of Work, 360+ Patches"}]}
```

