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 2E70CE7716A for ; Tue, 17 Dec 2024 08:25:31 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 557BF6B00B9; Tue, 17 Dec 2024 03:25:30 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 506776B00BA; Tue, 17 Dec 2024 03:25:30 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 3A78E6B00BD; Tue, 17 Dec 2024 03:25:30 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id 195B56B00B9 for ; Tue, 17 Dec 2024 03:25:30 -0500 (EST) Received: from smtpin25.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id 69D03160551 for ; Tue, 17 Dec 2024 08:25:29 +0000 (UTC) X-FDA: 82903765602.25.21B52EF Received: from elvis.franken.de (elvis.franken.de [193.175.24.41]) by imf20.hostedemail.com (Postfix) with ESMTP id C8E581C0010 for ; Tue, 17 Dec 2024 08:24:54 +0000 (UTC) Authentication-Results: imf20.hostedemail.com; dkim=none; dmarc=none; spf=pass (imf20.hostedemail.com: domain of tsbogend@alpha.franken.de designates 193.175.24.41 as permitted sender) smtp.mailfrom=tsbogend@alpha.franken.de ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1734423899; a=rsa-sha256; cv=none; b=D1/OlKQKj4uMfZ1HJNTwo/yyx8gqVuVXSyAqI7zaBOpf3aUow9xQyOnLQwjbRphDd0iCgt QjTHiZ4haVoiG4hCKu16K3R6YyxfkBFDAhCd5RINH1ZEnKr7JkcvDp/nrTDu0ULgI4Eyhf 1TbEZB75OwWyxi/Qo/J/GWGk5/TqOzU= ARC-Authentication-Results: i=1; imf20.hostedemail.com; dkim=none; dmarc=none; spf=pass (imf20.hostedemail.com: domain of tsbogend@alpha.franken.de designates 193.175.24.41 as permitted sender) smtp.mailfrom=tsbogend@alpha.franken.de ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1734423899; 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: in-reply-to:in-reply-to:references:references; bh=7/az+N2sGPqut/Zc3lraHr1JqOTSqKGvEDcSq1M68UA=; b=dVcj2gkTfVMKKFRSe9kRitXRQ+8coKnvBVROVLIbT/nE2Ts8VaFAbvVffMmk5p8K2IRz4i cq0SMxNjF3xiPOVBHRZEYeW1nPXeA6mpZm6vv/gCPhLTmLPBxxvUPGCUIiUiirTFZTKKUZ UqcJRG0yNEVyrwWi4Q7T9EN+Glr8hGI= Received: from uucp by elvis.franken.de with local-rmail (Exim 3.36 #1) id 1tNSst-0002dn-00; Tue, 17 Dec 2024 09:24:51 +0100 Received: by alpha.franken.de (Postfix, from userid 1000) id 8B24FC0110; Tue, 17 Dec 2024 09:23:07 +0100 (CET) Date: Tue, 17 Dec 2024 09:23:07 +0100 From: Thomas Bogendoerfer To: Lorenzo Stoakes Cc: Andrew Morton , "Liam R . Howlett" , Vlastimil Babka , Jann Horn , linux-mm@kvack.org, linux-kernel@vger.kernel.org, linux-mips@vger.kernel.org Subject: Re: [RFC PATCH 0/2] mm: update mips to use do_mmap(), make mmap_region() internal Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: C8E581C0010 X-Stat-Signature: y6ccs8c6i4yhkze5uh167jb4ig7sawu7 X-Rspam-User: X-HE-Tag: 1734423894-72795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BSZHWaHia3e4h/Tlda51wE9xZ+9I/wcMRPqe4Lx/QgO06dwiODpfBq0kCOEV1PMi3qxzSQqe7h+iH1PuxP4PTD7UREgdcdwyPbXMSGE+RYII6c5z2yYGUOSMVX8UxyUvgIk43jygCwmzFfn5Abc83J X-Bogosity: Ham, tests=bogofilter, spamicity=0.014463, 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, Dec 12, 2024 at 03:36:45PM +0000, Lorenzo Stoakes wrote: > Currently the only user of mmap_region() outside of the memory management > code is the MIPS VDSO implementation. > > This uses mmap_region() to map a 'delay slot emulation page' at the top of > the stack which is read-only and executable. > > This mapping requires that an already-acquired mmap write lock is utilised > and that uffd and populate logic is ignored. This rules out vm_mmap(), > however do_mmap() fits the bill. > > Adapt this code to use do_mmap() and then once done, make mmap_region() > internal and userland testable, and avoid any other uses of mmap_region(), > which is absolutely and strictly an internal mm function which bypasses a > great number of checks and logic. > > REVIEWERS NOTES: > > Thomas - I lack the hardware or set up to test this beyond a simple > cross-compilation test, so I need some input from you MIPS guys as to > whether this is workable. > > I've therefore sent this as an RFC so we can be sure this is suitable! > Please could you check to make sure this change is OK and I haven't missed > anything? conversation looks correct, but this patch doesn't apply to upstream v6.13-rc1. Which tree are you using ? Thomas. -- Crap can work. Given enough thrust pigs will fly, but it's not necessarily a good idea. [ RFC1925, 2.3 ]