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 12FB1C3601E for ; Thu, 10 Apr 2025 22:47:49 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id D879C280143; Thu, 10 Apr 2025 18:47:47 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id D36BE280138; Thu, 10 Apr 2025 18:47:47 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C22B9280143; Thu, 10 Apr 2025 18:47:47 -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 A4372280138 for ; Thu, 10 Apr 2025 18:47:47 -0400 (EDT) Received: from smtpin18.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id CCAF81215B3 for ; Thu, 10 Apr 2025 22:47:48 +0000 (UTC) X-FDA: 83319623016.18.AC9C65E Received: from tor.source.kernel.org (tor.source.kernel.org [172.105.4.254]) by imf07.hostedemail.com (Postfix) with ESMTP id 2ACA740004 for ; Thu, 10 Apr 2025 22:47:47 +0000 (UTC) Authentication-Results: imf07.hostedemail.com; dkim=pass header.d=linux-foundation.org header.s=korg header.b=e6xef16q; spf=pass (imf07.hostedemail.com: domain of akpm@linux-foundation.org designates 172.105.4.254 as permitted sender) smtp.mailfrom=akpm@linux-foundation.org; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1744325267; 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=mKGFsXFSEGLlZrxlkNnTEo+qoxhnMzubzSSSxgn0fyc=; b=qZcs1kvww8gVIdYw2JuttvuVkghsZLT8RI9aWbQ2QT1OuzgPhKuamty9VQ7d7VvsdJx1+T ndPSDQJ1EVz8T4eJVBKUGhfzYi/GYu1vL4JonDJVFX01G0I0sNcLLzzYERJl1vlYDeXJi9 mYR4IZmH+onS7c8gDnNYafWryNLsz0Q= ARC-Authentication-Results: i=1; imf07.hostedemail.com; dkim=pass header.d=linux-foundation.org header.s=korg header.b=e6xef16q; spf=pass (imf07.hostedemail.com: domain of akpm@linux-foundation.org designates 172.105.4.254 as permitted sender) smtp.mailfrom=akpm@linux-foundation.org; dmarc=none ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1744325267; a=rsa-sha256; cv=none; b=osKDBMpns981MOsDm91B10XjtlpgySti/GbiWlSGWTrV0edFY+UcJBq3e2QRoUBucV5eM4 GnrmzVGiyHAQufXf1KNAtdNtamljQqgu97a21MGdblDgtXd3/r0XVobVIfGQ/5wShtpM6I jPuAo8bZG/OwIiaURlKAqyf/8zXmfTU= Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by tor.source.kernel.org (Postfix) with ESMTP id B03A260008; Thu, 10 Apr 2025 22:47:35 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 72DF3C4CEDD; Thu, 10 Apr 2025 22:47:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1744325266; bh=1tnfPuvkdBHhkMd126G0IxK9k3gsj3KHkqYbgp6rqwk=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=e6xef16qlSCuaWmvesXMrxudpX3PdJoqdNQrXzsVNJrRRrc/hIgkchadNM34Ppb4j YRP22ogIXwogTnAqDkh7D1n1YtKcQftorM0XAqg0S2/V4Yun6qCg+vGECTW9UKKua2 l9Tu9D3P64Os0dK/iz7clScFQuOJTR8wIZOF5Qj8= Date: Thu, 10 Apr 2025 15:47:44 -0700 From: Andrew Morton To: Alexander Gordeev Cc: Andrey Ryabinin , Hugh Dickins , Nicholas Piggin , Guenter Roeck , Juergen Gross , Jeremy Fitzhardinge , linux-kernel@vger.kernel.org, linux-mm@kvack.org, kasan-dev@googlegroups.com, sparclinux@vger.kernel.org, xen-devel@lists.xenproject.org, linuxppc-dev@lists.ozlabs.org, linux-s390@vger.kernel.org, stable@vger.kernel.org Subject: Re: [PATCH v2 3/3] mm: Protect kernel pgtables in apply_to_pte_range() Message-Id: <20250410154744.44991b2abe5f842e34320917@linux-foundation.org> In-Reply-To: References: X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.33; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 2ACA740004 X-Rspam-User: X-Rspamd-Server: rspam02 X-Stat-Signature: 7j14whtmf66k7pew6h4jt3xdxa9te9s7 X-HE-Tag: 1744325267-357469 X-HE-Meta: U2FsdGVkX1/lGj/0a2ITyu+WH1hLM/Q1/kn5QpehUeS/zp39XQE0jq42B++ZI7PIaDvm8rKvNBKf4iJsT5FXCdw+wTFDepmgqm0ysMKeLTtADRTzO8c5nZG9jSpxEAgOiRyw9tUeV+KwS3Bwst/4AUpZyjZbVAASAn1lmcJ0pCiUXi4C3oDahxvrCEjsbjk9VDD937fsKhE7CvcFo+bFAHddTGFME9ZJnoO0anV4LFkPRzF7+ptR4RpbL1LQOy+7aHIgnpq8Lvll7kJJPJX8hrCmqiElnQ03v4PmT4gfRksoQZ5H7hBZ2hy7zdqb97ojg4dD4pL5NqqyZDcS0UUPk8b7s9RNYScJ5W4vmb+l+kn3tFlys0st3L9pKVwyMFtB8IsqpDUijLXgefFUAC1RF6OJjpQT5aURRWJpWppSMBgtFQt9FzIKmn7uU5pMDSpfDFWRDbdV7KxtLWlxFkPN9gkYhKQ+EyGuZ10RVWXhY1uHLzsQFx9Yw8P0OcWEctOnoAeAoi8oSfKYrsr61X6R3mzZxZ7z9zDHugezcHV13Eylp7fzXS2n5ZvI8WoN/b8Ul3TV8O1sHvGhUJOXuthzOPhWa4vMugpwFEA/4lNt7/AcCJDcenuePMU2SUXDgYbOXCKEuems7fxtzmhlEcT1GZpgkiCAnLB9VqWHIwWUomdH27nj2+EK4h3wFqaHBtvicJWKJute/o9po0Unu+/Nn24ICQlzVmTt0499A3j9jSCDvEM+lGpIxqeYVn/xHtv535koJ+XehD6VnItVEOFwuwRlpF+p25AqwXW7wiBfJxXzwfoHjOCiE62/UkyXKtecTL+c1NBptMxZ7bsycGhDJLuTo/2QHrTkMTsCyiB11C0luhj61kWyJ2em8bjW1oRz7nUW5qIp5IlUzGLi5QHExD0w+DTEVujyDwSokAP/7U0Vyve4OTIpYojCoax85o3fqi8tZRuFn7/W8DDj7nb j/SrvToR dmmxwAOChY3LjevQ9hS1NyKXKdZCQ5H0CF3vsfaiSCBI9/K46IWr4W/70TR9iuqkUXfgLJYbma4E/vdPfGl2OcbESnRTmRFMU65hIG4aM6cet8RF7EOf4A7/+5kEeA21bcgzEh0TKD7KsBJxm5q2/wMOTvsXuj1PRmK3JxCxFt6SRdQmGK6sD2tlA/AFnKkJHOuo/fe04RekgDRR108cItOyA84BYEcAyMYQkNV5IVVGGG6AIoIBTpQAMzF0NVyu1JTLonEirF5opnJcrIevj6hVQkVSKgnLs6WZ1z1/yiKCCFYC0LWSQp+qorAbizxbnBPZHX1xaKufrbKH8qsz8by+izvn8miHFQiPQJbK6tAfnooyQLw9lk4mx0zSkMzASu4r4lwra/tZ8j4U= 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 Thu, 10 Apr 2025 16:50:33 +0200 Alexander Gordeev wrote: > On Tue, Apr 08, 2025 at 06:07:32PM +0200, Alexander Gordeev wrote: > > Hi Andrew, > > > The lazy MMU mode can only be entered and left under the protection > > of the page table locks for all page tables which may be modified. > > Heiko Carstens noticed that the above claim is not valid, since > v6.15-rc1 commit 691ee97e1a9d ("mm: fix lazy mmu docs and usage"), > which restates it to: > > "In the general case, no lock is guaranteed to be held between entry and exit > of the lazy mode. So the implementation must assume preemption may be enabled" > > That effectively invalidates this patch, so it needs to be dropped. > > Patch 2 still could be fine, except -stable and Fixes tags and it does > not need to aim 6.15-rcX. Do you want me to repost it? I dropped the whole series - let's start again.