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 93C15E68958 for ; Thu, 31 Oct 2024 08:02:55 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 2B4F36B0088; Thu, 31 Oct 2024 04:02:55 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 2655E6B0089; Thu, 31 Oct 2024 04:02:55 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 12D6E6B008A; Thu, 31 Oct 2024 04:02:55 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id E648E6B0088 for ; Thu, 31 Oct 2024 04:02:54 -0400 (EDT) Received: from smtpin26.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id 9723A1C70BA for ; Thu, 31 Oct 2024 08:02:54 +0000 (UTC) X-FDA: 82733155428.26.40B3447 Received: from mail-ej1-f45.google.com (mail-ej1-f45.google.com [209.85.218.45]) by imf19.hostedemail.com (Postfix) with ESMTP id 251D91A0029 for ; Thu, 31 Oct 2024 08:02:18 +0000 (UTC) Authentication-Results: imf19.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=H55ZJurY; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (imf19.hostedemail.com: domain of richard.weiyang@gmail.com designates 209.85.218.45 as permitted sender) smtp.mailfrom=richard.weiyang@gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1730361611; h=from:from:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=gojO0adepHm1Ir/wLfnfDzYJQQydnPMhMYBwE/N2lQ4=; b=tFcUNUG7YRJlMrBTLGQtL0X4Mf7L7/cu+E8zPNo1fOTWNTkse0jqZ5WVTHd1APlatbGHP0 wMjRVsTTA/D3Cs1dXRC2/H3VPEf+95WQtciKYNjM01CQtjh7+juYGTM7sQfKFAavf8YAxx untgr7OCpz7XCKYFUgzQrm1EdiXP3XE= ARC-Authentication-Results: i=1; imf19.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=H55ZJurY; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (imf19.hostedemail.com: domain of richard.weiyang@gmail.com designates 209.85.218.45 as permitted sender) smtp.mailfrom=richard.weiyang@gmail.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1730361611; a=rsa-sha256; cv=none; b=iMUlYX0QY91QCuO1/4NNMTrp7NGYlBCy76bZ8uu/8u+O2OmKhq+1CFENnT9oovMXrk5NWO VenR02vhaPcnBGP7ongmcPz4l/hOlqsUi8Gpp40tzlF1vkda/H6N+6HdgKEgkMYw+oWEoc 143RBate0z1nN1r3RfPoB8rrhEQyF7Q= Received: by mail-ej1-f45.google.com with SMTP id a640c23a62f3a-a9a68480164so81606066b.3 for ; Thu, 31 Oct 2024 01:02:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1730361771; x=1730966571; darn=kvack.org; h=user-agent:in-reply-to:content-disposition:mime-version:references :reply-to:message-id:subject:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=gojO0adepHm1Ir/wLfnfDzYJQQydnPMhMYBwE/N2lQ4=; b=H55ZJurYHLxO1YE6r3/y9dgqxdruaKVtBOVOlVeOw/Yf/BGWejlwc4yAIr0Ns0Gfww RwjuS5Cr8w0cwrNvXTbMgvvheKZaFrlbuP3+tePn3vjc+Od1WPgneYzX6fw6mYYkdTp+ qmUJm++vLLXPZyCVWe2uZ/ylKOQQATEkMkWngNg/tV+ujEtynXpz3H2k/c8GeEdUeWRP 6/ov6WLiStqPXxxaITtaIm0zDoGYD9JSIqfHU/xCQVJohY2UErDZzgGA9BE0Pd3BXCea xwFVuTu1Ty9Ru0iExKTTAgik4AYuVjmcRDVPwJAHO8UcfNMQGd+v6wB+v/bjz6ziVUdh FhWA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730361771; x=1730966571; h=user-agent:in-reply-to:content-disposition:mime-version:references :reply-to:message-id:subject:to:from:date:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=gojO0adepHm1Ir/wLfnfDzYJQQydnPMhMYBwE/N2lQ4=; b=Mu1T5iy7JHHfOVsh6eLCPi38HcmdGHEeba0z2tFh4oTv4w013fhPJTIXqDSjJG4Fve ksc+HomwoYm1bvW9D+vxl6ZFLYmy68e94SCfwijdFfC/fq3w4rSEqc6gtkBsPWB8Zsps aOD4L3Xv7CyUQD1dyRisfDhE8bhI0SqRk9sCx98xGJ4cuEmXYdrrM7TScfa9ygk8Clml 8gocEIbkF9DWSc6zErTK4ZcBqgJ/zwbwkdNJYmaJ9EMNWHjonvXkbnmaPdoniKTEX9pE pSnzkOY+Sp+IudoP/C/hsCBL9yQ9vwqMPAx3mJP5EqH2y283wlONND3xkZub9cx/IOmC X20g== X-Forwarded-Encrypted: i=1; AJvYcCWCCU3cMahzOI2z3CV+pOxMkPDx61jn7RtmH4DZRfrpm8fTOJSQpx5kw942q62uAgFya9LKk8Okww==@kvack.org X-Gm-Message-State: AOJu0YzaTVSkOPylewCE2w3hwekn1+Sor12/piYEZ8dreBF47WwF5ibk 7+I/01Q0mkZKPmSqiXyykPo7XlD3HCVarzGIC6U8+oHz2MAt56WigloHbA== X-Google-Smtp-Source: AGHT+IEqjxnKYvzFLtpzha9VIoPyybx6IGmPFUEtOUGq3i8HjbYCsSc3VzaHlWEC8F9O5BFpKCD61A== X-Received: by 2002:a17:907:1c22:b0:a99:f1aa:a71f with SMTP id a640c23a62f3a-a9de5c90d49mr1885742766b.11.1730361769642; Thu, 31 Oct 2024 01:02:49 -0700 (PDT) Received: from localhost ([185.92.221.13]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a9e565df901sm38165966b.117.2024.10.31.01.02.48 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 31 Oct 2024 01:02:48 -0700 (PDT) Date: Thu, 31 Oct 2024 08:02:48 +0000 From: Wei Yang To: "Liam R. Howlett" , Wei Yang , kernel test robot , akpm@linux-foundation.org, oe-kbuild-all@lists.linux.dev, maple-tree@lists.infradead.org, linux-mm@kvack.org, Sidhartha Kumar , Lorenzo Stoakes Subject: Re: [PATCH v4 5/5] maple_tree: add a test checking storing null Message-ID: <20241031080248.7bd5iy52wenptsp4@master> Reply-To: Wei Yang References: <20241019023716.4516-6-richard.weiyang@gmail.com> <202410230105.UApdwd9S-lkp@intel.com> <20241022233247.htf7diduw2ojce2p@master> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20170113 (1.7.2) X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: 251D91A0029 X-Stat-Signature: 37nj45usdiyc8bzowxp1w9oywz5xx5m8 X-Rspam-User: X-HE-Tag: 1730361738-731942 X-HE-Meta: U2FsdGVkX19aGtSgl8mdVvpB6VtRkmRIk2l+SbT9XNMy2hLruAW0My5kEUloprhxD8cdZphPzaXV2z5aWehglD5+97mHJC6SaG6gqGCLnln//zqxes0DM0gS8h6abnqBGeztHtdgRR1pTi/9D2s8JlSszN6ngWMEn/4RwMiUJqeqiaUmmw2gPMqNmF46j131qZvI1ukAp6vbcN2KFEP7Xa8RHxj2bFgCIe+igLWih5+IMxFrL15JueAH7Dj8rIJsudTH5/Y9jzDx4d7J7MtRxfwclQV93eyVrXNZyVfm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N+lqEuo+WV/ID3lwngqdHNRt/jnXHbmq8PNz5QZVhYk8Lecx7uYVcQHiLU7cw1FZeyZ2EvuoyDISqnvc687bWXj9F3bzISn+4Kp4CO28eMwIhsBlHZNwq+gxH9vgPxSQN01srevHBzMIv7MedgtfCL2GgQXCNZO13V3dkdUu94wMhRLVaa046/heRgkeyNacwBhfaHEuvrKWxOucniQhJ4ghUu8B1hIG1yZKH0sBL7edz9lqNq09HR93b3XEvsjnN88aJHFzAXdTNkAP+OfhGSbprWtF8ie4LtwmbGPpBkAjfY2U+6hiLGvbxa6CbgxNBgaPCgFuWGGODOXMjARgCtcRP9dJtK6wxcsgxBG46fOZDyUrkhYTD80ISQMbudQQAkHOx6T57dFjYuCi+ZCbol3jqsk+DFh8ENFvcpcJHWQ0mi7Ww5eaBjO4cCb8DpEMUwZUizOtmr6BR3/uXmEJbhkLiZblVA== 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: List-Subscribe: List-Unsubscribe: On Tue, Oct 29, 2024 at 11:29:39AM -0400, Liam R. Howlett wrote: >* Wei Yang [241022 19:32]: >> On Wed, Oct 23, 2024 at 01:37:50AM +0800, kernel test robot wrote: >> >Hi Wei, >> > >> >kernel test robot noticed the following build warnings: >> > >> >[auto build test WARNING on akpm-mm/mm-nonmm-unstable] >> >[also build test WARNING on akpm-mm/mm-everything linus/master v6.12-rc4 next-20241022] >> >[If your patch is applied to the wrong git tree, kindly drop us a note. >> >And when submitting patch, we suggest to use '--base' as documented in >> >https://git-scm.com/docs/git-format-patch#_base_tree_information] >> > >> >url: https://github.com/intel-lab-lkp/linux/commits/Wei-Yang/maple_tree-print-empty-for-an-empty-tree-on-mt_dump/20241019-103832 >> >base: https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-nonmm-unstable >> >patch link: https://lore.kernel.org/r/20241019023716.4516-6-richard.weiyang%40gmail.com >> >patch subject: [PATCH v4 5/5] maple_tree: add a test checking storing null >> >config: x86_64-randconfig-123-20241022 (https://download.01.org/0day-ci/archive/20241023/202410230105.UApdwd9S-lkp@intel.com/config) >> >compiler: clang version 18.1.8 (https://github.com/llvm/llvm-project 3b5b5c1ec4a3095ab096dd780e84d7ab81f3d7ff) >> >reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241023/202410230105.UApdwd9S-lkp@intel.com/reproduce) >> > >> >If you fix the issue in a separate patch/commit (i.e. not just a new version of >> >the same patch/commit), kindly add following tags >> >| Reported-by: kernel test robot >> >| Closes: https://lore.kernel.org/oe-kbuild-all/202410230105.UApdwd9S-lkp@intel.com/ >> > >> >sparse warnings: (new ones prefixed by >>) >> >>> lib/test_maple_tree.c:1456:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const *entry @@ got void [noderef] __rcu *ma_root @@ >> > lib/test_maple_tree.c:1456:9: sparse: expected void const *entry >> > lib/test_maple_tree.c:1456:9: sparse: got void [noderef] __rcu *ma_root >> >>> lib/test_maple_tree.c:1456:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const *entry @@ got void [noderef] __rcu *ma_root @@ >> > lib/test_maple_tree.c:1456:9: sparse: expected void const *entry >> > lib/test_maple_tree.c:1456:9: sparse: got void [noderef] __rcu *ma_root >> > lib/test_maple_tree.c:1468:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const *entry @@ got void [noderef] __rcu *ma_root @@ >> > lib/test_maple_tree.c:1468:9: sparse: expected void const *entry >> > lib/test_maple_tree.c:1468:9: sparse: got void [noderef] __rcu *ma_root >> > lib/test_maple_tree.c:1468:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const *entry @@ got void [noderef] __rcu *ma_root @@ >> > lib/test_maple_tree.c:1468:9: sparse: expected void const *entry >> > lib/test_maple_tree.c:1468:9: sparse: got void [noderef] __rcu *ma_root >> > >> >vim +1456 lib/test_maple_tree.c >> > >> > 1389 >> > 1390 static noinline void __init check_store_null(struct maple_tree *mt) >> > 1391 { >> > 1392 MA_STATE(mas, mt, 0, ULONG_MAX); >> > 1393 >> > 1394 /* >> > 1395 * Store NULL at range [0, ULONG_MAX] to an empty tree should result >> > 1396 * in an empty tree >> > 1397 */ >> > 1398 mt_init_flags(mt, MT_FLAGS_ALLOC_RANGE); >> > 1399 mas_lock(&mas); >> > 1400 mas_store_gfp(&mas, NULL, GFP_KERNEL); >> > 1401 MT_BUG_ON(mt, !mtree_empty(mt)); >> > 1402 mas_unlock(&mas); >> > 1403 mtree_destroy(mt); >> > 1404 >> > 1405 /* >> > 1406 * Store NULL at any range to an empty tree should result in an empty >> > 1407 * tree >> > 1408 */ >> > 1409 mt_init_flags(mt, MT_FLAGS_ALLOC_RANGE); >> > 1410 mas_lock(&mas); >> > 1411 mas_set_range(&mas, 3, 10); >> > 1412 mas_store_gfp(&mas, NULL, GFP_KERNEL); >> > 1413 MT_BUG_ON(mt, !mtree_empty(mt)); >> > 1414 mas_unlock(&mas); >> > 1415 mtree_destroy(mt); >> > 1416 >> > 1417 /* >> > 1418 * Store NULL at range [0, ULONG_MAX] to a single entry tree should >> > 1419 * result in an empty tree >> > 1420 */ >> > 1421 mt_init_flags(mt, MT_FLAGS_ALLOC_RANGE); >> > 1422 mas_lock(&mas); >> > 1423 mas_set(&mas, 0); >> > 1424 mas_store_gfp(&mas, &mas, GFP_KERNEL); >> > 1425 mas_set_range(&mas, 0, ULONG_MAX); >> > 1426 mas_store_gfp(&mas, NULL, GFP_KERNEL); >> > 1427 MT_BUG_ON(mt, !mtree_empty(mt)); >> > 1428 mas_unlock(&mas); >> > 1429 mtree_destroy(mt); >> > 1430 >> > 1431 /* >> > 1432 * Store NULL at range [0, n] to a single entry tree should >> > 1433 * result in an empty tree >> > 1434 */ >> > 1435 mt_init_flags(mt, MT_FLAGS_ALLOC_RANGE); >> > 1436 mas_lock(&mas); >> > 1437 mas_set(&mas, 0); >> > 1438 mas_store_gfp(&mas, &mas, GFP_KERNEL); >> > 1439 mas_set_range(&mas, 0, 5); >> > 1440 mas_store_gfp(&mas, NULL, GFP_KERNEL); >> > 1441 MT_BUG_ON(mt, !mtree_empty(mt)); >> > 1442 mas_unlock(&mas); >> > 1443 mtree_destroy(mt); >> > 1444 >> > 1445 /* >> > 1446 * Store NULL at range [m, n] where m > 0 to a single entry tree >> > 1447 * should still be a single entry tree >> > 1448 */ >> > 1449 mt_init_flags(mt, MT_FLAGS_ALLOC_RANGE); >> > 1450 mas_lock(&mas); >> > 1451 mas_set(&mas, 0); >> > 1452 mas_store_gfp(&mas, &mas, GFP_KERNEL); >> > 1453 mas_set_range(&mas, 2, 5); >> > 1454 mas_store_gfp(&mas, NULL, GFP_KERNEL); >> > 1455 MT_BUG_ON(mt, mtree_empty(mt)); >> >> 1456 MT_BUG_ON(mt, xa_is_node(mt->ma_root)); >> >> Thanks. >> >> Will fix it to xa_is_node(mas_root(&mas)) in next version. > >By the looks of the bot output, there are quite a lot of existing cases >of this in the test code. > Hi, Liam Thanks for your review. I may not follow you. I saw you add you RB. Do you prefer me to spin a new round with this adjusted or the current version is fine? >> >> >> > 1457 mas_unlock(&mas); >> > 1458 mtree_destroy(mt); >> > 1459 >> > 1460 /* >> > 1461 * Store NULL at range [0, ULONG_MAX] to a tree with node should >> > 1462 * result in an empty tree >> > 1463 */ >> > 1464 mt_init_flags(mt, MT_FLAGS_ALLOC_RANGE); >> > 1465 mas_lock(&mas); >> > 1466 mas_set_range(&mas, 1, 3); >> > 1467 mas_store_gfp(&mas, &mas, GFP_KERNEL); >> > 1468 MT_BUG_ON(mt, !xa_is_node(mt->ma_root)); >> > 1469 mas_set_range(&mas, 0, ULONG_MAX); >> > 1470 mas_store_gfp(&mas, NULL, GFP_KERNEL); >> > 1471 MT_BUG_ON(mt, !mtree_empty(mt)); >> > 1472 mas_unlock(&mas); >> > 1473 mtree_destroy(mt); >> > 1474 } >> > 1475 >> > >> >-- >> >0-DAY CI Kernel Test Service >> >https://github.com/intel/lkp-tests/wiki >> >> -- >> Wei Yang >> Help you, Help me -- Wei Yang Help you, Help me