android_kernel_xiaomi_sm8450/mm
Carlos Galo 050c668fef FROMGIT: BACKPORT: mm: update mark_victim tracepoints fields
The current implementation of the mark_victim tracepoint provides only the
process ID (pid) of the victim process.  This limitation poses challenges
for userspace tools that need additional information about the OOM victim.
The association between pid and the additional data may be lost after the
kill, making it difficult for userspace to correlate the OOM event with
the specific process.

In order to mitigate this limitation, add the following fields:

- UID
   In Android each installed application has a unique UID. Including
   the `uid` assists in correlating OOM events with specific apps.

- Process Name (comm)
   Enables identification of the affected process.

- OOM Score
   Allows userspace to get additional insights of the relative kill
   priority of the OOM victim.

Link: https://lkml.kernel.org/r/20240111210539.636607-1-carlosgalo@google.com
Change-Id: Icc3ed013a9dfff9bb09f1d7588757e6028c17069
Signed-off-by: Carlos Galo <carlosgalo@google.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Suren Baghdasaryan <surenb@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
(cherry picked from commit 649ffb4cbb90a7f60f17dd74e57d814e762ea01d mm-unstable)
[ carlosgalo: Manually added struct cred change in mark_oom_victim function ]

Bug: 315560026
Change-Id: I81fb6f3447f432100ad4cd25e22db23768003388
Signed-off-by: Carlos Galo <carlosgalo@google.com>
2024-01-18 18:20:12 +00:00
..
damon UPSTREAM: mm/damon/dbgfs: check if rm_contexts input is for a real context 2023-04-13 07:58:36 +01:00
kasan Merge 5.10.166 into android12-5.10-lts 2023-02-17 12:18:56 +00:00
kfence UPSTREAM: kfence: avoid passing -g for test 2023-09-08 12:39:57 +01:00
backing-dev.c writeback, cgroup: remove extra percpu_ref_exit() 2023-05-30 12:57:56 +01:00
balloon_compaction.c
cleancache.c
cma_debug.c FROMLIST: mm: cma: introduce gfp flag in cma_alloc instead of no_warn 2021-01-25 12:21:02 -08:00
cma_sysfs.c ANDROID: make cma_sysfs experimental 2021-03-25 19:20:18 +00:00
cma.c BACKPORT: Revert "mm/cma.c: remove redundant cma_mutex lock" 2022-11-16 14:48:59 +00:00
cma.h ANDROID: GKI: add OEM data in cma struct 2021-06-04 11:15:16 -07:00
compaction.c ANDROID: vendor_hook: Add hook to abort reclaim and compaction 2023-07-18 17:31:55 +00:00
debug_page_ref.c
debug_vm_pgtable.c mm/debug_vm_pgtable: remove pte entry from the page table 2022-02-08 18:30:35 +01:00
debug.c ANDROID: mm: introduce page_pinner 2021-04-30 09:13:34 -07:00
dmapool.c mm/dmapool.c: replace hard coded function name with __func__ 2020-10-13 18:38:32 -07:00
early_ioremap.c
fadvise.c mm, fadvise: improve the expensive remote LRU cache draining after FADV_DONTNEED 2020-10-13 18:38:29 -07:00
failslab.c
filemap.c This is the 5.10.197 stable release 2023-10-26 17:52:15 +00:00
frame_vector.c media: vb2: frame_vector.c: replace WARN_ONCE with a comment 2023-10-10 21:53:33 +02:00
frontswap.c mm/frontswap: mark various intentional data races 2020-08-14 19:56:56 -07:00
gup_benchmark.c mm/gup_benchmark: take the mmap lock around GUP 2020-10-18 09:27:09 -07:00
gup.c Merge 5.10.168 into android12-5.10-lts 2023-02-17 15:23:41 +00:00
highmem.c mm/highmem.c: clean up endif comments 2020-10-16 11:11:18 -07:00
hmm.c mm/hmm.c: allow VM_MIXEDMAP to work with hmm_range_fault 2022-01-27 10:54:36 +01:00
huge_memory.c This is the 5.10.176 stable release 2023-03-24 16:03:04 +00:00
hugetlb_cgroup.c hugetlb_cgroup: fix imbalanced css_get and css_put pair for shared mappings 2021-03-30 14:31:54 +02:00
hugetlb.c BACKPORT: hugetlb: unshare some PMDs when splitting VMAs 2023-04-13 18:04:03 +01:00
hwpoison-inject.c mm,hwpoison-inject: don't pin for hwpoison_filter 2020-10-16 11:11:16 -07:00
init-mm.c FROMLIST: mm: protect mm_rb tree with a rwlock 2021-01-22 18:00:57 +00:00
internal.h Linux 5.10.47 2021-06-30 19:38:46 +02:00
interval_tree.c
ioremap.c mm: move p?d_alloc_track to separate header file 2020-08-07 11:33:26 -07:00
Kconfig ANDROID: mm: disable speculative page faults for CONFIG_NUMA 2022-11-27 09:32:29 -08:00
Kconfig.debug ANDROID: mm: introduce page_pinner 2021-04-30 09:13:34 -07:00
khugepaged.c This is the 5.10.179 stable release 2023-06-16 09:49:29 +00:00
kmemleak.c This is the 5.10.143 stable release 2022-09-22 14:38:08 +02:00
ksm.c BACKPORT: mm: don't be stuck to rmap lock on reclaim path 2022-10-11 16:33:36 +00:00
list_lru.c mm: list_lru: set shrinker map bit when child nr_items is not zero 2020-12-06 10:19:07 -08:00
maccess.c maccess: Fix writing offset in case of fault in strncpy_from_kernel_nofault() 2022-11-25 17:45:53 +01:00
madvise.c ANDROID: Add Interrupt Hook for madvise Compression 2023-11-01 19:07:41 +00:00
Makefile UPSTREAM: mm: introduce Data Access MONitor (DAMON) 2022-04-28 23:09:14 +08:00
mapping_dirty_helpers.c
memblock.c This is the 5.10.169 stable release 2023-02-25 15:32:12 +00:00
memcontrol.c ANDROID: Export symbols to do reverse mapping within memcg in kernel modules. 2023-08-23 12:33:26 +00:00
memfd.c memfd: check for non-NULL file_seals in memfd_create() syscall 2023-06-28 10:28:09 +02:00
memory_hotplug.c Merge 5.10.185 into android12-5.10-lts 2023-06-28 10:31:14 +00:00
memory-failure.c This is the 5.10.193 stable release 2023-08-31 18:29:19 +00:00
memory.c ANDROID: vendor_hook: Add hook to skip swapcache 2023-09-18 15:46:03 +08:00
mempolicy.c Merge 5.10.168 into android12-5.10-lts 2023-02-17 15:23:41 +00:00
mempool.c FROMGIT: kasan: use separate (un)poison implementation for integrated init 2021-06-17 14:39:37 -07:00
memremap.c mm/memremap.c: map FS_DAX device memory as decrypted 2022-11-16 09:57:17 +01:00
memtest.c
migrate.c Merge 5.10.168 into android12-5.10-lts 2023-02-17 15:23:41 +00:00
mincore.c mm: factor find_get_incore_page out of mincore_page 2020-10-13 18:38:29 -07:00
mlock.c ANDROID: mm: page_pinner: unattribute follow_page in munlock_vma_pages_range 2021-04-30 09:13:35 -07:00
mm_init.c mm: adjust vm_committed_as_batch according to vm overcommit policy 2020-08-07 11:33:26 -07:00
mmap.c Merge tag 'android12-5.10.160_r00' into android12-5.10 2023-01-21 12:06:54 +00:00
mmu_gather.c mm/khugepaged: fix GUP-fast interaction by sending IPI 2022-12-14 11:31:55 +01:00
mmu_notifier.c This is the 5.10.113 stable release 2022-05-12 11:23:35 +02:00
mmzone.c This is the 5.10.116 stable release 2022-05-16 08:45:59 +02:00
mprotect.c This is the 5.10.102 stable release 2022-02-23 12:56:37 +01:00
mremap.c ANDROID: Re-enable fast mremap and fix UAF with SPF 2023-01-06 13:08:36 -08:00
msync.c mmap locking API: use coccinelle to convert mmap_sem rwsem call sites 2020-06-09 09:39:14 -07:00
nommu.c ANDROID: mm: allow vmas with vm_ops to be speculatively handled 2021-04-23 18:42:39 -07:00
oom_kill.c FROMGIT: BACKPORT: mm: update mark_victim tracepoints fields 2024-01-18 18:20:12 +00:00
page_alloc.c Merge tag 'android12-5.10.185_r00' into android12-5.10 2023-07-10 16:27:04 +00:00
page_counter.c mm/page_counter: correct the obsolete func name in the comment of page_counter_try_charge() 2020-10-13 18:38:30 -07:00
page_ext.c UPSTREAM: mm/page_exit: fix kernel doc warning in page_ext_put() 2023-04-13 07:58:37 +01:00
page_idle.c BACKPORT: mm: don't be stuck to rmap lock on reclaim path 2022-10-11 16:33:36 +00:00
page_io.c ANDROID: vendor_hooks: Add hooks to record the I/O statistics of swap: 2022-06-30 03:00:23 +00:00
page_isolation.c ANDROID: mm: cma: skip problematic pageblock 2021-07-14 11:54:49 -07:00
page_owner.c ANDROID: mm: Export page_owner_inited and __set_page_owner 2023-08-29 23:09:59 +00:00
page_pinner.c ANDROID: page_pinner: prevent pp_buffer access before initialization 2023-03-23 13:28:36 -07:00
page_poison.c UPSTREAM: kasan: fix conflict with page poisoning 2021-07-19 20:39:17 +00:00
page_reporting.c mm: rename page_order() to buddy_order() 2020-10-16 11:11:19 -07:00
page_reporting.h mm: introduce include/linux/pgtable.h 2020-06-09 09:39:13 -07:00
page_vma_mapped.c mm/thp: another PVMW_SYNC fix in page_vma_mapped_walk() 2021-06-30 08:47:29 -04:00
page-writeback.c ANDROID: vendor_hooks: add hook to balance_dirty_pages() 2021-05-20 19:38:42 +00:00
pagewalk.c This is the 5.10.142 stable release 2022-09-22 13:46:39 +02:00
percpu-internal.h percpu: make pcpu_nr_empty_pop_pages per chunk type 2021-04-14 08:42:03 +02:00
percpu-km.c mm: memcg/percpu: account percpu memory to memory cgroups 2020-08-12 10:57:55 -07:00
percpu-stats.c percpu: make pcpu_nr_empty_pop_pages per chunk type 2021-04-14 08:42:03 +02:00
percpu-vm.c mm: memcg/percpu: account percpu memory to memory cgroups 2020-08-12 10:57:55 -07:00
percpu.c Merge 5.10.30 into android12-5.10 2021-04-15 14:23:41 +02:00
pgalloc-track.h mm: move p?d_alloc_track to separate header file 2020-08-07 11:33:26 -07:00
pgtable-generic.c mm/thp: fix __split_huge_pmd_locked() on shmem migration entry 2021-06-30 08:47:26 -04:00
process_vm_access.c mm/process_vm_access.c: include compat.h 2021-01-19 18:27:21 +01:00
ptdump.c This is the 5.10.142 stable release 2022-09-22 13:46:39 +02:00
readahead.c Revert "Revert "ANDROID: add for tuning readahead size"" 2022-09-14 16:34:41 +00:00
rmap.c ANDROID: Export symbols to do reverse mapping within memcg in kernel modules. 2023-08-23 12:33:26 +00:00
rodata_test.c mm/rodata_test.c: fix missing function declaration 2020-08-21 09:52:53 -07:00
shmem.c This is the 5.10.195 stable release 2023-09-19 11:32:32 +00:00
shuffle.c mm: rename page_order() to buddy_order() 2020-10-16 11:11:19 -07:00
shuffle.h mm/shuffle: remove dynamic reconfiguration 2020-08-07 11:33:29 -07:00
slab_common.c BACKPORT: mm: make minimum slab alignment a runtime property 2023-01-20 00:46:19 +00:00
slab.c BACKPORT: mm: make minimum slab alignment a runtime property 2023-01-20 00:46:19 +00:00
slab.h This is the 5.10.82 stable release 2021-11-26 15:37:44 +01:00
slob.c BACKPORT: mm: make minimum slab alignment a runtime property 2023-01-20 00:46:19 +00:00
slub.c This is the 5.10.146 stable release 2022-09-29 17:06:30 +02:00
sparse-vmemmap.c mm/sparse: only sub-section aligned range would be populated 2020-08-07 11:33:27 -07:00
sparse.c mm/sparse: add the missing sparse_buffer_fini() in error branch 2021-05-14 09:50:45 +02:00
swap_cgroup.c
swap_slots.c ANDROID: sched: add restricted hooks to replace the former hooks 2022-10-24 14:26:09 +08:00
swap_state.c This is the 5.10.108 stable release 2022-03-23 12:30:33 +01:00
swap.c ANDROID: vendor_hooks: protect multi-mapcount pages in kernel 2022-08-03 20:10:45 +00:00
swapfile.c ANDROID: add vendor hook of add/delete/iterate node for swap_avail_heads 2023-09-15 19:58:39 +00:00
truncate.c mm/thp: unmap_mapping_page() to fix THP truncate_cleanup_page() 2021-06-30 08:47:27 -04:00
usercopy.c mm/usercopy: return 1 from hardened_usercopy __setup() handler 2022-04-08 14:40:43 +02:00
userfaultfd.c UPSTREAM: mm/shmem: use page_mapping() to detect page cache for uffd continue 2023-04-13 07:58:36 +01:00
util.c ANDROID: vendor_hooks: Add hooks to avoid key threads stalled in 2023-06-30 08:42:41 +00:00
vmacache.c kernel: better document the use_mm/unuse_mm API contract 2020-06-10 19:14:18 -07:00
vmalloc.c This is the 5.10.193 stable release 2023-08-31 18:29:19 +00:00
vmpressure.c FROMLIST: mm, memcg: add mem_cgroup_disabled checks in vmpressure and swap-related functions 2021-07-12 18:26:15 -07:00
vmscan.c ANDROID: clear memory trylock-bit when page_locked. 2023-04-12 15:05:56 +08:00
vmstat.c This is the 5.10.116 stable release 2022-05-16 08:45:59 +02:00
workingset.c XArray updates for 5.9 2020-10-20 14:39:37 -07:00
z3fold.c mm/z3fold: use release_z3fold_page_locked() to release locked z3fold page 2021-07-14 16:56:51 +02:00
zbud.c mm/zbud: remove redundant initialization 2020-10-13 18:38:34 -07:00
zpool.c mm/zpool.c: delete duplicated word and fix grammar 2020-08-12 10:57:58 -07:00
zsmalloc.c This is the 5.10.120 stable release 2022-07-23 16:09:48 +02:00
zswap.c