Patch "lib: reuse page_ext_data() to obtain codetag_ref" has been added to the 6.10-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    lib: reuse page_ext_data() to obtain codetag_ref

to the 6.10-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     lib-reuse-page_ext_data-to-obtain-codetag_ref.patch
and it can be found in the queue-6.10 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 065bc343e82832f6ca50801bbc8706a41d54c679
Author: Suren Baghdasaryan <surenb@xxxxxxxxxx>
Date:   Thu Jul 11 15:04:56 2024 -0700

    lib: reuse page_ext_data() to obtain codetag_ref
    
    [ Upstream commit fd8acc0097b91fab3104fa8a66ce2fd9cf8b0c11 ]
    
    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>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/include/linux/pgalloc_tag.h b/include/linux/pgalloc_tag.h
index 9cacadbd61f8c..acb1e9ce79815 100644
--- a/include/linux/pgalloc_tag.h
+++ b/include/linux/pgalloc_tag.h
@@ -15,7 +15,7 @@ extern struct page_ext_operations page_alloc_tagging_ops;
 
 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)




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux