Lines Matching +full:page +full:- +full:based

1 /* SPDX-License-Identifier: GPL-2.0 */
6 #include <linux/kasan-enabled.h>
7 #include <linux/kasan-tags.h>
13 struct page;
109 void __kasan_poison_pages(struct page *page, unsigned int order, bool init);
110 static __always_inline void kasan_poison_pages(struct page *page, in kasan_poison_pages() argument
114 __kasan_poison_pages(page, order, init); in kasan_poison_pages()
117 bool __kasan_unpoison_pages(struct page *page, unsigned int order, bool init);
118 static __always_inline bool kasan_unpoison_pages(struct page *page, in kasan_unpoison_pages() argument
122 return __kasan_unpoison_pages(page, order, init); in kasan_unpoison_pages()
135 * kasan_unpoison_new_object - Temporarily unpoison a new slab object.
153 * kasan_unpoison_new_object - Repoison a new slab object.
235 bool __kasan_mempool_poison_pages(struct page *page, unsigned int order,
238 * kasan_mempool_poison_pages - Check and poison a mempool page allocation.
239 * @page: Pointer to the page allocation.
242 * This function is intended for kernel subsystems that cache page allocations
246 * page allocations.
253 static __always_inline bool kasan_mempool_poison_pages(struct page *page, in kasan_mempool_poison_pages() argument
257 return __kasan_mempool_poison_pages(page, order, _RET_IP_); in kasan_mempool_poison_pages()
261 void __kasan_mempool_unpoison_pages(struct page *page, unsigned int order,
264 * kasan_mempool_unpoison_pages - Unpoison a mempool page allocation.
265 * @page: Pointer to the page allocation.
268 * This function is intended for kernel subsystems that cache page allocations
271 * This function unpoisons a page allocation that was previously poisoned by
273 * the tag-based modes, this function assigns a new tag to the allocation.
275 static __always_inline void kasan_mempool_unpoison_pages(struct page *page, in kasan_mempool_unpoison_pages() argument
279 __kasan_mempool_unpoison_pages(page, order, _RET_IP_); in kasan_mempool_unpoison_pages()
284 * kasan_mempool_poison_object - Check and poison a mempool slab allocation.
295 * This function also performs checks to detect double-free and invalid-free
317 * kasan_mempool_unpoison_object - Unpoison a mempool slab allocation.
327 * initializing the allocation's memory. For the tag-based modes, this function
329 * original tags based on the pointer value.
344 * the hardware tag-based mode that doesn't rely on compiler instrumentation.
357 static inline void kasan_poison_pages(struct page *page, unsigned int order, in kasan_poison_pages() argument
359 static inline bool kasan_unpoison_pages(struct page *page, unsigned int order, in kasan_unpoison_pages() argument
398 static inline bool kasan_mempool_poison_pages(struct page *page, unsigned int order) in kasan_mempool_poison_pages() argument
402 static inline void kasan_mempool_unpoison_pages(struct page *page, unsigned int order) {} in kasan_mempool_unpoison_pages() argument
443 /* Tag-based KASAN modes do not use per-object metadata. */
454 /* And no cache-related metadata initialization is required. */
474 * kasan_report - print a report about a bad memory access detected by KASAN