Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp2332136ybt; Sun, 21 Jun 2020 16:57:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzQ/SqgwrqB25iPHBLcekY4NFvMTn2+xDZ+/g1Dii3sLP5KJfBq8LQ+tRX+MEoAVqLAQHbk X-Received: by 2002:a17:907:9c6:: with SMTP id bx6mr8287039ejc.43.1592783859146; Sun, 21 Jun 2020 16:57:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592783859; cv=none; d=google.com; s=arc-20160816; b=cC/1SJP68F0DKajfRkJm8yK2zBvvgvX50d4NmInSacmvzd2azSeqGXqSdJa2LTRh2M zuiQ52E8OLHVbv1i126g0NzamKWV3nKQ8UmkaMvhUU+l6Sx6Uke3wbm0oggIiQYwlrmW 9I/YinYA3YcoWQcohz2CQiwkp2UjZnjPMVARZym6Z20hknEj2NMMBjq+SZjNzSVDvqvS kvtl7byMOUS2vRsiwePiSSrJ0E5BeyZyJZIk4+p4ae8H/ZwuO56fH2VLnJrnTk0+7Qtj xZehpwJKTU++iOBRstpnnvKi5ehFQlNgpFavljK4plV2qmjZR79LBBCa6Y1HCnyk2IJ4 Ygtw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:in-reply-to:cc:references:message-id :date:subject:mime-version:from:content-transfer-encoding :dkim-signature; bh=29S5n5cFCFjdw48F8E5lF+4uXMo0yMP9nKy7w8wvQ+Y=; b=Jp+Ya+Ytw9bR8Wk5vP+XAbRHKsBu8/uGNjLFPpfQ5MR0a6se28EfVoXVbMeFPrTReZ /8OXP/VGNnYRGC+/aiFVDgkZNlzIM9OaWxHwzhENBOdH/QQJvfO8EsOVU/a3azcRmukW NZX6U55h19CMGmsV+rCfSQut8d/XYtDcZdSgyxXmTolOLlgMk0wwxlZHXDezWvoCBZ+S U/Lt5nDYp3VLU3tePOLuOa3/i0IuEU24XGcqPZ5XibYtChHkgSxAal3jO7ISk13msqd/ nvlr0/xp1D8Wyby0zeTBokq3cTLyjwxXLL72Hj83lVvOfVl0MjAu/JXOXgyGGifG6Umb DRPQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lca.pw header.s=google header.b=f5VuQDlb; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id cm27si8227147edb.248.2020.06.21.16.57.12; Sun, 21 Jun 2020 16:57: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=@lca.pw header.s=google header.b=f5VuQDlb; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730940AbgFUXx1 (ORCPT + 99 others); Sun, 21 Jun 2020 19:53:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35226 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726485AbgFUXx0 (ORCPT ); Sun, 21 Jun 2020 19:53:26 -0400 Received: from mail-qt1-x844.google.com (mail-qt1-x844.google.com [IPv6:2607:f8b0:4864:20::844]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8DB17C061794 for ; Sun, 21 Jun 2020 16:53:25 -0700 (PDT) Received: by mail-qt1-x844.google.com with SMTP id o38so2750773qtf.6 for ; Sun, 21 Jun 2020 16:53:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lca.pw; s=google; h=content-transfer-encoding:from:mime-version:subject:date:message-id :references:cc:in-reply-to:to; bh=29S5n5cFCFjdw48F8E5lF+4uXMo0yMP9nKy7w8wvQ+Y=; b=f5VuQDlbvKj8rUOoozDjinBJr+Me79NYFGO4f/Zx/YJn+3axRDQMxfqJ0hrPEi/UeH ZQgIQ+v8JOy91rUNwUz/MZM+M+MxW8rcJrafYy0hKCmeTLK23oFsTJ+O9Icu2Mr/PFYw B+bw+XzBoqsBn875sIKpZMJncCPv6hQvFKfpEnkNkc6zByGZY3WxrSZE0FQJgM8lg64S yOm1DGSkSfgm7dyhBvXdk/GQU0YSxRJ5xQjsju1ZjGz3hdwb0oaLphQYcK3Tf3AsKkzy lbGdGaVkCueiQjzXZdFNY0m7P2BmJRlAsdXhsgEENRnj/wUklIetaqBwVKd6xzfti5hs HVDQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:content-transfer-encoding:from:mime-version :subject:date:message-id:references:cc:in-reply-to:to; bh=29S5n5cFCFjdw48F8E5lF+4uXMo0yMP9nKy7w8wvQ+Y=; b=YsYMgiGOjYstjebugMXLbl398PxW6jVngI9+Och0Vf/70OKECPTsmKieV9Z+g+fELQ 6AUMTmopTh4Ut3l0r3ZbwKqu+Euol6BtbgJhNaREfP3hdbX18P+LT+V2A+mpGW0Icohc Qk9CXR+pLPWbG+0bMdF9IVLFWypsnxek2lBR83+3AYjhE5kcvKUKddO1Jl1Hka3O1QKe OHQBIOY7c3Vv+MQ1LL9NYjyvPmGSN5q8zNvnXvEHJCRXXESVqeLIdbOxv7aPZRiz2zO3 BT39ENzfX69qsCmUxm0rpMWZEL/3CoVwr3fQjJuwurzvc0clrIy2hQpw+PhS3n0Hb3ez bbXw== X-Gm-Message-State: AOAM532j1/ona+uJ4D5WQ44NUqVUIsVFRpGUXaI8/yDhYjP7VuzEtUOy 3e+72axk+/vsvYb70+W+NpxZFQ== X-Received: by 2002:ac8:2914:: with SMTP id y20mr14057953qty.30.1592783604838; Sun, 21 Jun 2020 16:53:24 -0700 (PDT) Received: from [192.168.1.183] (pool-71-184-117-43.bstnma.fios.verizon.net. [71.184.117.43]) by smtp.gmail.com with ESMTPSA id b4sm13161136qtp.63.2020.06.21.16.53.24 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 21 Jun 2020 16:53:24 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable From: Qian Cai Mime-Version: 1.0 (1.0) Subject: Re: [PATCH v6 00/19] The new cgroup slab memory controller Date: Sun, 21 Jun 2020 19:53:23 -0400 Message-Id: <7DEA68BC-3B9A-46FA-8103-AE6B72324591@lca.pw> References: <20200621233429.GA293939@carbon.DHCP.thefacebook.com> Cc: Andrew Morton , Christoph Lameter , Johannes Weiner , Michal Hocko , Shakeel Butt , linux-mm@kvack.org, Vlastimil Babka , kernel-team@fb.com, linux-kernel@vger.kernel.org, catalin.marinas@arm.com In-Reply-To: <20200621233429.GA293939@carbon.DHCP.thefacebook.com> To: Roman Gushchin X-Mailer: iPhone Mail (17F80) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > On Jun 21, 2020, at 7:34 PM, Roman Gushchin wrote: >=20 > My wild guess is that kmemleak is getting confused by modifying the lowest= > bit of page->mem_cgroup/obhj_cgroups pointer: >=20 > struct page { > ... > union { > struct mem_cgroup *mem_cgroup; > struct obj_cgroup **obj_cgroups; > }; > ... > } >=20 > We're using the lowest bit to distinguish between a "normal" mem_cgroup > pointer and a vector of obj_cgroup pointers. >=20 > This pointer to obj_cgroup vector is saved only here, so if we're modifyin= g > the address, I guess it's what makes kmemleak think that there is a leak. >=20 > Or do you have a real leak? The point is that we can=E2=80=99t have a patchset in the current form to to= tally render kmemleak useless with so many even false positives. Anyway, this is rather easy to reproduce where I am able to reproduce on mul= tiple bare-metal machines by just booting it. # echo scan > /sys/kernel/debug/kmemleak # cat /sys/kernel/debug/kmemleak=