From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5ADA3C43334 for ; Thu, 14 Jul 2022 16:27:41 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id B850C9401B1; Thu, 14 Jul 2022 12:27:40 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id B0D859401A5; Thu, 14 Jul 2022 12:27:40 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 9FBAC9401B1; Thu, 14 Jul 2022 12:27:40 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id 8D9DD9401A5 for ; Thu, 14 Jul 2022 12:27:40 -0400 (EDT) Received: from smtpin13.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id 584E820B92 for ; Thu, 14 Jul 2022 16:27:40 +0000 (UTC) X-FDA: 79686236280.13.04A13C0 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf19.hostedemail.com (Postfix) with ESMTP id 136AE1A007F for ; Thu, 14 Jul 2022 16:27:37 +0000 (UTC) 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: ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1657816059; a=rsa-sha256; cv=none; b=qlcOwiNBb716B6faRlSyZky4hAEcwWwnLOMeK3OxwICC1xQPwp+q4jKJuYQVxAZym9XK5m UR94L09Nw8tF8jaD56wJONcEwzCSgsvLyjqEiGbKPL4WDHv+4jG+JYIvOmRbT8nEacd+S1 vZNs/Ss3k/zv+HVcM7DyHeFMsE0kpjw= ARC-Authentication-Results: i=1; imf19.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b="e+BbfDQ/"; dmarc=none; spf=none (imf19.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1657816059; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=88JOhkNUSoMMoClhidAsgxns/gETlUPh9cr1gTnulbI=; b=hoKRFnfXLI5hi465dAszTvPgZ32SS5Ieqg6X9qOy8XtT1xVxKvCxzXiLI6sRJoySCENTP9 D8e0QteBysMoGtBW6m0pOS/ruiYarLpVxjozoK1K9RRWZge5VwXaOJPYgeT4bheqvK+yz2 pqn6sdxeUSWzdW9o8l/PGPuVyhAr88M= X-Rspam-User: Authentication-Results: imf19.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b="e+BbfDQ/"; dmarc=none; spf=none (imf19.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org X-Stat-Signature: mimy4jao49ttdd5qbu6nybwayn4fesb9 X-Rspamd-Queue-Id: 136AE1A007F X-Rspamd-Server: rspam08 X-HE-Tag: 1657816057-743670 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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.