Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp741103imw; Thu, 14 Jul 2022 10:00:15 -0700 (PDT) X-Google-Smtp-Source: AGRyM1uy9IIc8MLSEKSXkAlT0Gbc4XvLboqdMgWdOTbS9S/Dxvj0sJR/OQ+L1ucjQ3OzX5ioZMGz X-Received: by 2002:a05:6402:3581:b0:43a:d66b:99b5 with SMTP id y1-20020a056402358100b0043ad66b99b5mr13580411edc.375.1657818015605; Thu, 14 Jul 2022 10:00:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657818015; cv=none; d=google.com; s=arc-20160816; b=qn9Cu/+OdXke0yeTRyccN9jNhju88DoqvweQXZYWYcQKGGD54jfkdqnMvxRDoRcnYy m6Ndr9nlnEpXJZp4Tyg5lHY/ZAAh6cNZ3+knLFcDZLNf8YFu44E+i+jPgzuQPXBGW8/Y lPWtC7ktoiHPPztmypImXvcU49pRdC6d39b/EZV6Lvz6wnLJ3nrXBquCk2R9DvDrgSjB d+/d8kdbCYKI20RP801h6FQuv7lOLiaHZHVg3jpfhOsCgNI3MG4eGb+/Eqaz5M0EbMzw k1BZ9K4QsDUUW5O/Xg18x5iMIgzx7bo+9pJwwPGe3pp0h79IQP2fPTEx+lkFid2jU6gq scDw== 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:dkim-signature; bh=88JOhkNUSoMMoClhidAsgxns/gETlUPh9cr1gTnulbI=; b=QxoXmy7AikTEVGPCuWpLqqm4irndxJpfJnkJf3WlnvhVKp+1qTJJDMZSUgJ74z6Naz 7sm0YtMylt/XpwysKDj7S/tb4hghfmbEXMhvSflefvDFkx2r6prlcPtAhhxaOxu+9mCO C33PBYJke2IcWIO+IRMTLnz6PUhgRP59UBE1vBTzl/qdDZrvmwHhu81ryAZq+JLvW2vM kEluBVwxCdvFj7+EeFLc9Z/DyMBQd89+G7zm0N3ipk6vLA9ZhQuLPCjTEeTPhSLLC1px 902INV0vhKXCF2vw6JIilijhFqKTSj14+suasCvZo59LTUkpixCsnrbMl2XDrdJ604ke pIvg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b="e+BbfDQ/"; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o6-20020a170906974600b0072b409233a7si2818993ejy.447.2022.07.14.09.59.49; Thu, 14 Jul 2022 10:00:15 -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; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b="e+BbfDQ/"; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238859AbiGNQ1m (ORCPT + 99 others); Thu, 14 Jul 2022 12:27:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53558 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230117AbiGNQ1k (ORCPT ); Thu, 14 Jul 2022 12:27:40 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 98AD561B3C for ; Thu, 14 Jul 2022 09:27:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=88JOhkNUSoMMoClhidAsgxns/gETlUPh9cr1gTnulbI=; b=e+BbfDQ//3J55jajPromAgti6W BqlxJFKeEV+8i1sjNKbt1rfI8OSpFIvgkcAjaBD53rFXshCzwZSIvneSxfrgJo1FhFIl5EnHhsExc eAxXfcrbqXBFDz6PE/5X0zY9iNfMT8OtrH/RlgQji1uWIn0pM/LhzOj53WW4oURiWfxTWUHnUiQzn jPa5x0EWTxjTgpIX98+ga8xHPn+A6vTvybHjyGISeCXEADrnAxJtYlq2ecrLX9X9Y4d9jk0rSsHWy xZ1AyhX6nbOxQ3+jGHPAz92qnxBSe++LpyVqZ7R8UBcEG/tONUVP2YgBlBazUKGPWPL4UFP2p24OS 9OUB0Mgw==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1oC1gW-009VsB-Si; Thu, 14 Jul 2022 16:27:28 +0000 Date: Thu, 14 Jul 2022 17:27:28 +0100 From: Matthew Wilcox To: Dmitry Vyukov Cc: Andrew Morton , syzbot , linux-kernel@vger.kernel.org, linux-mm@kvack.org, syzkaller-bugs@googlegroups.com, Zach O'Keefe , Yang Shi , Liam Howlett Subject: Re: [syzbot] memory leak in xas_create Message-ID: References: <000000000000eb2d6c05e35a0d73@google.com> <20220711133808.d86400ce9960febcb0fd537b@linux-foundation.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE,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, Jul 12, 2022 at 03:29:29PM +0200, Dmitry Vyukov wrote: > Then I think it's still possible that this is a KMEMLEAK false > positive. IIRC it may have some false positives since it does not do > full stop-the-world before scanning memory/registers. syzkaller tries > to circumvent this by doing multiple scans with some delays, but it > does not give 100% guarantee. > And I am assuming this code does not try to hide pointers by storing > something in low/high bits, etc. Oh, I meant to answer this. The XArray does set bit 1 of the pointer when it's stored in the tree. However, this shouldn't affect kmemleak (I would think) because it looks like a pointer to the third byte of the allocation, so the allocation is still referenced, even if the first byte of the allocation isn't referenced. Also, I would expect kmemleak to report bugs all over if this were the problem, because every node no matter how it's allocated gets its bit 1 set.