Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp5252546ybp; Mon, 7 Oct 2019 23:14:20 -0700 (PDT) X-Google-Smtp-Source: APXvYqyLriE2umlFJk1oWRKTX3Lytte9DE/mZunKS0Jok8f4Xu/+5uY87BPlfynYkMMY0ydF+1+V X-Received: by 2002:a05:6402:14d0:: with SMTP id f16mr32229303edx.41.1570515260085; Mon, 07 Oct 2019 23:14:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570515260; cv=none; d=google.com; s=arc-20160816; b=nipdXvXjD+uxxmwuzuCJVuUMqIXIE7vZldh/Y1v+sj7BwCMjB7t8W//6UKz26mSWe2 TEU4KGNx5babrlabMPWrJ5bAlgsEdzuU3no+AxGQiZcIfpfBIYYbHI8m6PEHTrXEX4+L oCNj+/u1xWzKHQMR0JYpEsnGWzqgs0sOpgytMt1vP52KA84s8z8ODGreAxy6wWUCn1YE 56AvVXpQv0tRXffn1zUBUnc2+vUJGlt7Ij/sWh58TX48OuEl7KcEIDH507NCX2batlEB URHJuITBayCAdDhlguGppI2OvROtQlrn/CSYENXm4W6Wy0mNeV709a5XXcyACifhxMHK J0DA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from; bh=fiOz620LpNFZf765tEIIdVO483qEUotF+Iy2UM5EmkA=; b=GzNTnkAT8lmMTUl9vxDYxxPwOOyDzYBVJLJwxiGc4uHWlf/o/TERsKJXmWGt0KoH1Q u1lPmbnz87FMxw99lhZDgPvoAEA6me6PGFS74sL4qo/hDq6ma8K0E8n6svExz7EFMC6F Tom9ihwqvv/xHZp7jSyBxHDncwxEt16UguUqX3/w1h0lJJ0ZzGtHum50ryy64yxymK8w m386pgXvrnt4nGqIq96QvG10F2Okla1TR1U2Vv6DsumIqC6zlZeAejyGtFIyawXPe1c8 1VubS0TitmgWV9EHq2kLTYzQ7TJ5MVtSXuveZ93k/rRU9E55hY8q8nZFY9rJqG9cfXaT mXiw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z7si11109273edi.318.2019.10.07.23.13.56; Mon, 07 Oct 2019 23:14:20 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730059AbfJHGNo (ORCPT + 99 others); Tue, 8 Oct 2019 02:13:44 -0400 Received: from 59-120-53-16.HINET-IP.hinet.net ([59.120.53.16]:49741 "EHLO ATCSQR.andestech.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1729987AbfJHGNn (ORCPT ); Tue, 8 Oct 2019 02:13:43 -0400 Received: from mail.andestech.com (atcpcs16.andestech.com [10.0.1.222]) by ATCSQR.andestech.com with ESMTP id x985u7EV075289; Tue, 8 Oct 2019 13:56:07 +0800 (GMT-8) (envelope-from nickhu@andestech.com) Received: from atcsqa06.andestech.com (10.0.15.65) by ATCPCS16.andestech.com (10.0.1.222) with Microsoft SMTP Server id 14.3.123.3; Tue, 8 Oct 2019 14:11:59 +0800 From: Nick Hu To: , , , , , , , , , , , , , , , , , , , CC: Nick Hu Subject: [PATCH v3 0/3] KASAN support for RISC-V Date: Tue, 8 Oct 2019 14:11:50 +0800 Message-ID: X-Mailer: git-send-email 2.17.0 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.0.15.65] X-DNSRBL: X-MAIL: ATCSQR.andestech.com x985u7EV075289 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org KASAN is an important runtime memory debugging feature in linux kernel which can detect use-after-free and out-of-bounds problems. Changes in v2: - Remove the porting of memmove and exclude the check instead. - Fix some code noted by Christoph Hellwig Changes in v3: - Update the KASAN documentation to mention that riscv is supported. Nick Hu (3): kasan: Archs don't check memmove if not support it. riscv: Add KASAN support kasan: Add riscv to KASAN documentation. Documentation/dev-tools/kasan.rst | 4 +- arch/riscv/Kconfig | 1 + arch/riscv/include/asm/kasan.h | 27 ++++++++ arch/riscv/include/asm/pgtable-64.h | 5 ++ arch/riscv/include/asm/string.h | 9 +++ arch/riscv/kernel/head.S | 3 + arch/riscv/kernel/riscv_ksyms.c | 2 + arch/riscv/kernel/setup.c | 5 ++ arch/riscv/kernel/vmlinux.lds.S | 1 + arch/riscv/lib/memcpy.S | 5 +- arch/riscv/lib/memset.S | 5 +- arch/riscv/mm/Makefile | 6 ++ arch/riscv/mm/kasan_init.c | 104 ++++++++++++++++++++++++++++ mm/kasan/common.c | 2 + 14 files changed, 173 insertions(+), 6 deletions(-) create mode 100644 arch/riscv/include/asm/kasan.h create mode 100644 arch/riscv/mm/kasan_init.c -- 2.17.0