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 lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 43E34C71136 for ; Thu, 19 Jun 2025 05:48:14 +0000 (UTC) Received: from boromir.ozlabs.org (localhost [127.0.0.1]) by lists.ozlabs.org (Postfix) with ESMTP id 4bN8lx4ND0z2xRs; Thu, 19 Jun 2025 15:48:13 +1000 (AEST) Authentication-Results: lists.ozlabs.org; arc=none smtp.remote-ip=139.178.84.217 ARC-Seal: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1750312093; cv=none; b=Bb7Ekm7R4Hn6HQZE/ev75ikHGFFIfIdbOv4QAhtFlA4dyIGnM2zKj9UJk/ickZdXJRxZoVzAlKQJtSfy6oo+Z4YIFtLGew0T5HeDWarIpkZHKwVu9aiCgBAyHbqLCjgAJs6AbVX033FqewL1C1i5jrdeXETVI0oGRGFZgfIL+yE1yddiEvz2BXH/1r3++GTeDt85qYVRPlckKyB+tkuFB6RD9tl0uT815vP96K00klIAX7GUMOLulUEsg7f/c8MbjpBBlDeTYxLyshuump+XBkMJMpHBqutF0oKJy97JcldgBTYUMCbhXynaEwURS6jcPMfXYQl240tMjO+p4ivQ3g== ARC-Message-Signature: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1750312093; c=relaxed/relaxed; bh=wiINCdMehZMum17SdacCo/Mcez/8aysjKMpzrYn8xpc=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=ZZBOZH7EnqIqYGVgOWKSwjUfF790GwMcSvAExnLsU1kU0sJLFrul+zc5JqvoJYhoyZwDmIJkrza/8ntWbQCd4usiJfO5htMWzk6r3hEFuDaFYByaRxnP/2Jovr42NmLwcv2rFlYyjBSVqGWBjNL0qhkF0Pk3+HBGAqpPAdgTYO/Dj/+CqdnUlbYfHZkgu/nNmAKL9LB2dpbK69qYo3aflrY5GStLMyDm/a6GNw4cBwsFL2D6t6LFDrrJ+TF1kzhbgutR8yM0Lr3sj3w7DA+Zs7/+ycmWJvNwgDmAp7Fdw5h36GDVjC33xM2SSxH0+PHMTI+UNBkDYI0YjBTtZmUH+A== ARC-Authentication-Results: i=1; lists.ozlabs.org; dmarc=pass (p=quarantine dis=none) header.from=kernel.org; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=IjXP7rVJ; dkim-atps=neutral; spf=pass (client-ip=139.178.84.217; helo=dfw.source.kernel.org; envelope-from=rppt@kernel.org; receiver=lists.ozlabs.org) smtp.mailfrom=kernel.org Authentication-Results: lists.ozlabs.org; dmarc=pass (p=quarantine dis=none) header.from=kernel.org Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=IjXP7rVJ; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=kernel.org (client-ip=139.178.84.217; helo=dfw.source.kernel.org; envelope-from=rppt@kernel.org; receiver=lists.ozlabs.org) Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4bN8lw2SWGz2xHZ for ; Thu, 19 Jun 2025 15:48:12 +1000 (AEST) Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id 438AC5C18B4; Thu, 19 Jun 2025 05:45:52 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2DCB9C4CEEA; Thu, 19 Jun 2025 05:47:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1750312088; bh=naO5r0xMIhdjbn0oOa+SVmj9KjDZ5worxHK7bSVntUk=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=IjXP7rVJ7AZnRuppJyLrpp5E8Fh+t+2oljLVnWBBBSn/d1vR0eGIWRYGA9tuTPZxk 1WjJMU7H0LqXwDq8R0BlorxkYnEHHHlDMoVIzC4TN0b7sC1cULh3G+MWJHwVH7xkz9 tCPMfdyKM5V0i4bvNc7Nmlusq60gK1you1vNrbR0OMNiLtHUI3nfQN0juBAxkHM6/o ts+aKMfmoW7KUXQXeNQG3kObJpnfs/6SAEy+ZvEIdSUbOESxfPgslyESbzwTawbWW0 0p+BbIlpITQh6XRqByB/6dGMmYRgJ3In9Qc8ufkd7ZoKCLwjJIVuYBHy37Sjo6Og4z FW+uh64HrHsSA== Date: Thu, 19 Jun 2025 08:47:46 +0300 From: Mike Rapoport To: Lorenzo Stoakes Cc: Andrew Morton , Russell King , Catalin Marinas , Will Deacon , Madhavan Srinivasan , Michael Ellerman , Nicholas Piggin , Christophe Leroy , "David S . Miller" , Andreas Larsson , Jarkko Sakkinen , Dave Hansen , Thomas Gleixner , Ingo Molnar , Borislav Petkov , "H . Peter Anvin" , Andy Lutomirski , Peter Zijlstra , Alexander Viro , Christian Brauner , Jan Kara , Kees Cook , Peter Xu , David Hildenbrand , Zi Yan , Baolin Wang , "Liam R . Howlett" , Nico Pache , Ryan Roberts , Dev Jain , Barry Song , Xu Xin , Chengming Zhou , Hugh Dickins , Vlastimil Babka , Suren Baghdasaryan , Michal Hocko , Rik van Riel , Harry Yoo , Dan Williams , Matthew Wilcox , Steven Rostedt , Masami Hiramatsu , Mathieu Desnoyers , Jason Gunthorpe , John Hubbard , Muchun Song , Oscar Salvador , Jann Horn , Pedro Falcato , Johannes Weiner , Qi Zheng , Shakeel Butt , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, kvm@vger.kernel.org, sparclinux@vger.kernel.org, linux-sgx@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, nvdimm@lists.linux.dev, linux-trace-kernel@vger.kernel.org Subject: Re: [PATCH 0/3] use vm_flags_t consistently Message-ID: References: X-Mailing-List: linuxppc-dev@lists.ozlabs.org List-Id: List-Help: List-Owner: List-Post: List-Archive: , List-Subscribe: , , List-Unsubscribe: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Wed, Jun 18, 2025 at 08:42:51PM +0100, Lorenzo Stoakes wrote: > The VMA flags field vma->vm_flags is of type vm_flags_t. Right now this is > exactly equivalent to unsigned long, but it should not be assumed to be. > > Much code that references vma->vm_flags already correctly uses vm_flags_t, > but a fairly large chunk of code simply uses unsigned long and assumes that > the two are equivalent. > > This series corrects that and has us use vm_flags_t consistently. > > This series is motivated by the desire to, in a future series, adjust > vm_flags_t to be a u64 regardless of whether the kernel is 32-bit or 64-bit > in order to deal with the VMA flag exhaustion issue and avoid all the > various problems that arise from it (being unable to use certain features > in 32-bit, being unable to add new flags except for 64-bit, etc.) > > This is therefore a critical first step towards that goal. At any rate, > using the correct type is of value regardless. > > We additionally take the opportunity to refer to VMA flags as vm_flags > where possible to make clear what we're referring to. > > Overall, this series does not introduce any functional change. > > Lorenzo Stoakes (3): > mm: change vm_get_page_prot() to accept vm_flags_t argument > mm: update core kernel code to use vm_flags_t consistently > mm: update architecture and driver code to use vm_flags_t For the series Acked-by: Mike Rapoport (Microsoft) > arch/arm/mm/fault.c | 2 +- > arch/arm64/include/asm/mman.h | 10 +- > arch/arm64/mm/fault.c | 2 +- > arch/arm64/mm/mmap.c | 2 +- > arch/arm64/mm/mmu.c | 2 +- > arch/powerpc/include/asm/book3s/64/pkeys.h | 3 +- > arch/powerpc/include/asm/mman.h | 2 +- > arch/powerpc/include/asm/pkeys.h | 4 +- > arch/powerpc/kvm/book3s_hv_uvmem.c | 2 +- > arch/sparc/include/asm/mman.h | 4 +- > arch/sparc/mm/init_64.c | 2 +- > arch/x86/kernel/cpu/sgx/encl.c | 8 +- > arch/x86/kernel/cpu/sgx/encl.h | 2 +- > arch/x86/mm/pgprot.c | 2 +- > fs/exec.c | 2 +- > fs/userfaultfd.c | 2 +- > include/linux/coredump.h | 2 +- > include/linux/huge_mm.h | 12 +- > include/linux/khugepaged.h | 4 +- > include/linux/ksm.h | 4 +- > include/linux/memfd.h | 4 +- > include/linux/mm.h | 10 +- > include/linux/mm_types.h | 2 +- > include/linux/mman.h | 4 +- > include/linux/pgtable.h | 2 +- > include/linux/rmap.h | 4 +- > include/linux/userfaultfd_k.h | 4 +- > include/trace/events/fs_dax.h | 6 +- > mm/debug.c | 2 +- > mm/execmem.c | 8 +- > mm/filemap.c | 2 +- > mm/gup.c | 2 +- > mm/huge_memory.c | 2 +- > mm/hugetlb.c | 4 +- > mm/internal.h | 4 +- > mm/khugepaged.c | 4 +- > mm/ksm.c | 2 +- > mm/madvise.c | 4 +- > mm/mapping_dirty_helpers.c | 2 +- > mm/memfd.c | 8 +- > mm/memory.c | 4 +- > mm/mmap.c | 16 +- > mm/mprotect.c | 8 +- > mm/mremap.c | 2 +- > mm/nommu.c | 12 +- > mm/rmap.c | 4 +- > mm/shmem.c | 6 +- > mm/userfaultfd.c | 14 +- > mm/vma.c | 78 +++--- > mm/vma.h | 16 +- > mm/vmscan.c | 4 +- > tools/testing/vma/vma.c | 266 ++++++++++----------- > tools/testing/vma/vma_internal.h | 12 +- > 53 files changed, 298 insertions(+), 297 deletions(-) > > -- > 2.49.0 -- Sincerely yours, Mike.