diff options
| author | Lorenzo Stoakes <[email protected]> | 2025-06-18 19:42:52 +0000 |
|---|---|---|
| committer | Andrew Morton <[email protected]> | 2025-07-10 05:42:13 +0000 |
| commit | 78ddaa358ec4cdd60bd0e243ced1c83a52c30241 (patch) | |
| tree | 7730fcc5e4be2f60fa26eda461bfeb759cf51530 /tools/perf/builtin-annotate.c | |
| parent | Revert "mm: make alloc_demote_folio externally invokable for migration" (diff) | |
| download | kernel-78ddaa358ec4cdd60bd0e243ced1c83a52c30241.tar.gz kernel-78ddaa358ec4cdd60bd0e243ced1c83a52c30241.zip | |
mm: change vm_get_page_prot() to accept vm_flags_t argument
Patch series "use vm_flags_t consistently".
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.
This patch (of 3):
We abstract the type of the VMA flags to vm_flags_t, however in may places
it is simply assumed this is unsigned long, which is simply incorrect.
At the moment this is simply an incongruity, however in future we plan to
change this type and therefore this change is a critical requirement for
doing so.
Overall, this patch does not introduce any functional change.
[[email protected]: add missing vm_get_page_prot() instance, remove include]
Link: https://lkml.kernel.org/r/[email protected]
Link: https://lkml.kernel.org/r/[email protected]
Link: https://lkml.kernel.org/r/a12769720a2743f235643b158c4f4f0a9911daf0.1750274467.git.lorenzo.stoakes@oracle.com
Signed-off-by: Lorenzo Stoakes <[email protected]>
Acked-by: Mike Rapoport (Microsoft) <[email protected]>
Acked-by: Christian Brauner <[email protected]>
Reviewed-by: Vlastimil Babka <[email protected]>
Reviewed-by: Oscar Salvador <[email protected]>
Reviewed-by: Pedro Falcato <[email protected]>
Acked-by: Catalin Marinas <[email protected]> [arm64]
Acked-by: Zi Yan <[email protected]>
Acked-by: David Hildenbrand <[email protected]>
Reviewed-by: Anshuman Khandual <[email protected]>
Cc: Liam R. Howlett <[email protected]>
Cc: Lorenzo Stoakes <[email protected]>
Cc: Jann Horn <[email protected]>
Cc: Kees Cook <[email protected]>
Cc: Jan Kara <[email protected]>
Cc: Jarkko Sakkinen <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Diffstat (limited to 'tools/perf/builtin-annotate.c')
0 files changed, 0 insertions, 0 deletions
