* + mm-memfd-replace-strcpy-by-strscpy.patch added to -mm tree
@ 2021-01-24 3:56 akpm
0 siblings, 0 replies; only message in thread
From: akpm @ 2021-01-24 3:56 UTC (permalink / raw)
To: mike.kravetz, mm-commits, stephenzhangzsd
The patch titled
Subject: mm/memfd: replace strcpy() by strscpy()
has been added to the -mm tree. Its filename is
mm-memfd-replace-strcpy-by-strscpy.patch
This patch should soon appear at
https://ozlabs.org/~akpm/mmots/broken-out/mm-memfd-replace-strcpy-by-strscpy.patch
and later at
https://ozlabs.org/~akpm/mmotm/broken-out/mm-memfd-replace-strcpy-by-strscpy.patch
Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a
reply-to-all to that, adding suitable additional cc's
*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***
The -mm tree is included into linux-next and is updated
there every 3-4 working days
------------------------------------------------------
From: Stephen Zhang <stephenzhangzsd@gmail.com>
Subject: mm/memfd: replace strcpy() by strscpy()
strcpy() is being deprecated. Replace it with the safer strscpy().
Link: https://lkml.kernel.org/r/1611455017-2210-1-git-send-email-stephenzhangzsd@gmail.com
Signed-off-by: Stephen Zhang <stephenzhangzsd@gmail.com>
Cc: Mike Kravetz <mike.kravetz@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
mm/memfd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/mm/memfd.c~mm-memfd-replace-strcpy-by-strscpy
+++ a/mm/memfd.c
@@ -278,7 +278,7 @@ SYSCALL_DEFINE2(memfd_create,
if (!name)
return -ENOMEM;
- strcpy(name, MFD_NAME_PREFIX);
+ strscpy(name, MFD_NAME_PREFIX, len + MFD_NAME_PREFIX_LEN);
if (copy_from_user(&name[MFD_NAME_PREFIX_LEN], uname, len)) {
error = -EFAULT;
goto err_name;
_
Patches currently in -mm which might be from stephenzhangzsd@gmail.com are
mm-swapfilec-fix-debugging-information-problem.patch
mm-memfd-replace-strcpy-by-strscpy.patch
mm-early_ioremapc-use-__func__-instead-of-function-name.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-01-24 3:57 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-24 3:56 + mm-memfd-replace-strcpy-by-strscpy.patch added to -mm tree akpm
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.