diff options
author | Justin Stitt <[email protected]> | 2023-10-03 21:54:59 +0000 |
---|---|---|
committer | Ingo Molnar <[email protected]> | 2023-10-04 09:34:07 +0200 |
commit | c9babd5d95abf3fae6e798605ce5cac98e08daf9 (patch) | |
tree | 295e8d711a50c0c07961744df07338f7ea78a081 /drivers/cdx/controller/cdx_controller.c | |
parent | 802e87cc464613441f9098ebf940b1895fe3f5e5 (diff) |
x86/tdx: Replace deprecated strncpy() with strtomem_pad()
strncpy() works perfectly here in all cases, however, it is deprecated and
as such we should prefer more robust and less ambiguous string APIs:
https://www.kernel.org/doc/html/latest/process/deprecated.html#strncpy-on-nul-terminated-strings
Let's use strtomem_pad() as this matches the functionality of strncpy()
and is _not_ deprecated.
Signed-off-by: Justin Stitt <[email protected]>
Signed-off-by: Ingo Molnar <[email protected]>
Reviewed-by: Kees Cook <[email protected]>
Acked-by: Dave Hansen <[email protected]>
Link: https://github.com/KSPP/linux/issues/90
Link: https://lore.kernel.org/r/20231003-strncpy-arch-x86-coco-tdx-tdx-c-v2-1-0bd21174a217@google.com
Diffstat (limited to 'drivers/cdx/controller/cdx_controller.c')
0 files changed, 0 insertions, 0 deletions