Skip to contentSkip to conversation

strncpy-removal updates for v7.2-rc1

GIT PULL Merged Kees Cook 2 participants 2 messages Jun 19

lore
Share & tools
lore

Kees Cook

author
#0 lore raw

Hi Linus,

Please pull the strncpy removal for v7.2-rc1. BPF's last usage removal has landed, so here we go.

Thanks!

-Kees

The following changes since commit 9c87e61e3c5797277407ba5eae4eac8a52be3fa3:

Merge tag 'bpf-next-7.2' of git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next (2026-06-17 09:18:14 +0100)

are available in the Git repository at:

https://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git tags/strncpy-removal-v7.2-rc1

for you to fetch changes up to 079a028d6327e68cfa5d38b36123637b321c19a7:

string: Remove strncpy() from the kernel (2026-06-18 16:39:31 -0700)

----------------------------------------------------------------
strncpy removal for v7.2-rc1

- Remove the per-arch strncpy implementations in alpha, m68k, powerpc, x86, and xtensa

- Remove strncpy API

Over the last 6 years working on strncpy removal there were 362 commits by 70 contributors. Folks with more than 1 commit were:

    211  Justin Stitt <[email protected]>
     22  Xu Panda <[email protected]>
     21  Kees Cook <[email protected]>
     17  Thorsten Blum <[email protected]>
     12  Arnd Bergmann <[email protected]>
      4  Pranav Tyagi <[email protected]>
      4  Lee Jones <[email protected]>
      2  Steven Rostedt <[email protected]>
      2  Sam Ravnborg <[email protected]>
      2  Marcelo Moreira <[email protected]>
      2  Krzysztof Kozlowski <[email protected]>
      2  Kalle Valo <[email protected]>
      2  Jaroslav Kysela <[email protected]>
      2  Daniel Thompson <[email protected]>
      2  Andrew Lunn <[email protected]>

----------------------------------------------------------------
Kees Cook (6):
alpha: Remove arch-specific strncpy() implementation
m68k: Remove arch-specific strncpy() implementation
powerpc: Remove arch-specific strncpy() implementation
x86: Remove arch-specific strncpy() implementation
xtensa: Remove arch-specific strncpy() implementation
string: Remove strncpy() from the kernel

 Documentation/process/deprecated.rst          | 47 ++++++++-------
 arch/alpha/include/asm/string.h               |  2 -
 arch/m68k/include/asm/string.h                | 17 ------
 arch/powerpc/boot/string.h                    |  1 -
 arch/powerpc/include/asm/string.h             |  2 -
 arch/x86/include/asm/string_32.h              |  3 -
 arch/xtensa/include/asm/string.h              | 25 --------
 include/linux/fortify-string.h                | 49 ----------------
 include/linux/string.h                        |  3 -
 arch/alpha/lib/strncpy.S                      | 83 ---------------------------
 arch/alpha/lib/styncpy.S                      |  1 -
 arch/powerpc/boot/string.S                    | 13 -----
 arch/powerpc/lib/string.S                     | 22 -------
 arch/x86/lib/string_32.c                      | 19 ------
 drivers/misc/lkdtm/fortify.c                  |  2 +-
 lib/string.c                                  | 16 ------
 lib/test_fortify/write_overflow-strncpy-src.c |  5 --
 lib/test_fortify/write_overflow-strncpy.c     |  5 --
 lib/tests/fortify_kunit.c                     | 61 +-------------------
 19 files changed, 28 insertions(+), 348 deletions(-)
 delete mode 100644 arch/alpha/lib/strncpy.S
 delete mode 100644 lib/test_fortify/write_overflow-strncpy-src.c
 delete mode 100644 lib/test_fortify/write_overflow-strncpy.c
Signature · 1 line
Kees Cook
merge bot Merged
#1 lore raw
The pull request you sent on Thu, 18 Jun 2026 19:49:50 -0700:

The pull request you sent on Thu, 18 Jun 2026 19:49:50 -0700:

Quoted 1 line

https://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git tags/strncpy-removal-v7.2-rc1

has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/1a3746ccbb0a97bed3c06ccde6b880013b1dddc1

Thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/prtracker.html