From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-14.3 required=3.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_IN_DEF_DKIM_WL autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8B77CC432C0 for ; Mon, 18 Nov 2019 08:41:20 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 46C2C20718 for ; Mon, 18 Nov 2019 08:41:20 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="IC7OCAsa" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 46C2C20718 Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id D15E86B000A; Mon, 18 Nov 2019 03:41:19 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id CC5F56B000C; Mon, 18 Nov 2019 03:41:19 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id BB5686B000D; Mon, 18 Nov 2019 03:41:19 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0148.hostedemail.com [216.40.44.148]) by kanga.kvack.org (Postfix) with ESMTP id A3DAF6B000A for ; Mon, 18 Nov 2019 03:41:19 -0500 (EST) Received: from smtpin03.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with SMTP id 6F9004DA8 for ; Mon, 18 Nov 2019 08:41:19 +0000 (UTC) X-FDA: 76168753878.03.sky31_45b1bed94cc13 X-HE-Tag: sky31_45b1bed94cc13 X-Filterd-Recvd-Size: 4976 Received: from mail-qt1-f196.google.com (mail-qt1-f196.google.com [209.85.160.196]) by imf32.hostedemail.com (Postfix) with ESMTP for ; Mon, 18 Nov 2019 08:41:18 +0000 (UTC) Received: by mail-qt1-f196.google.com with SMTP id o3so19332000qtj.8 for ; Mon, 18 Nov 2019 00:41:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Ps8MPX8AyfJLLBwWKE68qZjw9L/Pg8PHKG4fAaJeaII=; b=IC7OCAsaSGadT4QqG44yfohuo2GzVYmYF7p9vOgTBOvtQh6Mok3EIWsuW015bvLd8I KLddOPSLKd89GkJRs5g60SlRqRF/lJe67XhB3/ORMFsCeH4obofc1n4FyBWsVL9ZSD1r AqZzQPUAi1MruJRY0i5nJwkRsfQZSr1EKTRUVkW3/qIWm7SXq5DpDDLoGrIz3+INWJOV 9NPwnXMWD0KvxAgAEF963L6vDLSVPZcFObWwk6HSbBSKNg9DqCJpI+z+/BDByVKrh4IO do4qVjGH148Xp03W4o7cGRdiBWrVFSiRFwDC0FijQw/TOcg/pKcZSljQIN4sUN2PGTk2 3QJw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Ps8MPX8AyfJLLBwWKE68qZjw9L/Pg8PHKG4fAaJeaII=; b=gcsr45dg+g5z+PiR4zWi7AjiUwPI/XTBR03Yn2d7RTZ8vvhUZi3vnMmdl6WoPn+TyC oYjuuic5RLRMNDKu9xko9U8LvJfOWpNvXmIh93WD3puqo3FFpzJJHX+NK345BJNio4NX XflguxUTqxqkvCHPbLMb5U2pnYYuTFugqh8WOj8IWSfQffheuggmeq9mrTGGZSGqrC9R XZGQ4r4NDyXZwor2t++cCN8WnWutxOZj3tXwMwQir5gTO7gIdt79uhXeWtUd8OlC/TK0 xvXK30vPhNXK/w1DnIceMxgy9CecZWd20/OaNENeihZOkWFCPqvzlVDHhFdY5dwq7HFK /LSw== X-Gm-Message-State: APjAAAWYwV88aB/bjlCFUH6m65PakXTW54pj6QtygcQo9WHHHhEvDnrk 9Z1yqOVqPU2VZTVp/NjKXStdFJnMeJfZNoNkVzT8pA== X-Google-Smtp-Source: APXvYqycmhGNQj9GQOvGnwZhD3YJ1muGvboeuF314gc0zshNNbwTi8+MtoHNCjuv9yTAij9KqSEGaKI+HHMznMaAvXU= X-Received: by 2002:aed:24af:: with SMTP id t44mr25451220qtc.57.1574066477833; Mon, 18 Nov 2019 00:41:17 -0800 (PST) MIME-Version: 1.0 References: <20191028024101.26655-1-nickhu@andestech.com> <20191028024101.26655-2-nickhu@andestech.com> In-Reply-To: From: Dmitry Vyukov Date: Mon, 18 Nov 2019 09:41:06 +0100 Message-ID: Subject: Re: [PATCH v4 1/3] kasan: No KASAN's memmove check if archs don't have it. To: Paul Walmsley Cc: Alexander Potapenko , Andrey Ryabinin , Nick Hu , Jonathan Corbet , palmer@sifive.com, aou@eecs.berkeley.edu, Thomas Gleixner , Greg Kroah-Hartman , alankao@andestech.com, Anup.Patel@wdc.com, atish.patra@wdc.com, kasan-dev , "open list:DOCUMENTATION" , LKML , linux-riscv@lists.infradead.org, Linux-MM , green.hu@gmail.com Content-Type: text/plain; charset="UTF-8" X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Sun, Nov 17, 2019 at 5:58 AM Paul Walmsley wrote: > > Hello Andrey, Alexander, Dmitry, > > On Mon, 28 Oct 2019, Nick Hu wrote: > > > If archs don't have memmove then the C implementation from lib/string.c is used, > > and then it's instrumented by compiler. So there is no need to add KASAN's > > memmove to manual checks. > > > > Signed-off-by: Nick Hu > > If you're happy with this revision of this patch, could you please ack it > so we can merge it as part of the RISC-V KASAN patch set? > > Or if you'd prefer to take this patch yourself, please let me know. Hi Paul, Acked-by: Dmitry Vyukov We don't have separate tree for kasan. Merging this via RISC-V tree should be fine. Thanks > - > > > --- > > 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.17.0 > > > > > > _______________________________________________ > > linux-riscv mailing list > > linux-riscv@lists.infradead.org > > http://lists.infradead.org/mailman/listinfo/linux-riscv > > > > > - Paul