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 E5D6BEB64DD for ; Mon, 14 Aug 2023 19:47:51 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 597398E0003; Mon, 14 Aug 2023 15:47:51 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 5472B8E0001; Mon, 14 Aug 2023 15:47:51 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 3E79D8E0003; Mon, 14 Aug 2023 15:47:51 -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 2F58D8E0001 for ; Mon, 14 Aug 2023 15:47:51 -0400 (EDT) Received: from smtpin26.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id E3A21A0C6B for ; Mon, 14 Aug 2023 19:47:50 +0000 (UTC) X-FDA: 81123745500.26.CD2E9F1 Received: from mail-yb1-f176.google.com (mail-yb1-f176.google.com [209.85.219.176]) by imf30.hostedemail.com (Postfix) with ESMTP id 2746B80018 for ; Mon, 14 Aug 2023 19:47:48 +0000 (UTC) Authentication-Results: imf30.hostedemail.com; dkim=pass header.d=google.com header.s=20221208 header.b="NgIy/DGN"; spf=pass (imf30.hostedemail.com: domain of surenb@google.com designates 209.85.219.176 as permitted sender) smtp.mailfrom=surenb@google.com; dmarc=pass (policy=reject) header.from=google.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1692042469; 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:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=Xy0pzUvzYWh3mlOnXTx+dHFgIF1vfiRlwU+KNeoaObI=; b=hXKeK26KaYowMuftnYiSbDiVORXn4Oc5ti21KPMvct1IGxsRrTDaHCIVYd90ccDKLjqZYN HcT+yqvXCjLgVUBA12D+60+bVI6SuZAZOKu66CAGmvROQrdNDkHkuV0wNVOyJFBQFefJCZ YPj8sbJXMklVDx1kBhVQ6aez2aAHkIg= ARC-Authentication-Results: i=1; imf30.hostedemail.com; dkim=pass header.d=google.com header.s=20221208 header.b="NgIy/DGN"; spf=pass (imf30.hostedemail.com: domain of surenb@google.com designates 209.85.219.176 as permitted sender) smtp.mailfrom=surenb@google.com; dmarc=pass (policy=reject) header.from=google.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1692042469; a=rsa-sha256; cv=none; b=d2uPFSOWMf2FOc6JHW0Q3n6jGSuJa7AeXKFOjwnAQTABB6Z4Nll0YXdlEKhRkYV8c89x/D aavU1cseIAtppj5F6nSjcKTETOTHL2mtH6JSI39F/vXoWGDjCnYQh3/OcRnr7d7jnr9YbI 9FbXMUBV7aFYUfrIg+qchDWNRglagNE= Received: by mail-yb1-f176.google.com with SMTP id 3f1490d57ef6-d63c0a6568fso4668117276.0 for ; Mon, 14 Aug 2023 12:47:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20221208; t=1692042468; x=1692647268; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=Xy0pzUvzYWh3mlOnXTx+dHFgIF1vfiRlwU+KNeoaObI=; b=NgIy/DGNPOHc+/Id4Ob2gsokFGo27YFVAgq/BPrT1zAU/RxhA3Ikd9U8lS2HX3hU2J 2cxS9g2ZJHA8FtP50zrSv1HTgQ/RloC4gIrd3oR8OcjuVVcjEYIL3uAruwQifEfzQXMv 0D0uQ8o/9pLMVzN1Ik6aBQ2TEg9NumnUJczkhhLqcapDS/ZBdlkZJaYQpAzFuj+UPcvW T3VH5ruFdvPReCKGaHd4sOhzfT8V6jstlF9w3qEVwDniGF9DiED/GrYBULy9ns3qohiy QasucdLDIGaHD63ZIXtRUR/1zwBuYwLwPrT74qOTO8ZWmuEqk18LxRrON7YNrsu2Zah+ bWJA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692042468; x=1692647268; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Xy0pzUvzYWh3mlOnXTx+dHFgIF1vfiRlwU+KNeoaObI=; b=AIFkF0bTcMd/kUjJXa0PLReyPkxIRxrWBsCXwA4ISuTgLx/sbhW53v4R5WiG2tv9bV Ohsoq/lBJxm5n/ad/dCGU4pHWyhVxvg4lGYmqIH3byPm3yu1VV0rdWgS5pfTATlGqVzu OJ9qw0X7gmGYbJlQMBN0NinUHIfx13Qj5DWb5XpKXOS18N0nwB5oxkB/nyFCY6G7HkwU Wdp5PNk3cJWmzt0NCM0fIVaGb4P9VXuHyRz1RSpMveN6AO01vHDNDnZLpI0Inh348ez7 FqQniWxbx/R6RxlizTX63NdO3Dlv8V4QwS065XmaSOwaJFtEuPeE/Sq9DkGIdMl3B2Ip JTpg== X-Gm-Message-State: AOJu0YzZHt1b3JQ1A8I/8fuI7s94qAlSvHVe8/A+hUotbAmMg3DfW+/c ljLOCHe09e1QUePtbkZr609LZ/MREshmhZs2wEbMjQ== X-Google-Smtp-Source: AGHT+IEAQsiWHsu23kYMma2/neNlWqdM4EQ4WkHAq+c72OzEyWIKqAb1peFu/NihhJQeF582GCplQAoA1lL4HNrxBH8= X-Received: by 2002:a25:6853:0:b0:d44:3ad2:42e5 with SMTP id d80-20020a256853000000b00d443ad242e5mr12674731ybc.4.1692042467977; Mon, 14 Aug 2023 12:47:47 -0700 (PDT) MIME-Version: 1.0 References: <202308131610.jF4ncWp6-lkp@intel.com> In-Reply-To: <202308131610.jF4ncWp6-lkp@intel.com> From: Suren Baghdasaryan Date: Mon, 14 Aug 2023 12:47:34 -0700 Message-ID: Subject: Re: [akpm-mm:mm-stable 219/240] mm/memory.c:5410:41: error: implicit declaration of function 'vma_is_tcp'; did you mean 'vma_is_dax'? To: kernel test robot Cc: "Matthew Wilcox (Oracle)" , oe-kbuild-all@lists.linux.dev, Andrew Morton , Linux Memory Management List Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: 2746B80018 X-Rspam-User: X-Stat-Signature: a4nysqsziuwmbtuu6u9bbrpmjrngndjm X-Rspamd-Server: rspam01 X-HE-Tag: 1692042468-535505 X-HE-Meta: U2FsdGVkX1+pAoNhJf1s2OeGMFWUvwKpqeB/sRaGd+7tDVBWlPZizjizwnLv8Ny2y1JZ2hV9LJSwWqk9ds3CwMPWOJnPeiBLyeEApPEVNJZPBUH3AaC6vZRxFtzejuM2tqCG8t7psuZipc9lwxxAXEk5E3tdud4K+S8fQONw57wGhtIc9Ep7qdZNp7kLBm07G77ZFQsMiWmPhExijyU34628mgWWP6JyVL8FNSnplQXkbQCTccfKqdoptu7Ou/I9kM5DMXeQN0GIqQOyrVt88bQZses81ySekv7xKJ4nxdcsS4XZGp+q/T9UF8jVzjFAtAh1YNExKY0y5mKzOTqkL9A/GtFxgojRJ4acth0LHbBhsfb7BiGGhF5/NLT7sGQoO+LNXD3zt8wCaMWfWBeSU02ZLEZ5eeMn3oulzU3oeWoSuybuCC3p9lLfIbkto1eicPPk6KhZAouj784ByLVWO8D1tG0BiCa1zjWnH6rar15wMCl6rj4aXdTF7jcNaS1nei/D7ccWwfrWok3yHo2iFHpsKhKWiL5653aOs9R09jOJTU5mw806RdPHQP2TrWwbK/b/lFuhBoFy/7rMxSv0zWHUYIalVlnE5tuFY22ONmUZKu54E2rPtfYPi22iZOiJ3me3bCGDmCg76ptIouap4jLAs1bXBWCJB/QnS+WpPfmQe0/y3n7jgtJQpiRj5f1zM/p6hoZDC0SS0DF6UtAbVfnhrCt4gey1EYqd0pH4JHaaLRc1aLsSGakpZUzVKWVQhgkoaE35QXowR30b2FE/PEKcX8/5BjtEcsLhrztSR/1QJ9qxbFqx6iOA7YIb3sIr4cS1a43NYoX43DVSfSwTEJonH6hk/i0YrxSmJteg+l8uZ4oODwD/ScxfayMm1FdovmMpHhI8vtiNfP0YcdYW7sWwnR49uI7p3U2sESK6q05d5dcpJrsm1aT8Go9vaAxw4D3rV0S7PUhIn/ziHiX BFCoxjyy 83jAk0DjYcYZk9wsB3lFpjsaSPb4/aY8XLsZCU7qXr+WbnYIljh2r3Y5PqyhrXzP/2Sjru0rEKd5yFvVbaKe3jbjSK06Md7XE7tyZpFzd4tsbA1b8iJ7LzAy/29oKocLDc6TDjZotQQ+0hOebDmjVfl4pSI+WwmN6tWn/fN1LBZt9h+5j5HdwvTJ19fp9k3CNhWPC3y0xf57qc2MkkG3vrIqLmGWsT2NIrKaTnG06TqsNooXILZULnc2VEwPp49LgBRTDwd/SKL+vgw6yDxPW5EToR4BEhjR2LvweW2ZotWM+mqJVjRipMMuJ/h9OpH1cGQ3XvDOfYUZE0VKDWofdVf5IY26Hm7aFBxao6FSCd0CudUYRcAd11WmuUQVSAzC4g6BhwMmxdiZ7yYQlZ+Va1tZs42h5nFSBBkfG7v24yR0zSIJPSlZ1Hiq/cdxAOh+AXMV3VqjRDxi8VltZ2gHNEV2Hz2rIHjCxvc1LE/EogueJy6Vlv7v/uUjhC2qjbdT60ZNK2HbfaebolQKlssccLmN6QBDyrsw3qSPtUCCKGKZLchIfS1qYOUYljw== 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 Sun, Aug 13, 2023 at 1:17=E2=80=AFAM kernel test robot w= rote: > > tree: https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-st= able > head: 5fb2ea3111f4ecc6dc4891ce5b00f0217aae9a04 > commit: 4aaa60dad4d1c96151dec51098aed866bb6e867d [219/240] mm: allow per-= VMA locks on file-backed VMAs > config: x86_64-defconfig (https://download.01.org/0day-ci/archive/2023081= 3/202308131610.jF4ncWp6-lkp@intel.com/config) > compiler: gcc-12 (Debian 12.2.0-14) 12.2.0 > reproduce: (https://download.01.org/0day-ci/archive/20230813/202308131610= .jF4ncWp6-lkp@intel.com/reproduce) > > If you fix the issue in a separate patch/commit (i.e. not just a new vers= ion of > the same patch/commit), kindly add following tags > | Reported-by: kernel test robot > | Closes: https://lore.kernel.org/oe-kbuild-all/202308131610.jF4ncWp6-lkp= @intel.com/ > > All errors (new ones prefixed by >>): > > In file included from include/linux/build_bug.h:5, > from include/linux/container_of.h:5, > from include/linux/list.h:5, > from include/linux/smp.h:12, > from include/linux/kernel_stat.h:5, > from mm/memory.c:42: > mm/memory.c: In function 'lock_vma_under_rcu': > >> mm/memory.c:5410:41: error: implicit declaration of function 'vma_is_t= cp'; did you mean 'vma_is_dax'? [-Werror=3Dimplicit-function-declaration] > 5410 | if (unlikely(!vma->anon_vma && !vma_is_tcp(vma))) > | ^~~~~~~~~~ > include/linux/compiler.h:77:45: note: in definition of macro 'unlikely= ' > 77 | # define unlikely(x) __builtin_expect(!!(x), 0) > | ^ > cc1: some warnings being treated as errors Same issue as https://lore.kernel.org/all/202308121909.XNYBtqNI-lkp@intel.c= om/ with the same fix that Matthew suggested. > > > vim +5410 mm/memory.c > > c2508ec5a58db6 Linus Torvalds 2023-06-15 5382 > 50ee3253720614 Suren Baghdasaryan 2023-02-27 5383 #ifdef CONFIG_PER_VMA= _LOCK > 50ee3253720614 Suren Baghdasaryan 2023-02-27 5384 /* > 50ee3253720614 Suren Baghdasaryan 2023-02-27 5385 * Lookup and lock a = VMA under RCU protection. Returned VMA is guaranteed to be > 50ee3253720614 Suren Baghdasaryan 2023-02-27 5386 * stable and not iso= lated. If the VMA is not found or is being modified the > 50ee3253720614 Suren Baghdasaryan 2023-02-27 5387 * function returns N= ULL. > 50ee3253720614 Suren Baghdasaryan 2023-02-27 5388 */ > 50ee3253720614 Suren Baghdasaryan 2023-02-27 5389 struct vm_area_struct= *lock_vma_under_rcu(struct mm_struct *mm, > 50ee3253720614 Suren Baghdasaryan 2023-02-27 5390 = unsigned long address) > 50ee3253720614 Suren Baghdasaryan 2023-02-27 5391 { > 50ee3253720614 Suren Baghdasaryan 2023-02-27 5392 MA_STATE(mas, &mm= ->mm_mt, address, address); > 50ee3253720614 Suren Baghdasaryan 2023-02-27 5393 struct vm_area_st= ruct *vma; > 50ee3253720614 Suren Baghdasaryan 2023-02-27 5394 > 50ee3253720614 Suren Baghdasaryan 2023-02-27 5395 rcu_read_lock(); > 50ee3253720614 Suren Baghdasaryan 2023-02-27 5396 retry: > 50ee3253720614 Suren Baghdasaryan 2023-02-27 5397 vma =3D mas_walk(= &mas); > 50ee3253720614 Suren Baghdasaryan 2023-02-27 5398 if (!vma) > 50ee3253720614 Suren Baghdasaryan 2023-02-27 5399 goto inva= l; > 50ee3253720614 Suren Baghdasaryan 2023-02-27 5400 > 50ee3253720614 Suren Baghdasaryan 2023-02-27 5401 if (!vma_start_re= ad(vma)) > 50ee3253720614 Suren Baghdasaryan 2023-02-27 5402 goto inva= l; > 50ee3253720614 Suren Baghdasaryan 2023-02-27 5403 > 657b5146955eba Jann Horn 2023-07-26 5404 /* > 657b5146955eba Jann Horn 2023-07-26 5405 * find_mergeable= _anon_vma uses adjacent vmas which are not locked. > 657b5146955eba Jann Horn 2023-07-26 5406 * This check mus= t happen after vma_start_read(); otherwise, a > 657b5146955eba Jann Horn 2023-07-26 5407 * concurrent mre= map() with MREMAP_DONTUNMAP could dissociate the VMA > 657b5146955eba Jann Horn 2023-07-26 5408 * from its anon_= vma. > 657b5146955eba Jann Horn 2023-07-26 5409 */ > 657b5146955eba Jann Horn 2023-07-26 @5410 if (unlikely(!vma= ->anon_vma && !vma_is_tcp(vma))) > 657b5146955eba Jann Horn 2023-07-26 5411 goto inva= l_end_read; > 657b5146955eba Jann Horn 2023-07-26 5412 > 444eeb17437a0e Suren Baghdasaryan 2023-02-27 5413 /* > 444eeb17437a0e Suren Baghdasaryan 2023-02-27 5414 * Due to the pos= sibility of userfault handler dropping mmap_lock, avoid > 444eeb17437a0e Suren Baghdasaryan 2023-02-27 5415 * it for now and= fall back to page fault handling under mmap_lock. > 444eeb17437a0e Suren Baghdasaryan 2023-02-27 5416 */ > 657b5146955eba Jann Horn 2023-07-26 5417 if (userfaultfd_a= rmed(vma)) > 657b5146955eba Jann Horn 2023-07-26 5418 goto inva= l_end_read; > 444eeb17437a0e Suren Baghdasaryan 2023-02-27 5419 > 50ee3253720614 Suren Baghdasaryan 2023-02-27 5420 /* Check since vm= _start/vm_end might change before we lock the VMA */ > 657b5146955eba Jann Horn 2023-07-26 5421 if (unlikely(addr= ess < vma->vm_start || address >=3D vma->vm_end)) > 657b5146955eba Jann Horn 2023-07-26 5422 goto inva= l_end_read; > 50ee3253720614 Suren Baghdasaryan 2023-02-27 5423 > 50ee3253720614 Suren Baghdasaryan 2023-02-27 5424 /* Check if the V= MA got isolated after we found it */ > 50ee3253720614 Suren Baghdasaryan 2023-02-27 5425 if (vma->detached= ) { > 50ee3253720614 Suren Baghdasaryan 2023-02-27 5426 vma_end_r= ead(vma); > 52f238653e452e Suren Baghdasaryan 2023-02-27 5427 count_vm_= vma_lock_event(VMA_LOCK_MISS); > 50ee3253720614 Suren Baghdasaryan 2023-02-27 5428 /* The ar= ea was replaced with another one */ > 50ee3253720614 Suren Baghdasaryan 2023-02-27 5429 goto retr= y; > 50ee3253720614 Suren Baghdasaryan 2023-02-27 5430 } > 50ee3253720614 Suren Baghdasaryan 2023-02-27 5431 > 50ee3253720614 Suren Baghdasaryan 2023-02-27 5432 rcu_read_unlock()= ; > 50ee3253720614 Suren Baghdasaryan 2023-02-27 5433 return vma; > 657b5146955eba Jann Horn 2023-07-26 5434 > 657b5146955eba Jann Horn 2023-07-26 5435 inval_end_read: > 657b5146955eba Jann Horn 2023-07-26 5436 vma_end_read(vma)= ; > 50ee3253720614 Suren Baghdasaryan 2023-02-27 5437 inval: > 50ee3253720614 Suren Baghdasaryan 2023-02-27 5438 rcu_read_unlock()= ; > 52f238653e452e Suren Baghdasaryan 2023-02-27 5439 count_vm_vma_lock= _event(VMA_LOCK_ABORT); > 50ee3253720614 Suren Baghdasaryan 2023-02-27 5440 return NULL; > 50ee3253720614 Suren Baghdasaryan 2023-02-27 5441 } > 50ee3253720614 Suren Baghdasaryan 2023-02-27 5442 #endif /* CONFIG_PER_= VMA_LOCK */ > 50ee3253720614 Suren Baghdasaryan 2023-02-27 5443 > > :::::: The code at line 5410 was first introduced by commit > :::::: 657b5146955eba331e01b9a6ae89ce2e716ba306 mm: lock_vma_under_rcu() = must check vma->anon_vma under vma lock > > :::::: TO: Jann Horn > :::::: CC: Linus Torvalds > > -- > 0-DAY CI Kernel Test Service > https://github.com/intel/lkp-tests/wiki