From: yalin.wang2010@gmail.com (yalin wang)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] arm64: change to use memmove in efi-stub
Date: Fri, 16 Oct 2015 18:46:07 +0800 [thread overview]
Message-ID: <1444992367-11121-1-git-send-email-yalin.wang2010@gmail.com> (raw)
Change to use memmove(), in case the dest address overlap with the
source address.
Signed-off-by: yalin wang <yalin.wang2010@gmail.com>
---
arch/arm64/kernel/efi-stub.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm64/kernel/efi-stub.c b/arch/arm64/kernel/efi-stub.c
index 816120e..b6dc44b 100644
--- a/arch/arm64/kernel/efi-stub.c
+++ b/arch/arm64/kernel/efi-stub.c
@@ -59,7 +59,7 @@ efi_status_t __init handle_kernel_image(efi_system_table_t *sys_table_arg,
}
*image_addr = *reserve_addr + TEXT_OFFSET;
}
- memcpy((void *)*image_addr, old_image_addr, kernel_size);
+ memmove((void *)*image_addr, old_image_addr, kernel_size);
*reserve_size = kernel_memsize;
}
--
1.9.1
next reply other threads:[~2015-10-16 10:46 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-16 10:46 yalin wang [this message]
2015-10-16 10:57 ` [PATCH] arm64: change to use memmove in efi-stub Mark Rutland
2015-10-19 2:11 ` yalin wang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1444992367-11121-1-git-send-email-yalin.wang2010@gmail.com \
--to=yalin.wang2010@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox