[RFC] Precarious macro in tools/include/linux/string.h
From: Maxwell Doose
Date: Tue May 05 2026 - 00:21:54 EST
Hello Wei and Mike,
I was recently helping a new contributor with their patch replacing
strcpy() with strscpy() in tools/gpio. After some research I put a
hold on that and realized that strscpy was defined as strcpy, which is
extremely precarious and goes against the ideas the kernel has been
fighting for for years, and I traced that change back to commit
9e3d665 authored by Wei and merged by Mike. I'm currently working with
said contributor to get this alias removed and the proper function
definition added, just wanted to give you a heads up.
Are there any tools or dependencies that rely on strscpy() being
aliased to strcpy() before we replace it with the real definition?
best regards,
max