The patch titled Subject: lib: reuse page_ext_data() to obtain codetag_ref has been added to the -mm mm-unstable branch. Its filename is lib-reuse-page_ext_data-to-obtain-codetag_ref.patch This patch will shortly appear at https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/lib-reuse-page_ext_data-to-obtain-codetag_ref.patch This patch will later appear in the mm-unstable branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/process/submit-checklist.rst when testing your code *** The -mm tree is included into linux-next via the mm-everything branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm and is updated there every 2-3 working days ------------------------------------------------------ From: Suren Baghdasaryan <surenb@xxxxxxxxxx> Subject: lib: reuse page_ext_data() to obtain codetag_ref Date: Thu, 11 Jul 2024 15:04:56 -0700 codetag_ref_from_page_ext() reimplements the same calculation as page_ext_data(). Reuse existing function instead. Link: https://lkml.kernel.org/r/20240711220457.1751071-2-surenb@xxxxxxxxxx Fixes: dcfe378c81f7 ("lib: introduce support for page allocation tagging") Signed-off-by: Suren Baghdasaryan <surenb@xxxxxxxxxx> Cc: Kees Cook <keescook@xxxxxxxxxxxx> Cc: Kent Overstreet <kent.overstreet@xxxxxxxxx> Cc: Pasha Tatashin <pasha.tatashin@xxxxxxxxxx> Cc: Sourav Panda <souravpanda@xxxxxxxxxx> Cc: Vlastimil Babka <vbabka@xxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- include/linux/pgalloc_tag.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/include/linux/pgalloc_tag.h~lib-reuse-page_ext_data-to-obtain-codetag_ref +++ a/include/linux/pgalloc_tag.h @@ -15,7 +15,7 @@ extern struct page_ext_operations page_a static inline union codetag_ref *codetag_ref_from_page_ext(struct page_ext *page_ext) { - return (void *)page_ext + page_alloc_tagging_ops.offset; + return (union codetag_ref *)page_ext_data(page_ext, &page_alloc_tagging_ops); } static inline struct page_ext *page_ext_from_codetag_ref(union codetag_ref *ref) _ Patches currently in -mm which might be from surenb@xxxxxxxxxx are alloc_tag-export-memory-allocation-profiling-symbols-used-by-modules.patch mm-add-comments-for-allocation-helpers-explaining-why-they-are-macros.patch lib-add-missing-newline-character-in-the-warning-message.patch lib-reuse-page_ext_data-to-obtain-codetag_ref.patch alloc_tag-fix-page_ext_get-page_ext_put-sequence-during-page-splitting.patch