Received: by 10.223.164.202 with SMTP id h10csp2733004wrb; Mon, 27 Nov 2017 23:55:01 -0800 (PST) X-Google-Smtp-Source: AGs4zMZT9YfJ1+igMPDfnO+CgFD+1cnAOq0AvPlPY2wpP6EcTByuC+evsFJgGvGY8BxyqRxIP+j7 X-Received: by 10.101.101.12 with SMTP id x12mr20692417pgv.420.1511855701106; Mon, 27 Nov 2017 23:55:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511855701; cv=none; d=google.com; s=arc-20160816; b=IQMpHfUQB0CbRbuF+INI4apRxf1v6eQrUecK90NTk9bh77jIW2fXkgQzuW80k55yLF TmnecQqe01TT7YZB4rCcArw23HgY9aU59Kfv0/O1vtRh33urZM+DIXcA9zhH0h3Lxyfg ocThQ7Zp+D/RXNP22TPYbxQHHlVensMebtrnGzJ41dYrvQKYgoTSLpKuZt61NacZRh/c qrtBl9L6vn+fFnnBOuVykQUe+CJ4dtAupJEbVcQMYX3AG90kBFrrzWP8ifXLrNVIQSgA qAkJZa1HNGsOQ+keKSeHy2sghrAswQFKjLJ8I37uoTT2xjuZoLb3kFtOxDseCm18qgDq y2dg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=B+ZcpW38AIegrjXm/B0HBsaLx4hqHzOhVi4G09leJ+k=; b=mrj+fe0EIRcQasv25QFYDKsB94c+lHltzvoDn2nW7/wte0b+wyCDHAQDyFdMZLGqjj Hsc9/9o3eUJLwJhmcZppKMGC9L8t9De4sIwhhtVgjm0xNJ2wyS27QXRZRxa8TSYVsrro a4D/M5smRV3N4BMibTVRbbfkNQBgA06mtZjEdOK2w1PcJyO6XYS+lccI3lLQ7QgWC7yi H6o4e3IyaNGxr6QZXSTd1HFxy1D9U/tjWngOOri+RZlttsHI2CmUSAifMTuzFlYp7XTe LbVy67N5aW5DtCm/IHzCTBylfahTfPUc/88DVm7Y0kd+QyWnHiteVBT6J/VImMuX02M8 HHqw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=fKt2mC0m; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 88si25050336pla.257.2017.11.27.23.54.49; Mon, 27 Nov 2017 23:55:01 -0800 (PST) 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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=fKt2mC0m; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752036AbdK1Ht1 (ORCPT + 78 others); Tue, 28 Nov 2017 02:49:27 -0500 Received: from mail-pg0-f67.google.com ([74.125.83.67]:46881 "EHLO mail-pg0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751908AbdK1HtX (ORCPT ); Tue, 28 Nov 2017 02:49:23 -0500 Received: by mail-pg0-f67.google.com with SMTP id z184so19911800pgd.13 for ; Mon, 27 Nov 2017 23:49:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=B+ZcpW38AIegrjXm/B0HBsaLx4hqHzOhVi4G09leJ+k=; b=fKt2mC0mK6eyB8zFCKzmouX/kcmFcFlOV9BDq9/HES3BSbTQYadasVJcBfusWgcmhZ nlpN/fS4R34kDu3DBEZKAGDo2W3zncwX1ZbF1v2Jdirlz73H5LUkoACAmhiC9f/gmraw HKhBw8N9zhqXYcbrIuvqjoLSrfAnWIPskIxap7zlhhQF7WQgfMsIyID/lraaVVyfvg1D jYtfvQyOgpNYZdLbknUy5aZIW2ffyTfUDngn00S6hyrYSJ/Rxj71HOB/a1XW4P/peiLK lD+Ud4POSb1Fg7r9hDsm++fCMp9Qs8ImF5oKtmZznpTNxI6nZn47OHmzz8bvR0KPxrjg 1O7w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=B+ZcpW38AIegrjXm/B0HBsaLx4hqHzOhVi4G09leJ+k=; b=Qn2o7zGYfEsr7ZT6/quRQa214KHA3fHkfBN7h37xvbyptA4kvc2KKvt7O8nXWc7frw Z1A6IvHPbwX0HUkc9cmM0etMvU8XaUESs9vCRMlO26WZLTgnVm6JglpmyRWFEAHnqZ6f HT2DnLEKtVUFOE1xASW7QouxjIyEGoGXOCpRD/8ryaNlwNmXMcXsQgixommfnaCd6W4F aGsHayCBKCoLzuolVAqz8UEIifIDW5LurIHXmQmZdGdzynXCP0XVfKQnX1QTQNMIgKLL UA0ZenS0b+GdPnBkmejb9dohtOsTAz4fp8ninXk3bPZP7wEl/eD0BQgqGDSYBKToJEMl QbFQ== X-Gm-Message-State: AJaThX4TwyoIRaU4Q0gZtMAJLMgBrKDEim5IQciFwYmbw8LbuKShXIH9 GUzsx0kFR+EikK1AFUhIFfw= X-Received: by 10.98.12.211 with SMTP id 80mr9244238pfm.169.1511855362960; Mon, 27 Nov 2017 23:49:22 -0800 (PST) Received: from localhost.localdomain ([124.56.155.17]) by smtp.gmail.com with ESMTPSA id 67sm39403946pfz.171.2017.11.27.23.49.19 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 27 Nov 2017 23:49:22 -0800 (PST) From: js1304@gmail.com X-Google-Original-From: iamjoonsoo.kim@lge.com To: Andrew Morton Cc: Andrey Ryabinin , Alexander Potapenko , Dmitry Vyukov , kasan-dev@googlegroups.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Namhyung Kim , Wengang Wang , Joonsoo Kim Subject: [PATCH 01/18] mm/kasan: make some kasan functions global Date: Tue, 28 Nov 2017 16:48:36 +0900 Message-Id: <1511855333-3570-2-git-send-email-iamjoonsoo.kim@lge.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1511855333-3570-1-git-send-email-iamjoonsoo.kim@lge.com> References: <1511855333-3570-1-git-send-email-iamjoonsoo.kim@lge.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Joonsoo Kim They will be used for the vchecker in the following patch. Make it non-static and add declairation in header files. Signed-off-by: Joonsoo Kim --- include/linux/kasan.h | 1 + mm/kasan/kasan.c | 2 +- mm/kasan/kasan.h | 2 ++ mm/kasan/report.c | 2 +- 4 files changed, 5 insertions(+), 2 deletions(-) diff --git a/include/linux/kasan.h b/include/linux/kasan.h index e3eb834..50f49fe 100644 --- a/include/linux/kasan.h +++ b/include/linux/kasan.h @@ -37,6 +37,7 @@ extern void kasan_enable_current(void); /* Disable reporting bugs for current task */ extern void kasan_disable_current(void); +void kasan_poison_shadow(const void *address, size_t size, u8 value); void kasan_unpoison_shadow(const void *address, size_t size); void kasan_unpoison_task_stack(struct task_struct *task); diff --git a/mm/kasan/kasan.c b/mm/kasan/kasan.c index 405bba4..2bcbdbd 100644 --- a/mm/kasan/kasan.c +++ b/mm/kasan/kasan.c @@ -54,7 +54,7 @@ void kasan_disable_current(void) * Poisons the shadow memory for 'size' bytes starting from 'addr'. * Memory addresses should be aligned to KASAN_SHADOW_SCALE_SIZE. */ -static void kasan_poison_shadow(const void *address, size_t size, u8 value) +void kasan_poison_shadow(const void *address, size_t size, u8 value) { void *shadow_start, *shadow_end; diff --git a/mm/kasan/kasan.h b/mm/kasan/kasan.h index c70851a..b5d086d 100644 --- a/mm/kasan/kasan.h +++ b/mm/kasan/kasan.h @@ -99,6 +99,8 @@ static inline const void *kasan_shadow_to_mem(const void *shadow_addr) void kasan_report(unsigned long addr, size_t size, bool is_write, unsigned long ip); +void describe_object(struct kmem_cache *cache, void *object, + const void *addr); void kasan_report_double_free(struct kmem_cache *cache, void *object, void *ip); diff --git a/mm/kasan/report.c b/mm/kasan/report.c index 6bcfb01..b78735a 100644 --- a/mm/kasan/report.c +++ b/mm/kasan/report.c @@ -230,7 +230,7 @@ static void describe_object_addr(struct kmem_cache *cache, void *object, (void *)(object_addr + cache->object_size)); } -static void describe_object(struct kmem_cache *cache, void *object, +void describe_object(struct kmem_cache *cache, void *object, const void *addr) { struct kasan_alloc_meta *alloc_info = get_alloc_info(cache, object); -- 2.7.4 From 1585254416014886482@xxx Mon Nov 27 21:00:21 +0000 2017 X-GM-THRID: 1585254416014886482 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread