Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp4401530imu; Mon, 14 Jan 2019 22:30:25 -0800 (PST) X-Google-Smtp-Source: ALg8bN40jQYm6QOY9yAi7cNwpsekz7GsicgZql51c4shhOqz8fUqCIA+7z7uTTf3VDEfC/0ucgUv X-Received: by 2002:a63:a064:: with SMTP id u36mr2375541pgn.145.1547533825419; Mon, 14 Jan 2019 22:30:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547533825; cv=none; d=google.com; s=arc-20160816; b=nQKt+J8f9Mxqsl0nM2Q0qzgUXt65yQNdKkHgMGUjUHlp21TahmGKQaov/i5CE6OiWF N8dkqTW4KbDZ1DdcoPRu28HH7vHQchXL1PVeiD5ShyZWi5wt+gvSBZkR+GJ/H/FOJvYz FbZZ4JLRsN2cu6SeMgwkjsT2MyzbnDmtQ09Y8tXZbwL0kBnLmCwvVOouRbrmkhtu8IGX 7vFdi3ngr7XSa0acZMLqXlL7E0e4Aq0fqgJrBB+K3xGA2lSgl6OrJebd8IXULoReXwIb 8ehrqHl0ypEs3bFCWE4XJIhOL+vQeM85yOfnKQmIhmn2BTBY2KCFbSdbwy8kD8mu78gM A17Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=0+BFmS8gMTsuE/WiAl8/AvypSE7lqHoSKA/VjxHFrGA=; b=sQYWJeFrP6AwxxmCjTCe2L6p9mnlFuBiUns/+7xSMGNp2xGxGar4lB55JpBnVIYKJD dGlA2XU1M+I7wUaYDS3b1knpDlq9Pyd32PThF0zvwDt2QAdCqhLUiphBhELuhaoYBaI6 ugJmMNkbIEC49IW1Joys8C85mtL/RwusJUvhLHTZEa5p0dY4wu72qQecE5FV62TkMYEA quTy3WWdMrnQ+wpmrP8Bk5Yc4OCMjQ5bIveW1AjP7cUPvaFzrBmXbo4EDUvVphfEjJvc kertyQnJO94Olo7gGa2gQl1KCiQTp5EqQO4VsfAPWaTbW+gCvU9bpABJjmGI52AlS1Ro qDJA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lca.pw header.s=google header.b=I8RQ8Dkz; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j39si2456060plb.272.2019.01.14.22.30.10; Mon, 14 Jan 2019 22:30:25 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@lca.pw header.s=google header.b=I8RQ8Dkz; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727934AbfAOFbY (ORCPT + 99 others); Tue, 15 Jan 2019 00:31:24 -0500 Received: from mail-qt1-f193.google.com ([209.85.160.193]:35971 "EHLO mail-qt1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725929AbfAOFbX (ORCPT ); Tue, 15 Jan 2019 00:31:23 -0500 Received: by mail-qt1-f193.google.com with SMTP id t13so1765936qtn.3 for ; Mon, 14 Jan 2019 21:31:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lca.pw; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=0+BFmS8gMTsuE/WiAl8/AvypSE7lqHoSKA/VjxHFrGA=; b=I8RQ8DkzOBs8WNHOupnmRbipu7H7HC+8ySov3sBfxqkuY3O/rCK3zJ58xGr+U96d6F pyhK6YG3E2qTSOKCQR8EvsKO7eNtBsUtXvslpDghDa6r0AoOQRAdOaDVTrF2jdBGO9n/ q6Ucbvb9h/vIKMm2zsebkGWROjfkIUXXIlvE07g5lEmXR9Vgb6KwMJXQ95BdRzCUa+uw 0u/CwCXb27C7UHTPl3f/CAAdciWluz8/41sRl0+PiKfeUYn3k+3CC/jiOv+VwMSFGxM3 Lyt9sGOXIzEuYAWrJ+9KQwSozXfuglqfkN2hN+OOSlMV4kIl24UNv11nbPSLPja7UQW+ xnKA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=0+BFmS8gMTsuE/WiAl8/AvypSE7lqHoSKA/VjxHFrGA=; b=mudxQmjeKxxtPKzpDo2etnfJrSdmSTThNhkuhySrnVTQ4U/uAPm6sgKKx2car/6+4w YV4FBv57JB7xN6UhTx3AKoBd/8YGqrMJSSvFLeM5Wq57OGouVZ9RPdCjvQFL5sp5DR8c ewehKUnGag2FtosdCaHOSwp2EMxhTTIFccvmko7M1Y20vw5Z8BFB+mNVxkaSETk81yA3 QsrapCOa4zpE4oGAiWYafYv06O7J9soZbqbB1SEmQHztG9xYmNvC7ZsOsVl3y5t1ynkg pcLXeP/3RKx8nARSrhCMGAWoOmSiRXvaW3keYWdERMbQy+BEykvxCXqJ4hIa6sF710ws Wygw== X-Gm-Message-State: AJcUukdP6xDwVLiJkc89KOk5fEly9C16UNVUvnC6N44dHqQMI+jOaD/E g/12ElVOIxx0A5BNoIMDWBqt5L1B2R5LXg== X-Received: by 2002:ac8:254c:: with SMTP id 12mr1532407qtn.88.1547530282219; Mon, 14 Jan 2019 21:31:22 -0800 (PST) Received: from ovpn-120-55.rdu2.redhat.com (pool-71-184-117-43.bstnma.fios.verizon.net. [71.184.117.43]) by smtp.gmail.com with ESMTPSA id x199sm30581809qkb.39.2019.01.14.21.31.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 14 Jan 2019 21:31:21 -0800 (PST) Subject: Re: [PATCH v2] rbtree: fix the red root To: Esme , "dgilbert@interlog.com" Cc: David Lechner , Michel Lespinasse , Andrew Morton , "jejb@linux.ibm.com" , "martin.petersen@oracle.com" , "joeypabalinas@gmail.com" , linux-mm , LKML References: <20190111181600.GJ6310@bombadil.infradead.org> <20190111205843.25761-1-cai@lca.pw> <864d6b85-3336-4040-7c95-7d9615873777@lechnology.com> <8v11ZOLyufY7NLAHDFApGwXOO_wGjVHtsbw1eiZ__YvI9EZCDe_4FNmlp0E-39lnzGQHhHAczQ6Q6lQPzVU2V6krtkblM8IFwIXPHZCuqGE=@protonmail.ch> From: Qian Cai Message-ID: Date: Tue, 15 Jan 2019 00:31:20 -0500 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:60.0) Gecko/20100101 Thunderbird/60.3.3 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > [ 114.913404] Padding 000000006913c65d: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ > [ 114.915437] Padding 000000002d53f25c: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ > [ 114.917390] Padding 0000000078f7d621: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ > [ 114.919402] Padding 0000000063547658: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ > [ 114.921414] Padding 000000001a301f4e: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ > [ 114.923364] Padding 0000000046589d24: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ > [ 114.925340] Padding 0000000008fb13da: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ > [ 114.927291] Padding 00000000ae5cc298: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ > [ 114.929239] Padding 00000000d49cc239: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ > [ 114.931177] Padding 00000000d66ad6f5: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ > [ 114.933110] Padding 00000000069ad671: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ > [ 114.934986] Padding 00000000ffaf648c: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ > [ 114.936895] Padding 00000000c96d1b58: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ > [ 114.938848] Padding 00000000768e4920: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ > [ 114.940965] Padding 000000000d06b43c: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ > [ 114.942890] Padding 00000000af5ae9fa: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ > [ 114.944790] Padding 000000006b526f1e: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ > [ 114.946727] Padding 000000009c8dffe3: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ Another testing angle, It might be something is doing __GFP_ZERO and overwriting those slabs. This also matched the red root corruption, since RB_RED is bit 0. One thing to try is to enable page_owner=on in the command-line, and then obtain sorted_page_owner.txt before and after running the reproducer. $ cd tools/vm $ make page_owner_sort $ cat /sys/kernel/debug/page_owner > page_owner_full.txt $ grep -v ^PFN page_owner_full.txt > page_owner.txt $ ./page_owner_sort page_owner.txt sorted_page_owner.txt