linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrey Ryabinin <aryabinin@virtuozzo.com>
To: Nick Hu <nickhu@andestech.com>,
	alankao@andestech.com, paul.walmsley@sifive.com,
	palmer@sifive.com, aou@eecs.berkeley.edu, green.hu@gmail.com,
	deanbo422@gmail.com, tglx@linutronix.de,
	linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org,
	glider@google.com, dvyukov@google.com, Anup.Patel@wdc.com,
	gregkh@linuxfoundation.org, alexios.zavras@intel.com,
	atish.patra@wdc.com, zong@andestech.com,
	kasan-dev@googlegroups.com
Subject: Re: [PATCH 1/2] riscv: Add memmove string operation.
Date: Thu, 22 Aug 2019 18:59:02 +0300	[thread overview]
Message-ID: <09d5108e-f0ba-13d3-be9e-119f49f6bd85@virtuozzo.com> (raw)
In-Reply-To: <a6c24ce01dc40da10d58fdd30bc3e1316035c832.1565161957.git.nickhu@andestech.com>

On 8/7/19 10:19 AM, Nick Hu wrote:
> There are some features which need this string operation for compilation,
> like KASAN. So the purpose of this porting is for the features like KASAN
> which cannot be compiled without it.
> 

Compilation error can be fixed by diff bellow (I didn't test it).
If you don't need memmove very early (before kasan_early_init()) than arch-specific not-instrumented memmove()
isn't necessary to have.

---
 mm/kasan/common.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/mm/kasan/common.c b/mm/kasan/common.c
index 6814d6d6a023..897f9520bab3 100644
--- a/mm/kasan/common.c
+++ b/mm/kasan/common.c
@@ -107,6 +107,7 @@ void *memset(void *addr, int c, size_t len)
 	return __memset(addr, c, len);
 }
 
+#ifdef __HAVE_ARCH_MEMMOVE
 #undef memmove
 void *memmove(void *dest, const void *src, size_t len)
 {
@@ -115,6 +116,7 @@ void *memmove(void *dest, const void *src, size_t len)
 
 	return __memmove(dest, src, len);
 }
+#endif
 
 #undef memcpy
 void *memcpy(void *dest, const void *src, size_t len)
-- 
2.21.0




  parent reply	other threads:[~2019-08-22 15:59 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-07  7:19 [PATCH 0/2] KASAN support for RISC-V Nick Hu
2019-08-07  7:19 ` [PATCH 1/2] riscv: Add memmove string operation Nick Hu
2019-08-12 15:04   ` Christoph Hellwig
2019-08-13 23:50     ` Palmer Dabbelt
2019-08-14  2:22       ` Paul Walmsley
2019-08-14  3:27         ` Nick Hu
     [not found]           ` <alpine.DEB.2.21.9999.1908141002500.18249@viisi.sifive.com>
2019-08-15  3:12             ` Nick Hu
     [not found]               ` <alpine.DEB.2.21.9999.1908151124450.18249@viisi.sifive.com>
2019-08-19  6:29                 ` Nick Hu
2019-08-14 18:33         ` Palmer Dabbelt
2019-08-22 15:59   ` Andrey Ryabinin [this message]
2019-08-27  9:07     ` Nick Hu
2019-08-27  9:33       ` Andrey Ryabinin
2019-08-28  3:06         ` Nick Hu
2019-08-07  7:19 ` [PATCH 2/2] riscv: Add KASAN support Nick Hu
2019-08-12 15:10   ` Christoph Hellwig
2019-08-14  7:44     ` Nick Hu
2019-08-22 17:08       ` Andrey Ryabinin
2019-09-03 15:08       ` Daniel Axtens
2019-09-04  2:24         ` Nick Hu

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=09d5108e-f0ba-13d3-be9e-119f49f6bd85@virtuozzo.com \
    --to=aryabinin@virtuozzo.com \
    --cc=Anup.Patel@wdc.com \
    --cc=alankao@andestech.com \
    --cc=alexios.zavras@intel.com \
    --cc=aou@eecs.berkeley.edu \
    --cc=atish.patra@wdc.com \
    --cc=deanbo422@gmail.com \
    --cc=dvyukov@google.com \
    --cc=glider@google.com \
    --cc=green.hu@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=kasan-dev@googlegroups.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=nickhu@andestech.com \
    --cc=palmer@sifive.com \
    --cc=paul.walmsley@sifive.com \
    --cc=tglx@linutronix.de \
    --cc=zong@andestech.com \
    /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;
as well as URLs for NNTP newsgroup(s).