Centos-kernel-stream-9/mm
Chris von Recklinghausen 468dfcb009 mm: kfence: pass a pointer to virt_to_page()
Bugzilla: https://bugzilla.redhat.com/2160210

commit 9e7ee421ac1f8d7fe350d2dee87e31919e9cba84
Author: Linus Walleij <linus.walleij@linaro.org>
Date:   Thu Jun 30 10:41:22 2022 +0200

    mm: kfence: pass a pointer to virt_to_page()

    Functions that work on a pointer to virtual memory such as virt_to_pfn()
    and users of that function such as virt_to_page() are supposed to pass a
    pointer to virtual memory, ideally a (void *) or other pointer.  However
    since many architectures implement virt_to_pfn() as a macro, this function
    becomes polymorphic and accepts both a (unsigned long) and a (void *).

    If we instead implement a proper virt_to_pfn(void *addr) function the
    following happens (occurred on arch/arm):

    mm/kfence/core.c:558:30: warning: passing argument 1
      of 'virt_to_pfn' makes pointer from integer without a
      cast [-Wint-conversion]

    In one case we can refer to __kfence_pool directly (and that is a proper
    (char *) pointer) and in the other call site we use an explicit cast.

    Link: https://lkml.kernel.org/r/20220630084124.691207-4-linus.walleij@linaro.org
    Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
    Reviewed-by: Marco Elver <elver@google.com>
    Cc: Alexander Potapenko <glider@google.com>
    Cc: Dmitry Vyukov <dvyukov@google.com>
    Cc: Jason Gunthorpe <jgg@nvidia.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>

Signed-off-by: Chris von Recklinghausen <crecklin@redhat.com>
2023-03-24 11:19:25 -04:00
..
damon mm/damon/lru_sort: fix potential memory leak in damon_lru_sort_init() 2023-03-24 11:19:22 -04:00
kasan kasan: separate double free case from invalid free 2023-03-24 11:19:24 -04:00
kfence mm: kfence: pass a pointer to virt_to_page() 2023-03-24 11:19:25 -04:00
Kconfig arch/*/: remove CONFIG_VIRT_TO_BUS 2023-03-24 11:19:15 -04:00
Kconfig.debug
Makefile mm: shrinkers: introduce debugfs interface for memory shrinkers 2023-03-24 11:19:17 -04:00
backing-dev.c
balloon_compaction.c
bootmem_info.c
cma.c
cma.h
cma_debug.c
cma_sysfs.c
compaction.c mm, docs: fix comments that mention mem_hotplug_end() 2023-03-24 11:19:20 -04:00
debug.c
debug_page_ref.c
debug_vm_pgtable.c docs: rename Documentation/vm to Documentation/mm 2023-03-24 11:19:15 -04:00
dmapool.c
early_ioremap.c
fadvise.c riscv: compat: syscall: Add compat_sys_call_table implementation 2023-03-24 11:18:51 -04:00
failslab.c mm: fix missing handler for __GFP_NOWARN 2023-03-24 11:19:11 -04:00
filemap.c filemap: Use filemap_read_folio() in do_read_cache_folio() 2023-03-24 11:19:16 -04:00
folio-compat.c fs: Remove aop flags parameter from grab_cache_page_write_begin() 2023-03-24 11:18:58 -04:00
frontswap.c docs: rename Documentation/vm to Documentation/mm 2023-03-24 11:19:15 -04:00
gup.c mm/gup: migrate device coherent pages when pinning instead of failing 2023-03-24 11:19:23 -04:00
gup_test.c mm: rename is_pinnable_page() to is_longterm_pinnable_page() 2023-03-24 11:19:22 -04:00
gup_test.h
highmem.c mm/highmem: pass a pointer to virt_to_page() 2023-03-24 11:19:25 -04:00
hmm.c mm: teach core mm about pte markers 2023-03-24 11:19:04 -04:00
huge_memory.c mm: khugepaged: reorg some khugepaged helpers 2023-03-24 11:19:24 -04:00
hugetlb.c hugetlb: do not update address in huge_pmd_unshare 2023-03-24 11:19:24 -04:00
hugetlb_cgroup.c
hugetlb_vmemmap.c mm: memory_hotplug: make hugetlb_optimize_vmemmap compatible with memmap_on_memory 2023-03-24 11:19:20 -04:00
hugetlb_vmemmap.h
hwpoison-inject.c mm/hwpoison: disable hwpoison filter during removing 2023-03-24 11:19:08 -04:00
init-mm.c
internal.h mm/gup: migrate device coherent pages when pinning instead of failing 2023-03-24 11:19:23 -04:00
interval_tree.c
io-mapping.c
ioremap.c mm: ioremap: Add ioremap/iounmap_allowed() 2023-03-24 11:19:15 -04:00
khugepaged.c mm: khugepaged: reorg some khugepaged helpers 2023-03-24 11:19:24 -04:00
kmemleak.c mm/kmemleak: fix UAF bug in kmemleak_scan() 2023-02-07 14:25:16 -05:00
ksm.c docs: rename Documentation/vm to Documentation/mm 2023-03-24 11:19:15 -04:00
list_lru.c mm: kmem: make mem_cgroup_from_obj() vmalloc()-safe 2023-03-24 11:19:15 -04:00
maccess.c
madvise.c mm/madvise: minor cleanup for swapin_walk_pmd_entry() 2023-03-24 11:19:20 -04:00
mapping_dirty_helpers.c
memblock.c memblock: avoid some repeat when add new range 2023-03-24 11:19:16 -04:00
memcontrol.c mm/memcontrol.c: replace cgroup_memory_nokmem with mem_cgroup_kmem_disabled() 2023-03-24 11:19:25 -04:00
memfd.c
memory-failure.c mm: factor helpers for memory_failure_dev_pagemap 2023-03-24 11:19:23 -04:00
memory.c hugetlb: lazy page table copies in fork() 2023-03-24 11:19:24 -04:00
memory_hotplug.c mm: memory_hotplug: make hugetlb_optimize_vmemmap compatible with memmap_on_memory 2023-03-24 11:19:20 -04:00
mempolicy.c mm/mempolicy: fix uninit-value in mpol_rebind_policy() 2023-03-24 11:19:11 -04:00
mempool.c mm/mempool: use might_alloc() 2023-03-24 11:19:14 -04:00
memremap.c mm: add zone device coherent type memory support 2023-03-24 11:19:23 -04:00
memtest.c
migrate.c mm/migrate: convert move_to_new_page() into move_to_new_folio() 2023-03-24 11:19:07 -04:00
migrate_device.c mm/gup: migrate device coherent pages when pinning instead of failing 2023-03-24 11:19:23 -04:00
mincore.c mm: teach core mm about pte markers 2023-03-24 11:19:04 -04:00
mlock.c
mm_init.c
mmap.c docs: rename Documentation/vm to Documentation/mm 2023-03-24 11:19:15 -04:00
mmap_lock.c
mmu_gather.c mm/mmu_gather: limit free batch count and add schedule point in tlb_batch_pages_flush 2023-03-24 11:18:55 -04:00
mmu_notifier.c
mmzone.c
mprotect.c mm/hugetlb: handle UFFDIO_WRITEPROTECT 2023-03-24 11:19:04 -04:00
mremap.c mm/mremap: avoid unneeded do_munmap call 2023-03-24 11:18:55 -04:00
msync.c
nommu.c
oom_kill.c mm/oom_kill.c: fix vm_oom_kill_table[] ifdeffery 2023-03-24 11:19:13 -04:00
page-writeback.c filemap: Update the folio_mark_dirty documentation 2023-03-24 11:18:58 -04:00
page_alloc.c mm/page_alloc: replace local_lock with normal spinlock 2023-03-24 11:19:25 -04:00
page_counter.c
page_ext.c
page_idle.c mm: don't be stuck to rmap lock on reclaim path 2023-03-24 11:19:11 -04:00
page_io.c MM: handle THP in swap_*page_fs() - count_vm_events() 2023-03-24 11:19:01 -04:00
page_isolation.c mm/page_isolation.c: fix one kernel-doc comment 2023-03-24 11:19:13 -04:00
page_owner.c mm/page_owner.c: add missing __initdata attribute 2023-03-24 11:19:11 -04:00
page_poison.c
page_reporting.c mm/page_reporting: Add checks for page_reporting_order param 2023-03-01 22:54:19 +02:00
page_reporting.h
page_table_check.c mm: page_table_check: move pxx_user_accessible_page into x86 2023-03-24 11:19:07 -04:00
page_vma_mapped.c mm/page_vma_mapped.c: check possible huge PMD map with transhuge_vma_suitable() 2023-03-24 11:19:16 -04:00
pagewalk.c
percpu-internal.h percpu: improve percpu_alloc_percpu event trace 2023-03-24 11:19:08 -04:00
percpu-km.c
percpu-stats.c
percpu-vm.c
percpu.c percpu: improve percpu_alloc_percpu event trace 2023-03-24 11:19:08 -04:00
pgalloc-track.h
pgtable-generic.c mm: avoid unnecessary flush on change_huge_pmd() 2023-03-24 11:19:02 -04:00
process_vm_access.c
ptdump.c
readahead.c filemap: Don't release a locked folio 2023-03-24 11:19:13 -04:00
rmap.c hugetlb: do not update address in huge_pmd_unshare 2023-03-24 11:19:24 -04:00
rodata_test.c
secretmem.c mm: create security context for memfd_secret inodes 2023-03-24 11:19:13 -04:00
shmem.c mm/swap: convert delete_from_swap_cache() to take a folio 2023-03-24 11:19:20 -04:00
shrinker_debug.c mm: shrinkers: add scan interface for shrinker debugfs 2023-03-24 11:19:17 -04:00
shuffle.c
shuffle.h
slab.c mm: slab: optimize memcg_slab_free_hook() 2023-03-24 11:19:21 -04:00
slab.h mm: slab: optimize memcg_slab_free_hook() 2023-03-24 11:19:21 -04:00
slab_common.c mm/tracing: add 'accounted' entry into output of allocation tracepoints 2023-03-24 11:19:21 -04:00
slob.c mm/tracing: add 'accounted' entry into output of allocation tracepoints 2023-03-24 11:19:21 -04:00
slub.c mm: slab: optimize memcg_slab_free_hook() 2023-03-24 11:19:21 -04:00
sparse-vmemmap.c mm: sparsemem: drop unexpected word 'a' in comments 2023-03-24 11:19:21 -04:00
sparse.c mm: memory_hotplug: enumerate all supported section flags 2023-03-24 11:19:20 -04:00
swap.c mm: convert destroy_compound_page() to destroy_large_folio() 2023-03-24 11:19:20 -04:00
swap.h mm/khugepaged: try to free transhuge swapcache when possible 2023-03-24 11:19:21 -04:00
swap_cgroup.c mm: memcontrol: don't allocate cgroup swap arrays when memcg is disabled 2023-01-10 13:30:14 -05:00
swap_slots.c mm/swap: remove buggy cache->nr check in refill_swap_slots_cache 2023-03-24 11:19:10 -04:00
swap_state.c mm/swap: convert __delete_from_swap_cache() to a folio 2023-03-24 11:19:20 -04:00
swapfile.c mm/swap: convert delete_from_swap_cache() to take a folio 2023-03-24 11:19:20 -04:00
truncate.c mm: Remove __delete_from_page_cache() 2023-03-24 11:19:15 -04:00
usercopy.c usercopy: use unsigned long instead of uintptr_t 2023-03-24 11:19:16 -04:00
userfaultfd.c mm/uffd: enable write protection for shmem & hugetlbfs 2023-03-24 11:19:04 -04:00
util.c docs: rename Documentation/vm to Documentation/mm 2023-03-24 11:19:15 -04:00
vmacache.c
vmalloc.c mm/vmalloc: extend __find_vmap_area() with one more argument 2023-03-24 11:19:18 -04:00
vmpressure.c
vmscan.c mm, docs: fix comments that mention mem_hotplug_end() 2023-03-24 11:19:20 -04:00
vmstat.c mm/vmstat: replace cpumask_weight with cpumask_empty where appropriate 2023-03-24 11:19:13 -04:00
workingset.c mm: shrinkers: provide shrinkers with names 2023-03-24 11:19:17 -04:00
z3fold.c
zbud.c
zpool.c
zsmalloc.c mm: shrinkers: provide shrinkers with names 2023-03-24 11:19:17 -04:00
zswap.c mm: create new mm/swap.h header file 2023-03-24 11:19:00 -04:00