User avatar
Kees Cook @kees@hachyderm.io
5mo
We can remove strncpy() from the Linux kernel finally! I did the last 6 instances, and dropped all the implementations:
git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git/log/?h=dev/v7.0-rc2/strncpy

Over the last 6 years working on this, there were 362 commits by 70 contributors. The 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]>

Thank you to all of you! (And especially to Justin Stitt who took on the brunt of the work.)
3
2
2
0
User avatar
artlog @artlog@agora.l0g.eu
5mo
@kees

That's very recent, those last commits are less than one hour ago !

To get the juice of it could you quickly give context ?

Why removing strncpy() from kernel is great ?

What are good practices in kernel when dealing with strings ? ie What does replace strncpy in kernel ?
1
0
1
0
User avatar
illy [Shrimple-mode] protomoji_orange_flag_lesbian @illyBytes@shrimp.imsofucking.gay
5mo
@artlog @kees from what i could gleam, strncpy wasn't safe because it never ensured that the copied string would be null terminated
0
0
2
0