Hello Julia. I just sent a patch to add yet another string copy mechanism. This could help avoid misuses of strscpy and strlcpy like this patch set: https://lore.kernel.org/lkml/cover.1562283944.git.joe@perches.com/T/ A possible cocci script to do conversions could be: $ cat str.cpy.cocci @@ expression e1; expression e2; @@ - strscpy(e1, e2, sizeof(e1)) + stracpy(e1, e2) @@ expression e1; expression e2; @@ - strlcpy(e1, e2, sizeof(e1)) + stracpy(e1, e2) This obviously does not match the style of all the scripts/coccinelle cocci files, but this might be something that could be added improved and added. This script produces: $ spatch --in-place -sp-file str.cpy.cocci . $ git checkout tools/ $ git diff --shortstat 958 files changed, 2179 insertions(+), 2655 deletions(-) The remainder of strlcpy and strscpy uses in the kernel would generally have a form like: strlcpy(to, from, DEFINE) where DEFINE is the specified size of to Could the cocci script above be updated to find and correct those styles as well? cheers, Joe