From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 33F3E16E863; Wed, 25 Jun 2025 02:55:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750820160; cv=none; b=idsZvv9VfQT6jpe+U3dCb2LYwavRy+hkvKJC+LCo3u5dH6DP9GbzWfcLguOjSRmS5TzQJ6RlYS6RcFAEh2D7tM5GiPvf9cDn9hlBKkHkY7O1eg3LT1+JpkkcNHe+iiO8DAZK5MXeCkF1Tllmq5BWJoWv/JPwPsKIAa3BD73D2n8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750820160; c=relaxed/simple; bh=UtkW3qucY6iNeZ6QdEnlpOKX0CFNUk0ZJoZv9+yY7WU=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=IQhIPzF2wj6dYwpA9zfs7jtqxXBYuu9e5qJ5u4eo1gw9P/LDAFnoxECdeaHFOvs84WkeR6wWXFRlyaiv1j5iUhklmorYKC/HJNOSYb5MqNzhi3jYxWjJV2kSe4GB8yo9nhzqLCQBZ/PFxyoYDNQky1B3PF06WW8Hnp6uzwvV3Fs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 4927B12FC; Tue, 24 Jun 2025 19:55:40 -0700 (PDT) Received: from [10.164.146.16] (J09HK2D2RT.blr.arm.com [10.164.146.16]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 4F6A63F58B; Tue, 24 Jun 2025 19:55:38 -0700 (PDT) Message-ID: <46432a2e-1a9d-44f7-aa09-689d6e2a022a@arm.com> Date: Wed, 25 Jun 2025 08:25:35 +0530 Precedence: bulk X-Mailing-List: sparclinux@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 0/3] use vm_flags_t consistently To: Lorenzo Stoakes , Andrew Morton Cc: 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 , Mike Rapoport , 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 References: Content-Language: en-US From: Anshuman Khandual In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 19/06/25 1:12 AM, 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 Hello Lorenzo, Just wondering which tree-branch this series applies ? Tried all the usual ones but could not apply the series cleanly. v6.16-rc3 next-20250624 mm-stable mm-unstable b4 am cover.1750274467.git.lorenzo.stoakes@oracle.com git am ./20250618_lorenzo_stoakes_use_vm_flags_t_consistently.mbx - Anshuman