Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp811084pxj; Thu, 17 Jun 2021 14:35:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy+UaHyUqCOIaX8bxSCxgvH8jfnvNHVQPTGiR5cubYelEJZVLMp2m8en6h5vUO5h4oBDdkx X-Received: by 2002:a17:906:c247:: with SMTP id bl7mr7745524ejb.288.1623965701007; Thu, 17 Jun 2021 14:35:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623965701; cv=none; d=google.com; s=arc-20160816; b=ao8BVII/sdtLivC/gzRf3KMHZ19uDchmXgGHst3W85AhqxbUDqv4D7mKiVwqcqcwQL F3U6LT4xPIypUTeJg/9H461/P5CO7d7Vw7VXQNoF/O8bd6lOrgJA1rAOhc49wS8uELj8 t391/unLmt4dJ0D5b+2DuUf/+caBYJp2UFhfLzuHmlxC7ojntWI8DFHw5pQT17wGOPIk kK/kIfZS/7xkzOf9VZR3XwVzC/9PjYS+cfRx6bzvT0aVT0Y7TXR8H7DQXwtXE7iQwJcU MBt6TvbCh1Sq9eNWV7l5AQSDP2U9z6PqKTv8qQmLHd2GgXiJuOIvB8NM8QjX9cthfVuP GJPQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=u4hzfs4C5s5996Anf36saILan2RNfe6VDAOXYGhmerw=; b=xKzk7qA7P0kNF+eCmJymTjqXFhtyMYe0fB3IBd6phUNHFq4ANxHRShuXFKFKArScYp HstNidFHT6KafF+p4DchZXrxoPjeNfZVPEZMncEERVzYk2PKSLXOSLabJoplUa2c4/ju wDBd75u/8VaQ8VtUYfcWsxjpjUob+Yw6frWGRKqzb1+YI+i/m+4COlIfF1QSm8sB2ibU ibqxMQaWuxBFMAyGVYGQFOdNwqli+++zkBI7vqIeIN1gXYXTyuhjr2X+EgOhj/XKkFb3 w/lZb94dnXcJMfjV1jyoNdwjfvt0RbNNMlJvorTCq7eZfRhDQ+cr207z0W9hEVDwO1sv AGbg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=sW5El4rA; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v13si7886584edl.474.2021.06.17.14.34.38; Thu, 17 Jun 2021 14:35:00 -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=@gmail.com header.s=20161025 header.b=sW5El4rA; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232823AbhFQVHF (ORCPT + 99 others); Thu, 17 Jun 2021 17:07:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39720 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231241AbhFQVHF (ORCPT ); Thu, 17 Jun 2021 17:07:05 -0400 Received: from mail-pj1-x1031.google.com (mail-pj1-x1031.google.com [IPv6:2607:f8b0:4864:20::1031]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 470D7C061574; Thu, 17 Jun 2021 14:04:56 -0700 (PDT) Received: by mail-pj1-x1031.google.com with SMTP id o10-20020a17090aac0ab029016e92770073so4604643pjq.5; Thu, 17 Jun 2021 14:04:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=u4hzfs4C5s5996Anf36saILan2RNfe6VDAOXYGhmerw=; b=sW5El4rAB4VJt4+UpL7pZ4nHnCEuLy/0zKmqefTmqCQE/QMuGoMGAn/NJLcKNdvwad 3Lpg/QV2UUqHDauDPZP4YiaEondU2tcgo5tPbJnkMy8QfunRxeQfedtRNqZG/8eet63v TpgkdcKp1v03LQMWtLLI9xz/Grq3fJVham7uVzcKmcIf2oso9oi5pwXQQ6ECjxYyYVdR 8KzGNx3ixWX91fbuT53UModfPZngvVbaAxD4hqxPjz+Xg896PtY53nGkdPd5n5PAHT+V A/Mzv8/TdDznzz38lnS+C2Jw2DybJnjOHEpF3PWcvPFP+v1+0pZS68Smcf8yEHNA2DIS e/Bw== 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:mime-version :content-transfer-encoding; bh=u4hzfs4C5s5996Anf36saILan2RNfe6VDAOXYGhmerw=; b=OKyIAtf3zQg992CPWU08hey/d65xy4++bqgT5cPsRUsTU5n2tm4Yq/1MfRvqXNTwqR vMvwoThUPSunoswSeWCneqy6kj/j8NchC1yLGeQJwQ2Kx4JbauvrKkTmXJ70yxX0G8Ue nRKzrXX1sC+vSAexVBo25hMC5+BcIITUQM/u6T3Cob/pSyBGGBmzG2lrJfCuxqrA+Fe2 baweFladKfGZlPD59XH6StTMg8Xw0orB7+wBbCAUvFwKI4tR6DQg5/jNGVATQH385uJ3 d414hESnWyeLwxLnyifsnxmPOWiu275I+7FfvV8SDUTKiYUc64LBj8TXwjYM/eUNCLXZ qVLQ== X-Gm-Message-State: AOAM530JNSsgjCGmr8rsUFL4ve4L/eg4lpMC8G/1K/6tvOB1vrgibEfs nGPh+fkMDcq24lgq9Ef3MRa0D+HU0DCN+c6K X-Received: by 2002:a17:90a:b64:: with SMTP id 91mr7117223pjq.24.1623963895701; Thu, 17 Jun 2021 14:04:55 -0700 (PDT) Received: from nuc10.amust.local (104.36.148.139.aurocloud.com. [104.36.148.139]) by smtp.gmail.com with ESMTPSA id r24sm8829324pjz.11.2021.06.17.14.04.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Jun 2021 14:04:55 -0700 (PDT) From: Rustam Kovhaev To: catalin.marinas@arm.com, corbet@lwn.net Cc: linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, Rustam Kovhaev Subject: [PATCH] docs: kmemleak: add more details about kmemleak usage Date: Thu, 17 Jun 2021 14:04:20 -0700 Message-Id: <20210617210420.392412-1-rkovhaev@gmail.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org a user may need to initiate a manual scan twice via debugfs before kmemleak reports an orphan object. this is mentioned in Testing section, let's mention this again in the Usage section for better visibility. Link: https://lore.kernel.org/lkml/YMpEtyUP0vuWo9HV@nuc10/ Signed-off-by: Rustam Kovhaev --- Documentation/dev-tools/kmemleak.rst | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Documentation/dev-tools/kmemleak.rst b/Documentation/dev-tools/kmemleak.rst index 1c935f41cd3a..512f78e6e4fb 100644 --- a/Documentation/dev-tools/kmemleak.rst +++ b/Documentation/dev-tools/kmemleak.rst @@ -38,6 +38,9 @@ Note that the orphan objects are listed in the order they were allocated and one object at the beginning of the list may cause other subsequent objects to be reported as orphan. +If you are triggering a manual memory scan, you might need to do it at least +twice before kmemleak reports an orphan object. + Memory scanning parameters can be modified at run-time by writing to the ``/sys/kernel/debug/kmemleak`` file. The following parameters are supported: @@ -235,7 +238,7 @@ enabled. Load the module and perform a scan with:: # modprobe kmemleak-test # echo scan > /sys/kernel/debug/kmemleak -Note that the you may not get results instantly or on the first scanning. When +Note that you may not get the results instantly or on the first scanning. When kmemleak gets results, it'll log ``kmemleak: new suspected memory leaks``. Then read the file to see then:: -- 2.30.2