Received: by 2002:a05:6a10:a841:0:0:0:0 with SMTP id d1csp349886pxy; Thu, 22 Apr 2021 03:40:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz2+PX6aqN4XDVg4WLQrPmoCFetQktC08ganEg96zAgg4lmXvnQMgMgpBiQnZcO+WbSplLn X-Received: by 2002:a17:902:b18f:b029:ec:7ac0:fd1a with SMTP id s15-20020a170902b18fb02900ec7ac0fd1amr2858849plr.84.1619088039731; Thu, 22 Apr 2021 03:40:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619088039; cv=none; d=google.com; s=arc-20160816; b=WlT5hG20htT18ez+rzHJfBKIkaC6yZv7uQYYee4aIUL/um63s0h6QVVscCB8zhUfvW J6B+5Q9qOJ4fEUv11+87ycYyToBGdhKsV86jJwrdVq7L4TAHq4aBS4UkhmUjTMiHGglB 3dPh6pucYj2iFWGnweHaYIQ74J6JNLZgKREoNrz1PKQBr85zNrAW7fUzTFo4MTVPqevu jwR9Un28p9dRv5bDM8zvP1s1U9yA/x78uX980QAleEkQL62O2tTA27qxeKLP8HFLOCWs G056bnWhZDXGh7dhbWZDVzcQdC/KbNv7qQmfnvjUGk6zjrSmr4lTQvLgXmDwI1C8clAM lPSA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=+J6itTyY+KkRgMA362LXOYaefIx+9LEyUZfAGr8mPwo=; b=FKeVAoF+U9aVX5PwvFh7bf4jRSUzf3WXepSX1vAiga0JibFrAZTKJRYtydH8pT37KW qdIMd9MutSXfsXvSWEHTw3uE9zKovIAYC4V9Gg3rrCD2W4UC8E6n3kAAizvHqNqqjrd1 hcFaWtPvVyoYEaGTTUvJMhuJBV1lLzw6B+lIYtETuQcOq8ssoMkdKFtx3sl50mpee8FJ +IfliwGSB9VxJVmi1W+ATTLc9mhK/CBkOcagwL/LCRHQhGMg2H85G/3rdJB45TCv81Zq Dsh8dhOF92kgHr/lWNKetaoyjGI+0OMs+jb8LRLz+qqhMsjzeOkA1s0QeOyStPzRvmWW a/Hw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=Y6LzoE9M; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c7si2630850pfn.207.2021.04.22.03.40.27; Thu, 22 Apr 2021 03:40:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=Y6LzoE9M; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235634AbhDVKjY (ORCPT + 99 others); Thu, 22 Apr 2021 06:39:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42308 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235611AbhDVKjW (ORCPT ); Thu, 22 Apr 2021 06:39:22 -0400 Received: from mail-qk1-x730.google.com (mail-qk1-x730.google.com [IPv6:2607:f8b0:4864:20::730]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6AB14C06138B for ; Thu, 22 Apr 2021 03:38:48 -0700 (PDT) Received: by mail-qk1-x730.google.com with SMTP id u20so13580452qku.10 for ; Thu, 22 Apr 2021 03:38:48 -0700 (PDT) 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=+J6itTyY+KkRgMA362LXOYaefIx+9LEyUZfAGr8mPwo=; b=Y6LzoE9MQ29pOpR4e5aTX3nSt9DP3s6j3P2cBOWI7KZubEzmMncFO430/4XhPzImbe y577F1el00RFXVwjsZzIXXKPhK9nL0CIIdrEhpWkNFYPrFWJqDkuNY64ThgGzr39bxEd 8yv6Ci1r/5UceeVj85d2Z/j4dRyhgf6z0cGvaC6wAD2vfBh+qRn7djsDcYKFqcSyJi96 HhJu0jXzeLc6yW+X05mHgE0SnjLlj2+KxFbDaJp6GdV2VMjEtC78/JRsoI72gK3d/14J haF7Oae5BilnWZUIEYtHNYN+rWXpeaZr3pjZbyPv+FWpQLgI0oBWvUrNwMLd2xb0Po6y 7WkA== 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=+J6itTyY+KkRgMA362LXOYaefIx+9LEyUZfAGr8mPwo=; b=cp4dMbAts+SpQVh/ExryBnCNLT1WyFXTvJpP9GgTjJLvEh6I24MSettJgCzhKHkg4U MSBgVHeoLiPzG3R4UBdSqaw+vbzpjSglv1rR1A1tUhP9PBHKX7Kd7MUi2SmLTMK5OhlC lJpsa0GPHAsrjYmg9G+A/GU8ieXlxsAB+WmFT/OU3hSkKZO7/9Z1WKSo2ON6oiAAenst BXSNGTfJuUC24+zV/dk8/jO9R+CsoNH0B6FG79AmRZIcIh+/H/7Fz9Z0eb368ep3EQtF Zc+YPtJdzx6ZTjxrhokCLXxDDPdySfnaky/3X6sPO67fgYpjKRJi4/4J/2neGf9rxH6z NXxQ== X-Gm-Message-State: AOAM533F2SqNK0UmxxbpKwjnwgL/Hch0RUG/xDYaL6yx8OBj0Nyzrg5K bQlnTQ+HeMDN2gQxEl4Z0wp0BL9XWAAC4yy5WFwu2A== X-Received: by 2002:a37:42c3:: with SMTP id p186mr2972199qka.352.1619087927256; Thu, 22 Apr 2021 03:38:47 -0700 (PDT) MIME-Version: 1.0 References: <1619079317-1131-1-git-send-email-maninder1.s@samsung.com> <1619079317-1131-2-git-send-email-maninder1.s@samsung.com> In-Reply-To: From: Alexander Potapenko Date: Thu, 22 Apr 2021 12:38:11 +0200 Message-ID: Subject: Re: [PATCH 2/2] mm/kasan: proc interface to read KASAN errors at any time To: Dmitry Vyukov Cc: Maninder Singh , Marco Elver , Andrey Ryabinin , Andrey Konovalov , Andrew Morton , kasan-dev , Linux-MM , LKML , AMIT SAHRAWAT , Vaneet Narang Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > Alex, Marco, can the recently added error_report_notify interface be > used for this? Looks like they are doing roughly the same thing with > the same intentions. We've recently attempted to build a universal library capturing every error report, but then were pointed to tracefs, which was just enough for our purpose (https://lkml.org/lkml/2021/1/15/609). Greg also stated that procfs is a bad place for storing reports: https://lkml.org/lkml/2021/1/15/929. Maninder, which exactly problem are you trying to solve? Note that KASAN already triggers a trace_error_report_end tracepoint on every error report: https://elixir.bootlin.com/linux/v5.12-rc8/source/mm/kasan/report.c#L90 Would it help if you used that one? It could probably be extended with more parameters. Another option if you want verbatim reports is to use the console tracepoints, as this is done in https://elixir.bootlin.com/linux/v5.12-rc8/source/mm/kfence/kfence_test.c Note that there are many caveats with error report collection (see the links above), but for testing purpose it might be enough. Alex