Received: by 10.223.164.202 with SMTP id h10csp2733141wrb; Mon, 27 Nov 2017 23:55:14 -0800 (PST) X-Google-Smtp-Source: AGs4zMYPRrRYsuvQfCwYoVywLqTk6hQ9QpjhC/UdVQSFsf/2ihbnGq8KOTnbEvP7RTaTcvRDQWSZ X-Received: by 10.84.135.129 with SMTP id 1mr42597683plj.47.1511855713921; Mon, 27 Nov 2017 23:55:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511855713; cv=none; d=google.com; s=arc-20160816; b=nuzsDKJVOH0VSNN+bf7JG6aNnabZ40wTk+SU/O49/XFAIVGeK6opvF6prWUCBEIxsM B+WxzZZXVv6J8t4L8CRnkgP4YHGWW9FInlPv8fXr38k/s8p+DixsZkTjHgjyp8cdTO/R D+CvWSuaJkmQ23K4bhScgHJZPmOoCH2jPJQnBhzcJoWzCQ4u9KTKxgQyQZ+qwF5SWAz8 XKuUKxotkKuDwBZVT+8W5yo2wDiRFSkspJERS3EJUFSu2FIZzUxN3wkaWHqrgG5gm6On SegzGfobnHkCRRuTfYvyCFrhqExIzoUlJGyZaQGE6v806kWutY4EvBIkH/6ZBJ8sAca1 KD3w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=aIQ2kAO2yw4OHcUVvlDwu17EwUV7PBfiuYJq61Bi9tI=; b=QbSDNRvB89LJ4yO/915TrDG4sLhEw+yRjYnkefxGKsH7Z+ckvMdopo/KAv9U8icVqz eEZv/D1RA2N8UQKDSNgcLMJEAg80PF6C9HF0VLSVmYiCyyLTA6BdjnjxLe44a06nRVkB BWhiwlAijBaMsFC5gApgADPPkpE8ZRqjGZ39sv9DK0fXTcp5vsLl9A4V+o+LErTiF0UK r8wf4b0SpjGn3hcyf+lEzIpap503vuD0YNnG8eJBI8mU1UJwbYyj5jDJCUH+N07shgmz cwqj0ZDhzOrXMWrZE4H3v2jWKV6cokPMtiOl4LDsvJnBbMYn1yU0/pMBTzw0/+XN+15m o4dg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=mgjLDqHa; 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 y34si3608806plb.377.2017.11.27.23.55.02; Mon, 27 Nov 2017 23:55:13 -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=mgjLDqHa; 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 S1751911AbdK1HtX (ORCPT + 78 others); Tue, 28 Nov 2017 02:49:23 -0500 Received: from mail-pg0-f47.google.com ([74.125.83.47]:43058 "EHLO mail-pg0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751133AbdK1HtU (ORCPT ); Tue, 28 Nov 2017 02:49:20 -0500 Received: by mail-pg0-f47.google.com with SMTP id r12so19915803pgu.10 for ; Mon, 27 Nov 2017 23:49:20 -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; bh=aIQ2kAO2yw4OHcUVvlDwu17EwUV7PBfiuYJq61Bi9tI=; b=mgjLDqHa58/0s2Rm4iUGYAf4ApZGll4tn8Xp4kLdV1/q44EvLSiUfOrbkhHuAL4fkC UAewT8U6Jgz2QrPu2YoKitbb6nYHNAQDAXTlN3U91Iu9EDbl8jnV29MkT87Uau5mfwst xjv/khvKAwgS6kgl/TWrbmzUoS0HWtn6fCejcDEjYQ1b3pXXmOC7eAkdIY7J2NnFJ7yC DCtzzfV38oK1f9zDh8UsNhvT2z0aWocQSmPRFfNrNcMbb2voifhikOxUUI7nQGz4T/aG EZAyeOXnDySJ+U4+5AjglsaNhrNev0GD2VjouqhnivukkJqQrrwkfPU2/aPi+lOQfmw6 1tUQ== 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; bh=aIQ2kAO2yw4OHcUVvlDwu17EwUV7PBfiuYJq61Bi9tI=; b=HJQ9ICGpPeO+8WMiY3kcsNeuWlyYYZPwtQnjlP+taHyao/cIZnIgV9jIVfQO0xESsA spvO1sxnqGNaDcPYNNaoi+vRRZ5RXcTEE8hUlVDJJBzrmy8F1dWPru4rYfrK3lZ7qsfv 9WZnDXDUK1O1Q7Bgrm9kESM2V586hYqMlfgaKLC0ytqRtLE4+EPtmyaPwCPk8CGC6oKN +zVuO0rr4IdP0+zKtikP5EXTJj7eXOcVthIIRmvwpGn599/5m/22Rnef3n2+0BRpQqGl zN6V36fkGP1aBAP/hcO2oQ1zC9HTcsgoPhX8etoEjhWU6ninpznGVb3dS8JxA+eTdtP8 WOFQ== X-Gm-Message-State: AJaThX45rmP9tJIg3t1z2ANPPm2P+tbuOpPRCSnfdwUk8dob/1iMsmyW tb9GMSs1IfJexk9+zwLkgrQ= X-Received: by 10.98.159.16 with SMTP id g16mr28898149pfe.53.1511855359622; Mon, 27 Nov 2017 23:49:19 -0800 (PST) Received: from localhost.localdomain ([124.56.155.17]) by smtp.gmail.com with ESMTPSA id 67sm39403946pfz.171.2017.11.27.23.49.16 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 27 Nov 2017 23:49:18 -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 00/18] introduce a new tool, valid access checker Date: Tue, 28 Nov 2017 16:48:35 +0900 Message-Id: <1511855333-3570-1-git-send-email-iamjoonsoo.kim@lge.com> X-Mailer: git-send-email 2.7.4 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Joonsoo Kim Hello, This patchset introduces a new tool, valid access checker. Vchecker is a dynamic memory error detector. It provides a new debug feature that can find out an un-intended access to valid area. Valid area here means the memory which is allocated and allowed to be accessed by memory owner and un-intended access means the read/write that is initiated by non-owner. Usual problem of this class is memory overwritten. Most of debug feature focused on finding out un-intended access to in-valid area, for example, out-of-bound access and use-after-free, and, there are many good tools for it. But, as far as I know, there is no good tool to find out un-intended access to valid area. This kind of problem is really hard to solve so this tool would be very useful. This tool doesn't automatically catch a problem. Manual runtime configuration to specify the target object is required. Note that there was a similar attempt for the debugging overwritten problem however it requires manual code modifying and recompile. http://lkml.kernel.org/r/<20171117223043.7277-1-wen.gang.wang@oracle.com> To get more information about vchecker, please see a documention at the last patch. Patchset can also be available at https://github.com/JoonsooKim/linux/tree/vchecker-master-v1.0-next-20171122 Enjoy it. Thanks. Joonsoo Kim (14): mm/kasan: make some kasan functions global vchecker: introduce the valid access checker vchecker: mark/unmark the shadow of the allocated objects vchecker: prepare per object memory for vchecker vchecker: store/report callstack of value writer lib/stackdepot: extend stackdepot API to support per-user stackdepot vchecker: consistently exclude vchecker's stacktrace vchecker: fix 'remove' handling on callstack checker mm/vchecker: support inline KASAN build mm/vchecker: make callstack depth configurable mm/vchecker: pass allocation caller address to vchecker hook mm/vchecker: support allocation caller filter lib/vchecker_test: introduce a sample for vchecker test doc: add vchecker document Namhyung Kim (4): lib/stackdepot: Add is_new arg to depot_save_stack vchecker: Add 'callstack' checker vchecker: Support toggle on/off of callstack check vchecker: Use __GFP_ATOMIC to save stacktrace Documentation/dev-tools/vchecker.rst | 200 +++++++ drivers/gpu/drm/drm_mm.c | 4 +- include/linux/kasan.h | 1 + include/linux/slab.h | 8 + include/linux/slab_def.h | 3 + include/linux/slub_def.h | 3 + include/linux/stackdepot.h | 10 +- lib/Kconfig.kasan | 21 + lib/Makefile | 1 + lib/stackdepot.c | 126 ++-- lib/vchecker_test.c | 117 ++++ mm/kasan/Makefile | 1 + mm/kasan/kasan.c | 14 +- mm/kasan/kasan.h | 3 + mm/kasan/report.c | 12 +- mm/kasan/vchecker.c | 1089 ++++++++++++++++++++++++++++++++++ mm/kasan/vchecker.h | 43 ++ mm/page_owner.c | 8 +- mm/slab.c | 47 +- mm/slab.h | 14 +- mm/slab_common.c | 25 + mm/slub.c | 49 +- 22 files changed, 1730 insertions(+), 69 deletions(-) create mode 100644 Documentation/dev-tools/vchecker.rst create mode 100644 lib/vchecker_test.c create mode 100644 mm/kasan/vchecker.c create mode 100644 mm/kasan/vchecker.h -- 2.7.4 From 1586206301986511715@xxx Fri Dec 08 09:10:10 +0000 2017 X-GM-THRID: 1586204154455152797 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread