s390/debug: Replace kmalloc() + copy_from_user() with memdup_user_nul()

Replace kmalloc() followed by copy_from_user() with memdup_user_nul() to
improve and simplify debug_get_user_string(). Remove the manual
NUL-termination.

No functional changes intended.

Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Reviewed-by: Niklas Schnelle <schnelle@linux.ibm.com>
Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com>
This commit is contained in:
Thorsten Blum 2025-09-04 13:40:29 +02:00 • committed by Alexander Gordeev
commit f5507aefc9