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 A498CEB64DA for ; Wed, 5 Jul 2023 20:37:32 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 2795D8D0002; Wed, 5 Jul 2023 16:37:32 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 229C28D0001; Wed, 5 Jul 2023 16:37:32 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 118628D0002; Wed, 5 Jul 2023 16:37:32 -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 038C08D0001 for ; Wed, 5 Jul 2023 16:37:32 -0400 (EDT) Received: from smtpin13.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id 9B88E1A0920 for ; Wed, 5 Jul 2023 20:37:31 +0000 (UTC) X-FDA: 80978718702.13.2FF362F Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by imf13.hostedemail.com (Postfix) with ESMTP id 3600320021 for ; Wed, 5 Jul 2023 20:37:29 +0000 (UTC) Authentication-Results: imf13.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=LETH1TqC; spf=pass (imf13.hostedemail.com: domain of david@redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=david@redhat.com; dmarc=pass (policy=none) header.from=redhat.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1688589449; 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=8aNSOaaUBYCJKouQNnFhzum9bTqqbGqw38WYLNiNCbU=; b=VuhP7wgHC/4Duiq3/ocdQwm2H0A0uMB27fQXttMeVzu+KLTd8QKhTMNIqjrzFMF8GM6PCZ bl/Qhs8fFxak0bNrF7OKT8nIQB7JfXxhZUBzGskVuLGyR/J6bSw91Xy8IqBDj54pxzssvE l+eiuu/MF+8hXRoDMuFPUYoguo4Qqlc= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1688589449; a=rsa-sha256; cv=none; b=orV1k1cSpjN228ehUzujNXmeaBxT/fcbS+Kmkw6b41ZNwh7Q6U2/g9RTpCCzr67v2GjiKB 9oZ7wiUrEt5uF7RUXvxyaX3lgjpyw2gvU+CGokesYOEIOBMcjHzJ9t1nkQOX/W2bt2Dy3N OjL9PHSozuepc/EpEHLVzLYD2CMSpe0= ARC-Authentication-Results: i=1; imf13.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=LETH1TqC; spf=pass (imf13.hostedemail.com: domain of david@redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=david@redhat.com; dmarc=pass (policy=none) header.from=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1688589448; h=from:from: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; bh=8aNSOaaUBYCJKouQNnFhzum9bTqqbGqw38WYLNiNCbU=; b=LETH1TqCO06IJINxqDRNCl1yU5rQ8CiMedl1U2GQ9QQjjDv9CVfN+00cfScWMXb6W0moCb l2XfCwcppG7M8//griPw34IbwfEiRwBBPqp8WQf4ByOd9AaW9BSg7TDhSwCrJYmud/mzQ7 hBsLSIKiD2C7H7KxcxKkeQ5jjG74MdY= Received: from mail-wr1-f69.google.com (mail-wr1-f69.google.com [209.85.221.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-144-YSStuTgNPWW-CIk0YO4-Eg-1; Wed, 05 Jul 2023 16:37:27 -0400 X-MC-Unique: YSStuTgNPWW-CIk0YO4-Eg-1 Received: by mail-wr1-f69.google.com with SMTP id ffacd0b85a97d-31437f02985so2227838f8f.0 for ; Wed, 05 Jul 2023 13:37:27 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688589446; x=1691181446; h=content-transfer-encoding:in-reply-to:organization:from:references :cc:to:content-language:subject:user-agent:mime-version:date :message-id:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=8aNSOaaUBYCJKouQNnFhzum9bTqqbGqw38WYLNiNCbU=; b=OVpeigaWmwc5n3MyM7foMtOkrOSADsy52eILPZzuh+KW8GMZqI3ppECn1PAetd1Y6s 6nriKS7SNlpcmf/jDEfLIFgjJ9Z8FcdZMqzK89AX/Rq+V6hY1bQbdqAqf31UTGopfFW7 3XVbTC2g9l+vglE28M7Q72rlMqr96AA5CCkdte9Bl1wbe2R8Xbpoy+8nCrRLQYIBuWNY 7SzJZAomzqHKjfDhiuFMDXXLLkcs54iTTfYG/ovC3VIZqyO7kcdBm5U75QyuiSliKlzy Q/FBYU+8b7ngF8qqNgjKCl5jIfM07Ft9YxvO5KtqAdDrX59NXFjaKir5Pm7suzQPY3Ff ZJOw== X-Gm-Message-State: ABy/qLaMGL8tinbWFudLxruGnoZ0m3I49xkrO4C+1Pob60WHW77hJx5i lLBAuT9o75SMA2lfAsJIp1+bhf1WAvdovqPWFccaRsqiV7xSTu0hmsMlmgPsCabhCN0jkRrOBZm v3VrMcwV4U88= X-Received: by 2002:a5d:4303:0:b0:314:2e77:afec with SMTP id h3-20020a5d4303000000b003142e77afecmr11354886wrq.57.1688589446257; Wed, 05 Jul 2023 13:37:26 -0700 (PDT) X-Google-Smtp-Source: APBJJlGlpk4/V1Yhf33Ofe9H74MrNLKgyUAvRE41pG4SyoZ+RXBrxrqIG4eJDpP22mgxnUCAE+YvFA== X-Received: by 2002:a5d:4303:0:b0:314:2e77:afec with SMTP id h3-20020a5d4303000000b003142e77afecmr11354843wrq.57.1688589445769; Wed, 05 Jul 2023 13:37:25 -0700 (PDT) Received: from ?IPV6:2003:cb:c71a:1c00:e2b1:fc33:379b:a713? (p200300cbc71a1c00e2b1fc33379ba713.dip0.t-ipconnect.de. [2003:cb:c71a:1c00:e2b1:fc33:379b:a713]) by smtp.gmail.com with ESMTPSA id b7-20020a5d45c7000000b003141a3c4353sm17225645wrs.30.2023.07.05.13.37.23 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 05 Jul 2023 13:37:24 -0700 (PDT) Message-ID: Date: Wed, 5 Jul 2023 22:37:22 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.12.0 Subject: Re: [PATCH v3 2/2] mm: disable CONFIG_PER_VMA_LOCK until its fixed To: Peter Xu , Suren Baghdasaryan Cc: akpm@linux-foundation.org, jirislaby@kernel.org, jacobly.alt@gmail.com, holger@applied-asynchrony.com, hdegoede@redhat.com, michel@lespinasse.org, jglisse@google.com, mhocko@suse.com, vbabka@suse.cz, hannes@cmpxchg.org, mgorman@techsingularity.net, dave@stgolabs.net, willy@infradead.org, liam.howlett@oracle.com, peterz@infradead.org, ldufour@linux.ibm.com, paulmck@kernel.org, mingo@redhat.com, will@kernel.org, luto@kernel.org, songliubraving@fb.com, dhowells@redhat.com, hughd@google.com, bigeasy@linutronix.de, kent.overstreet@linux.dev, punit.agrawal@bytedance.com, lstoakes@gmail.com, peterjung1337@gmail.com, rientjes@google.com, chriscli@google.com, axelrasmussen@google.com, joelaf@google.com, minchan@google.com, rppt@kernel.org, jannh@google.com, shakeelb@google.com, tatashin@google.com, edumazet@google.com, gthelen@google.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org References: <20230705171213.2843068-1-surenb@google.com> <20230705171213.2843068-3-surenb@google.com> <3cdaa7d4-1293-3806-05ce-6b7fc4382458@redhat.com> From: David Hildenbrand Organization: Red Hat In-Reply-To: X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 3600320021 X-Rspam-User: X-Stat-Signature: 1kwz6ncdnikk99jo93m1iftwyhb4ehqo X-Rspamd-Server: rspam03 X-HE-Tag: 1688589448-555842 X-HE-Meta: U2FsdGVkX18O8RvJ0F3P9wY/qyKWRLaG0G3PQ7P4XJAC3ga8zYVKCkejGE6Pk/15X4dHqYH0qhtAuHw7uSDKkDtJlDxEnptyDQr/QCjdUqFR6FZhts8/xR5BxPhgfvH47i0xeg2sahhpdp9J82qo/6TiIEVeNmi3OawhX5mufLU3TcKWWU1OuTzp8bBBNy7OO7ADLSu5PcELJn22xrfRJ1ptb5pW7f2UhlWSKS1VBzrmbGuC75qjoJGw6759mHEsUUrtSYLFY0ezrQXdnlZVRZKy9n0LgQ4pJAjNLOT+quxjZMTxLH7yPLeQzMga2iXxRlPqLjOS3gasAR70160I5h57/WE9NEn319HcrVg6NopMv4Njonq+M+oDk7xV9PDe4VSp7qbsddYukVCg9/GlCMx2VGL27ebZv5VNjdzBTmIpJKbAs/ePGkBK9ztLJlu64PagS9rjHDcTYrQQALNxc035uI/wklnO1fml8e9mDzZ8WWUa4KUrq7rwmHULSe1X8sojubTVGrhF8SdQUeVAIPE+HnIaF7FNxDDS324qWmiObzdnq47wPdBIeE7XDJ4EvASEC1uIDTxVrk6ZJCWXKKMwR02yEUeaq1t5MPEB3/BBR/KRXGNQJ+eKDDhF/4N+6YSFIus42hVLgR1SXd7iConMasNVav+gnOztx9UjxfngMIcxoLy6pfUhSk9AHW3O4/oAow7Cn8cqs5yQnk13JFQuuTo+0tYL+MrlhQyahSAOIyysSlG+9iZb+gxa9AB7iYzgqe4GgV0+bB51O9NQS7JgM7zTVg4ktc1tdO1eOeMqbL3ZuXkngnab9ZIdg/FZ20gMnabSX3ffWkSY9wgyc8REpOSfzU9IFk+7fNgIHkf32kqU/3/9EBsQ2JCW8nJNUMj9+SdbHUn4kKmE+axLBG+8ay/NFPpv0AxQ361nJeBHvoPOdy8cPDP3E6KQTBNSq5fgvsvhz+wF1IW9+Jv o05iPXTX aQqt8IzR6g/Hpbwhbna6agIf+Hu4QjPJNITHaY+oTtgcULVnIDlZw3KIfhTRf3zYgBL92juGp53LYDuSI79vk49d26QQn3zM+m1dN9LoJ1PK2WD9E5rKatbKIw6ykCH+EgTCXIrY89/cafPybVfTRoNfK9xe/0OWtxNLQXxHjRDZEvgs8pKCpjtrVjXIPl6drnXMpmIf+9lHvSeyCv0rby07iXqz6p4a+FZgLFiJ5HKvs/f5o5upC82gHEoFhL00v1mUeGXPWm3APadLEWQhZpe51ERJdMPdYyN5CGcljXjZ7RVN4aOfoI1AyWvP6QaSKQgpDE5Cnbx4Cca1g4fDVoN3JISMMjglFGG5CbA5Dr1cpAPrYFxRrT+phts3Hb1pq/TCOX2RTJHdGGnDOq5aac5uwiwRDvfO/WDeKf0AIdjAxP8AXlicumuUSOtinw14doUJoSiPnSGxwslGtWgIOc2O6CPlJYDVyDGnzh/N3Qa2ZIyhvnXG8Zpw54V7T/XixB/iVc+l6zRBgg3CIixdozVXr+bx61tEiZhEJM3llVNGnG6rsxmjCHCWoX+Gd4+N7nLzdqykPaZN0jWnGNgsT9eWaoSVotbTMMSQEGtajgCTHDAQoVSoWBh0g9XhPRWJpJmV9 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 05.07.23 22:25, Peter Xu wrote: > On Wed, Jul 05, 2023 at 10:22:27AM -0700, Suren Baghdasaryan wrote: >> On Wed, Jul 5, 2023 at 10:16 AM David Hildenbrand wrote: >>> >>> On 05.07.23 19:12, Suren Baghdasaryan wrote: >>>> A memory corruption was reported in [1] with bisection pointing to the >>>> patch [2] enabling per-VMA locks for x86. >>>> Disable per-VMA locks config to prevent this issue while the problem is >>>> being investigated. This is expected to be a temporary measure. >>>> >>>> [1] https://bugzilla.kernel.org/show_bug.cgi?id=217624 >>>> [2] https://lore.kernel.org/all/20230227173632.3292573-30-surenb@google.com >>>> >>>> Reported-by: Jiri Slaby >>>> Closes: https://lore.kernel.org/all/dbdef34c-3a07-5951-e1ae-e9c6e3cdf51b@kernel.org/ >>>> Reported-by: Jacob Young >>>> Closes: https://bugzilla.kernel.org/show_bug.cgi?id=217624 >>>> Fixes: 0bff0aaea03e ("x86/mm: try VMA lock-based page fault handling first") >>>> Cc: stable@vger.kernel.org >>>> Signed-off-by: Suren Baghdasaryan >>>> --- >>>> mm/Kconfig | 3 ++- >>>> 1 file changed, 2 insertions(+), 1 deletion(-) >>>> >>>> diff --git a/mm/Kconfig b/mm/Kconfig >>>> index 09130434e30d..0abc6c71dd89 100644 >>>> --- a/mm/Kconfig >>>> +++ b/mm/Kconfig >>>> @@ -1224,8 +1224,9 @@ config ARCH_SUPPORTS_PER_VMA_LOCK >>>> def_bool n >>>> >>>> config PER_VMA_LOCK >>>> - def_bool y >>>> + bool "Enable per-vma locking during page fault handling." >>>> depends on ARCH_SUPPORTS_PER_VMA_LOCK && MMU && SMP >>>> + depends on BROKEN >>>> help >>>> Allow per-vma locking during page fault handling. >>>> >>> Do we have any testing results (that don't reveal other issues :) ) for >>> patch #1? Not sure if we really want to mark it broken if patch #1 fixes >>> the issue. >> >> I tested the fix using the only reproducer provided in the reports >> plus kernel compilation and my fork stress test. All looked good and >> stable but I don't know if other reports had the same issue or >> something different. > > The commit log seems slightly confusing. It mostly says the bug was still > not solved, but I assume patch 1 is the current "fix", it's just not clear > whether there's any other potential issues? > > According to the stable tree rules: > > - It must fix a problem that causes a build error (but not for things > marked CONFIG_BROKEN), an oops, a hang, data corruption, a real > security issue, or some "oh, that's not good" issue. In short, something > critical. > > I think it means vma lock will never be fixed in 6.4, and it can't (because > after this patch it'll be BROKEN, and this patch copies stable, and we > can't fix BROKEN things in stables). > > Totally no problem I see, just to make sure this is what you wanted.. > > There'll still try to be a final fix, am I right? As IIRC allowing page > faults during fork() is one of the major goals of vma lock. At least not that I am aware of (and people who care about that should really work on scalable fork() alternatives, like that io_uring fork() thingy). My understanding is that CONFIG_PER_VMA_LOCK wants to speed up page concurrent page faults *after* fork() [or rather, after new process creation], IOW, when we have a lot of mmap() activity going on while some threads of the new process are already active and don't actually touch what's getting newly mmaped. -- Cheers, David / dhildenb