Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp2449439rwr; Fri, 28 Apr 2023 10:25:47 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5vA7UIfG4PsI2Sr2bKAORqSC6J+1uBMT6vf7Z3JC4wK2/LHlkPnehCvE3Y8hfMLLH2mttH X-Received: by 2002:a05:6a21:6d8d:b0:f0:6d71:5f58 with SMTP id wl13-20020a056a216d8d00b000f06d715f58mr7571260pzb.50.1682702746724; Fri, 28 Apr 2023 10:25:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682702746; cv=none; d=google.com; s=arc-20160816; b=gCjyvBDn48vjuHz0WXoWWfY9K5/nwDsuf5bA/Cy3m7mfT886XIv3Hg6x6kOy/Oglwp qAk82wVNuCbvAmvtWmwXc6iJpjbLYfhexWyI/Qq5yZeA9en1XO+zuycE7lw7B796PR4U IhkxEL2V9mov03eUvlJ9GPQroCUChokOYNlnToUL78ivLWMgpX8oSOloBZgZlwF+dTeu ipQztkmlC903XE62uLh/wISJj2AhBc4o4JrmWt2DwwmiILsx5QogP9NqORI/eORxSkjy VwyTgQFeV0yUkTfBvtQQHRWBgRS1yXiQgLRs0P+wxm8jAIZ5H491XNC9XyDBx61+YBk/ fK8Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=3CyQYJ++ZNOJnZvjLd0UfnNAWafqInJr1/nTCn+wgvY=; b=aQJmvolPQDLTXTnCkeOUgBm0qYpdBKzAggN+I+xNzmN8JBNu0KRWRmfyv3/RPIWotF RiwS8En+88JRR0jTw+dnsQAsxpVkU6zitIUobykk0cDVoRmp4RRqHQSBnA9OjkZI0jc1 XvKxcngFuC1kl3zZuOCRjFwwMn1l4dmhDICesvFaKwtq7C/pqlPDE+TWEbwGmwtIggDP a30zy+Od5Icz435/jOKq2Wblpx/T2Pt5/hZOlptUgB/t7nJVuZCYY/L6fEtDL5RGI+CN ssbRD+i2ndoj8o/TUAPYoXSH1NfDDOSj8HmRvgTksIRkLSWDaOcb2jJOmYwZfH6fWU9a f2eQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id r20-20020a17090b051400b00232dd9ab146si2626626pjz.13.2023.04.28.10.25.35; Fri, 28 Apr 2023 10:25:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345594AbjD1RZP (ORCPT + 99 others); Fri, 28 Apr 2023 13:25:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55058 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345589AbjD1RZM (ORCPT ); Fri, 28 Apr 2023 13:25:12 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4E6A84497 for ; Fri, 28 Apr 2023 10:25:09 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id DC3EF644CE for ; Fri, 28 Apr 2023 17:25:08 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4F16BC4339B; Fri, 28 Apr 2023 17:25:07 +0000 (UTC) Date: Fri, 28 Apr 2023 18:25:04 +0100 From: Catalin Marinas To: Jim Cromie Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, Dmitry Vyukov Subject: Re: [PATCH 0/3] kmemleak report format changes Message-ID: References: <20230425222446.170486-1-jim.cromie@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230425222446.170486-1-jim.cromie@gmail.com> X-Spam-Status: No, score=-6.7 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_HI,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Apr 25, 2023 at 04:24:43PM -0600, Jim Cromie wrote: > If format changes are not /sys/** ABI violating, heres 3 minor ones: > > 1st strips "age " from output. This makes the output > idempotent; unchanging until a new leak is reported. > > 2nd adds the backtrace.checksum to the "backtrace:" line. This lets a > user see repeats without actually reading the whole backtrace. So now > the backtrace line looks like this: > > backtrace (ck 603070071): # also see below > > Q: should ck be spelled crc ? it feels more communicative. These all would make sense (and 'crc' sounds better) if they were done from the start. I know there are test scripts out there parsing the kmemleak sysfs file. I can't tell whether these changes would break them. Cc'ing Dmitry, I think syzbot was regularly checking kmemleak (not sure it still does). > NB: with ck exposed, it becomes possible to do a "selective clear", > something like: > > echo drop 603070071 > /sys/kernel/debug/kmemleak > > The 3rd patch takes __init off of kmemleak_test_init(). This fixes a > bare-pointer in the 2nd line of the backtrace below, which previously > looked like: > > [<00000000ef738764>] 0xffffffffc02350a2 > > NB: this happens still/again, after rmmod kmemleak-test. > > unreferenced object 0xffff888005d9ca40 (size 32): > comm "modprobe", pid 412, jiffies 4294703300 > hex dump (first 32 bytes): > 00 cd d9 05 80 88 ff ff 40 cf d9 05 80 88 ff ff ........@....... > 14 a7 c4 f6 7d f9 87 10 00 00 00 00 00 00 00 00 ....}........... > backtrace (ck 1354775490): > [<000000002c474f61>] kmalloc_trace+0x26/0x90 > [<00000000b26599c1>] kmemleak_test_init+0x58/0x2d0 [kmemleak_test] > [<0000000044d13990>] do_one_initcall+0x43/0x210 > [<00000000131bc505>] do_init_module+0x4a/0x210 > [<00000000b2902890>] __do_sys_finit_module+0x93/0xf0 > [<00000000673fdce2>] do_syscall_64+0x34/0x80 > [<00000000357a2d80>] entry_SYSCALL_64_after_hwframe+0x46/0xb0 -- Catalin