Commit Graph

38873 Commits

Author SHA1 Message Date
keystone-kernel-automerger
3224d4590e Merge remote-tracking branch into HEAD
* keystone/mirror-android13-5.15:
  ANDROID: export find_user() & free_uid()for GKI purpose.
  ANDROID: freezer: export the freezer_cgrp_subsys for GKI purpose.
  ANDROID: GKI: update xiaomi symbol list
  ANDROID: ABI: Update symbols to unisoc whitelist for the sysdump 1st
  BACKPORT: locking: Add missing __sched attributes
  ANDROID: export cpuset_cpus_allowed()for GKI purpose.
  ANDROID: power: Add vendor hook to qos for GKI purpose.
  ANDROID: sched: Gate sched_stat tracepoint exports on CONFIG_SCHEDSTATS
  ANDROID: vendor_hooks: Export the tracepoints sched_stat_iowait, sched_stat_blocked, sched_stat_wait to let modules probe them
  ANDROID: firmware_loader: Replace use of strcpy and strncpy with strscpy
  ANDROID: vendor_hooks: Add hooks for binder
  ANDROID: Update symbol list for mtk
  ANDROID: sched: add vendor hook to set_cpus_allowed
  ANDROID: ABI: Update symbols to unisoc whitelist for the wlan first
  ANDROID: KVM: arm64: Fix error handling in pKVM FF-A proxy
  ANDROID: workqueue: export symbol of the function wq_worker_comm()

Signed-off-by: keystone-kernel-automerger <keystone-kernel-automerger@google.com>
Change-Id: I879c242383ca4fd4cef0de54fb7e11698c7fe18b
2022-06-27 06:17:27 +00:00
lijianzhong
eec2cd3df3 ANDROID: export find_user() & free_uid()for GKI purpose.
Exporting the symbol find_user()& free_uid(), in which ko module can get
user task information for tuning.

Bug: 183674818

Signed-off-by: lijianzhong <lijianzhong@xiaomi.com>
Change-Id: I12135c0af312904dd21b6f074beda086ad5ece98
(cherry picked from commit 16350016d8a3678da5012343ca00fa9918340c83)
2022-06-27 04:59:35 +00:00
Zhuguangqing
8a90e4d4e5 ANDROID: freezer: export the freezer_cgrp_subsys for GKI purpose.
Exporting the symbol freezer_cgrp_subsys, in that vendor module can
add can_attach & cancel_attach member function. It is vendor-specific
tuning.

Bug: 182496370

Signed-off-by: Zhuguangqing <zhuguangqing@xiaomi.com>
Change-Id: I153682b9d1015eed3f048b45ea6495ebb8f3c261
(cherry picked from commit ee3f4d2821f5b2a794f0a1f5ed423f561a01adae)
2022-06-27 02:21:02 +00:00
Minchan Kim
02cdaeba1a BACKPORT: locking: Add missing __sched attributes
This patch adds __sched attributes to a few missing places
to show blocked function rather than locking function
in get_wchan.

Signed-off-by: Minchan Kim <minchan@kernel.org>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lkml.kernel.org/r/20220115231657.84828-1-minchan@kernel.org

Conflicts:
	kernel/locking/percpu-rwsem.c

1. conflict <linux/sched/debug.h>

Bug: 228243692
Change-Id: Ifb50c13cfdd7484269d9a291a8da515e1cce6a7b
(cherry picked from commit c441e934b604a3b5f350a9104124cf6a3ba07a34)
Signed-off-by: Minchan Kim <minchan@google.com>
2022-06-26 15:55:35 +00:00
Toke Høiland-Jørgensen
5c0ab17c53 bpf: Fix calling global functions from BPF_PROG_TYPE_EXT programs
commit f858c2b2ca04fc7ead291821a793638ae120c11d upstream.

The verifier allows programs to call global functions as long as their
argument types match, using BTF to check the function arguments. One of the
allowed argument types to such global functions is PTR_TO_CTX; however the
check for this fails on BPF_PROG_TYPE_EXT functions because the verifier
uses the wrong type to fetch the vmlinux BTF ID for the program context
type. This failure is seen when an XDP program is loaded using
libxdp (which loads it as BPF_PROG_TYPE_EXT and attaches it to a global XDP
type program).

Fix the issue by passing in the target program type instead of the
BPF_PROG_TYPE_EXT type to bpf_prog_get_ctx() when checking function
argument compatibility.

The first Fixes tag refers to the latest commit that touched the code in
question, while the second one points to the code that first introduced
the global function call verification.

v2:
- Use resolve_prog_type()

Fixes: 3363bd0cfbb8 ("bpf: Extend kfunc with PTR_TO_CTX, PTR_TO_MEM argument support")
Fixes: 51c39bb1d5 ("bpf: Introduce function-by-function verification")
Reported-by: Simon Sundberg <simon.sundberg@kau.se>
Signed-off-by: Toke Høiland-Jørgensen <toke@redhat.com>
Link: https://lore.kernel.org/r/20220606075253.28422-1-toke@redhat.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
[ backport: open-code missing resolve_prog_type() helper, resolve context diff ]
Signed-off-by: Toke Høiland-Jørgensen <toke@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-06-25 15:18:40 +02:00
Jason A. Donenfeld
ca927bd22a ANDROID: cpu/hotplug: avoid breaking Android ABI by fusing cpuhp steps
We can't add more values to the cpuhp_state enum, lest we break some
vendor module. So instead break out existing steps into helper functions
which call both steps. Fortunately none of these steps return anything
other than 0, so we don't need to worry about rollback.

Bug: 161946584
Fixes: 144c1e7ecf ("random: clear fast pool, crng, and batches in cpuhp bring up")
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Icaa61291207d799bab741be7bab2b636cda09422
2022-06-25 11:22:01 +02:00
lijianzhong
5a7d01ed73 ANDROID: export cpuset_cpus_allowed()for GKI purpose.
Exporting the symbol cpuset_cpus_allowed(), in which ko module can do
cpuset operation in vendor hook related code.

Bug: 189725786

Signed-off-by: lijianzhong <lijianzhong@xiaomi.com>
Change-Id: I7919a893ab64bb441ab43cbb0b16825ed76d802d
(cherry picked from commit a685bf3fce625a5ce3675b3bcf73266a759e5fbd)
2022-06-24 20:32:46 +00:00
heshuai1
c445fe4dc6 ANDROID: power: Add vendor hook to qos for GKI purpose.
Add the vendor hook to qos.c, because of some special cases related to
our feature. we add the hook at freq_qos_add_request and remove_request
to make sure we can go to our own qos process logic.

Bug: 187458531

Signed-off-by: heshuai1 <heshuai1@xiaomi.com>
Change-Id: I1fb8fd6134432ecfb44ad242c66ccd8280ab9b43
2022-06-24 20:32:46 +00:00
Nathan Chancellor
ef5005ca25 ANDROID: sched: Gate sched_stat tracepoint exports on CONFIG_SCHEDSTATS
When CONFIG_SCHEDSTATS is not set, the build breaks because
DEFINE_EVENT_SCHEDSTAT evaluates to DEFINE_EVENT_NOP, which only defines
trace_<name>, not __tracepoint_<name>, __traceiter_<name>, and
_SCK__tp_func_<name> like DEFINE_EVENT.

Gate these exports on CONFIG_SCHEDSTATS so all of the exported symbols
are defined.

Change-Id: I38056ee1446e6c149686ce1905c2ba6e4ea5e59e
Fixes: a6bb1af39d11 ("ANDROID: vendor_hooks: Export the tracepoints sched_stat_iowait, sched_stat_blocked, sched_stat_wait to let modules probe them")
Link: https://github.com/ClangBuiltLinux/continuous-integration2/runs/2724257445?check_suite_focus=true
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
2022-06-24 11:34:17 -07:00
Liujie Xie
6d8d2ab52f ANDROID: vendor_hooks: Export the tracepoints sched_stat_iowait, sched_stat_blocked, sched_stat_wait to let modules probe them
Get task info about scheduling delay, iowait, and block time.

Bug: 189415303
Change-Id: Ib6b548f8a78de5b26d555e9a89e3cc79ea2d1024
Signed-off-by: Liujie Xie <xieliujie@oppo.com>
(cherry picked from commit a6bb1af39d11ef0360cb34bb31b7224ca4db031f)
2022-06-24 11:30:14 -07:00
Jing-Ting Wu
c4f814c2f3 ANDROID: sched: add vendor hook to set_cpus_allowed
Add new vendor hook when set affinity to detect task status
for performance tuning.

Bug: 236775946
Change-Id: I407637c85e2ea93585877312f090981fee848979
Signed-off-by: Jing-Ting Wu <Jing-Ting.Wu@mediatek.com>
2022-06-23 18:06:57 +00:00
zhengding chen
87e0e98c25 ANDROID: workqueue: export symbol of the function wq_worker_comm()
Export symbol of the function wq_worker_comm() in kernel/workqueue.c for dlkm to get the description of the kworker process.

Bug: 208394207
Signed-off-by: zhengding chen <chenzhengding@oppo.com>
Change-Id: I2e7ddd52a15e22e99e6596f16be08243af1bb473
(cherry picked from commit 28de74186185e339123c86984729818d0d2d7f43)
2022-06-23 08:05:27 +00:00
Sami Tolvanen
75f3a5fa2a cfi: Fix __cfi_slowpath_diag RCU usage with cpuidle
commit 57cd6d157eb479f0a8e820fd36b7240845c8a937 upstream.

RCU_NONIDLE usage during __cfi_slowpath_diag can result in an invalid
RCU state in the cpuidle code path:

  WARNING: CPU: 1 PID: 0 at kernel/rcu/tree.c:613 rcu_eqs_enter+0xe4/0x138
  ...
  Call trace:
    rcu_eqs_enter+0xe4/0x138
    rcu_idle_enter+0xa8/0x100
    cpuidle_enter_state+0x154/0x3a8
    cpuidle_enter+0x3c/0x58
    do_idle.llvm.6590768638138871020+0x1f4/0x2ec
    cpu_startup_entry+0x28/0x2c
    secondary_start_kernel+0x1b8/0x220
    __secondary_switched+0x94/0x98

Instead, call rcu_irq_enter/exit to wake up RCU only when needed and
disable interrupts for the entire CFI shadow/module check when we do.

Signed-off-by: Sami Tolvanen <samitolvanen@google.com>
Link: https://lore.kernel.org/r/20220531175910.890307-1-samitolvanen@google.com
Fixes: cf68fffb66 ("add support for Clang CFI")
Cc: stable@vger.kernel.org
Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-06-22 14:22:04 +02:00
Peter Zijlstra
668a1f5e75 sched: Fix balance_push() vs __sched_setscheduler()
[ Upstream commit 04193d590b390ec7a0592630f46d559ec6564ba1 ]

The purpose of balance_push() is to act as a filter on task selection
in the case of CPU hotplug, specifically when taking the CPU out.

It does this by (ab)using the balance callback infrastructure, with
the express purpose of keeping all the unlikely/odd cases in a single
place.

In order to serve its purpose, the balance_push_callback needs to be
(exclusively) on the callback list at all times (noting that the
callback always places itself back on the list the moment it runs,
also noting that when the CPU goes down, regular balancing concerns
are moot, so ignoring them is fine).

And here-in lies the problem, __sched_setscheduler()'s use of
splice_balance_callbacks() takes the callbacks off the list across a
lock-break, making it possible for, an interleaving, __schedule() to
see an empty list and not get filtered.

Fixes: ae79270232 ("sched: Optimize finish_lock_switch()")
Reported-by: Jing-Ting Wu <jing-ting.wu@mediatek.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Tested-by: Jing-Ting Wu <jing-ting.wu@mediatek.com>
Link: https://lkml.kernel.org/r/20220519134706.GH2578@worktop.programming.kicks-ass.net
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-06-22 14:22:02 +02:00
Rob Clark
e4e166f10e dma-debug: make things less spammy under memory pressure
[ Upstream commit e19f8fa6ce1ca9b8b934ba7d2e8f34c95abc6e60 ]

Limit the error msg to avoid flooding the console.  If you have a lot of
threads hitting this at once, they could have already gotten passed the
dma_debug_disabled() check before they get to the point of allocation
failure, resulting in quite a lot of this error message spamming the
log.  Use pr_err_once() to limit that.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-06-22 14:21:55 +02:00
keystone-kernel-automerger
578bbaf7d1 Merge remote-tracking branch into HEAD
* keystone/mirror-android13-5.15:
  ANDROID: dma/debug: fix warning of check_sync
  ANDROID: abi_gki_aarch64_qcom: Add I3C interface symbols to qcom tree
  ANDROID: signal: Add vendor hook for memory reaping
  ANDROID: Fix build error with CONFIG_UCLAMP_TASK disabled
  UPSTREAM: sched: Fix balance_push() vs __sched_setscheduler()
  ANDROID: GKI: Add symbols to abi_gki_aarch64_vivo
  ANDROID: ABI: Update symbols to unisoc whitelist for the drm

Signed-off-by: keystone-kernel-automerger <keystone-kernel-automerger@google.com>
Change-Id: I13419b53c8744271155fc9c829c1689fca5f3e89
2022-06-22 06:17:32 +00:00
Yunfei Wang
d61fe3ad4b ANDROID: dma/debug: fix warning of check_sync
check_sync() checks for whether device driver DMA sync sg list entry count equals to map sg list entry count, but in struct dma_buf_ops, there has below interface:
 int (*begin_cpu_access_partial)
 int (*end_cpu_access_partial)

When vendor implement these interface in dma heap to support dma-buf partial cache sync for performance improvement, in dma_buf_ops of heap, we copy a sgtable from orginal sgtable but with necessary nents, it will less then nents used in map attachment, in the way, the following warning had occurred:
DMA-API: device_xxx: device driver syncs DMA sg list with different entry count [map count=5] [sync count=1]
Call trace:
 check_sync+0x6d8/0xb40
 debug_dma_sync_sg_for_cpu+0x114/0x16c
 dma_sync_sg_for_cpu+0xa0/0xe4

So need change check conditation in check_sync to support dma-buf partial cache sync.

Bug: 236343688
Signed-off-by: Mingyuan Ma <mingyuan.ma@mediatek.com>
Signed-off-by: Yunfei Wang <yf.wang@mediatek.com>
Change-Id: I2f4db3b156e752eeb022927957f77a3fa534a573
2022-06-21 23:54:34 +00:00
Charan Teja Reddy
561fe20b66 ANDROID: signal: Add vendor hook for memory reaping
Add vendor hook to determine if the memory of a process that received
the SIGKILL can be reaped.

Bug: 189803002
Bug: 236430563
Change-Id: Ie6802b9bf93ddffb0ceef615d7cca40c23219e57
Signed-off-by: Charan Teja Reddy <charante@codeaurora.org>
Signed-off-by: Isaac J. Manjarres <quic_isaacm@quicinc.com>
2022-06-21 20:43:36 +00:00
Peter Zijlstra
bf36c14688 UPSTREAM: sched: Fix balance_push() vs __sched_setscheduler()
The purpose of balance_push() is to act as a filter on task selection
in the case of CPU hotplug, specifically when taking the CPU out.

It does this by (ab)using the balance callback infrastructure, with
the express purpose of keeping all the unlikely/odd cases in a single
place.

In order to serve its purpose, the balance_push_callback needs to be
(exclusively) on the callback list at all times (noting that the
callback always places itself back on the list the moment it runs,
also noting that when the CPU goes down, regular balancing concerns
are moot, so ignoring them is fine).

And here-in lies the problem, __sched_setscheduler()'s use of
splice_balance_callbacks() takes the callbacks off the list across a
lock-break, making it possible for, an interleaving, __schedule() to
see an empty list and not get filtered.

Fixes: ae79270232 ("sched: Optimize finish_lock_switch()")
Reported-by: Jing-Ting Wu <jing-ting.wu@mediatek.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Tested-by: Jing-Ting Wu <jing-ting.wu@mediatek.com>
Link: https://lkml.kernel.org/r/20220519134706.GH2578@worktop.programming.kicks-ass.net

Bug: 231530208
(cherry picked from commit 04193d590b390ec7a0592630f46d559ec6564ba1)
Signed-off-by: Jing-Ting Wu <Jing-Ting.Wu@mediatek.com>
Signed-off-by: Carlos Llamas <cmllamas@google.com>
Change-Id: Iaf0a2920b74a043cf27125fbf16c22b59d14efdc
2022-06-21 18:43:28 +00:00
Greg Kroah-Hartman
fdb58cc9a7 Merge 5.15.44 into android13-5.15-lts
Changes in 5.15.44
	HID: amd_sfh: Add support for sensor discovery
	KVM: x86/mmu: fix NULL pointer dereference on guest INVPCID
	ice: fix crash at allocation failure
	ACPI: sysfs: Fix BERT error region memory mapping
	MAINTAINERS: co-maintain random.c
	MAINTAINERS: add git tree for random.c
	lib/crypto: blake2s: include as built-in
	lib/crypto: blake2s: move hmac construction into wireguard
	lib/crypto: sha1: re-roll loops to reduce code size
	lib/crypto: blake2s: avoid indirect calls to compression function for Clang CFI
	random: document add_hwgenerator_randomness() with other input functions
	random: remove unused irq_flags argument from add_interrupt_randomness()
	random: use BLAKE2s instead of SHA1 in extraction
	random: do not sign extend bytes for rotation when mixing
	random: do not re-init if crng_reseed completes before primary init
	random: mix bootloader randomness into pool
	random: harmonize "crng init done" messages
	random: use IS_ENABLED(CONFIG_NUMA) instead of ifdefs
	random: early initialization of ChaCha constants
	random: avoid superfluous call to RDRAND in CRNG extraction
	random: don't reset crng_init_cnt on urandom_read()
	random: fix typo in comments
	random: cleanup poolinfo abstraction
	random: cleanup integer types
	random: remove incomplete last_data logic
	random: remove unused extract_entropy() reserved argument
	random: rather than entropy_store abstraction, use global
	random: remove unused OUTPUT_POOL constants
	random: de-duplicate INPUT_POOL constants
	random: prepend remaining pool constants with POOL_
	random: cleanup fractional entropy shift constants
	random: access input_pool_data directly rather than through pointer
	random: selectively clang-format where it makes sense
	random: simplify arithmetic function flow in account()
	random: continually use hwgenerator randomness
	random: access primary_pool directly rather than through pointer
	random: only call crng_finalize_init() for primary_crng
	random: use computational hash for entropy extraction
	random: simplify entropy debiting
	random: use linear min-entropy accumulation crediting
	random: always wake up entropy writers after extraction
	random: make credit_entropy_bits() always safe
	random: remove use_input_pool parameter from crng_reseed()
	random: remove batched entropy locking
	random: fix locking in crng_fast_load()
	random: use RDSEED instead of RDRAND in entropy extraction
	random: get rid of secondary crngs
	random: inline leaves of rand_initialize()
	random: ensure early RDSEED goes through mixer on init
	random: do not xor RDRAND when writing into /dev/random
	random: absorb fast pool into input pool after fast load
	random: use simpler fast key erasure flow on per-cpu keys
	random: use hash function for crng_slow_load()
	random: make more consistent use of integer types
	random: remove outdated INT_MAX >> 6 check in urandom_read()
	random: zero buffer after reading entropy from userspace
	random: fix locking for crng_init in crng_reseed()
	random: tie batched entropy generation to base_crng generation
	random: remove ifdef'd out interrupt bench
	random: remove unused tracepoints
	random: add proper SPDX header
	random: deobfuscate irq u32/u64 contributions
	random: introduce drain_entropy() helper to declutter crng_reseed()
	random: remove useless header comment
	random: remove whitespace and reorder includes
	random: group initialization wait functions
	random: group crng functions
	random: group entropy extraction functions
	random: group entropy collection functions
	random: group userspace read/write functions
	random: group sysctl functions
	random: rewrite header introductory comment
	random: defer fast pool mixing to worker
	random: do not take pool spinlock at boot
	random: unify early init crng load accounting
	random: check for crng_init == 0 in add_device_randomness()
	random: pull add_hwgenerator_randomness() declaration into random.h
	random: clear fast pool, crng, and batches in cpuhp bring up
	random: round-robin registers as ulong, not u32
	random: only wake up writers after zap if threshold was passed
	random: cleanup UUID handling
	random: unify cycles_t and jiffies usage and types
	random: do crng pre-init loading in worker rather than irq
	random: give sysctl_random_min_urandom_seed a more sensible value
	random: don't let 644 read-only sysctls be written to
	random: replace custom notifier chain with standard one
	random: use SipHash as interrupt entropy accumulator
	random: make consistent usage of crng_ready()
	random: reseed more often immediately after booting
	random: check for signal and try earlier when generating entropy
	random: skip fast_init if hwrng provides large chunk of entropy
	random: treat bootloader trust toggle the same way as cpu trust toggle
	random: re-add removed comment about get_random_{u32,u64} reseeding
	random: mix build-time latent entropy into pool at init
	random: do not split fast init input in add_hwgenerator_randomness()
	random: do not allow user to keep crng key around on stack
	random: check for signal_pending() outside of need_resched() check
	random: check for signals every PAGE_SIZE chunk of /dev/[u]random
	random: allow partial reads if later user copies fail
	random: make random_get_entropy() return an unsigned long
	random: document crng_fast_key_erasure() destination possibility
	random: fix sysctl documentation nits
	init: call time_init() before rand_initialize()
	ia64: define get_cycles macro for arch-override
	s390: define get_cycles macro for arch-override
	parisc: define get_cycles macro for arch-override
	alpha: define get_cycles macro for arch-override
	powerpc: define get_cycles macro for arch-override
	timekeeping: Add raw clock fallback for random_get_entropy()
	m68k: use fallback for random_get_entropy() instead of zero
	riscv: use fallback for random_get_entropy() instead of zero
	mips: use fallback for random_get_entropy() instead of just c0 random
	arm: use fallback for random_get_entropy() instead of zero
	nios2: use fallback for random_get_entropy() instead of zero
	x86/tsc: Use fallback for random_get_entropy() instead of zero
	um: use fallback for random_get_entropy() instead of zero
	sparc: use fallback for random_get_entropy() instead of zero
	xtensa: use fallback for random_get_entropy() instead of zero
	random: insist on random_get_entropy() existing in order to simplify
	random: do not use batches when !crng_ready()
	random: use first 128 bits of input as fast init
	random: do not pretend to handle premature next security model
	random: order timer entropy functions below interrupt functions
	random: do not use input pool from hard IRQs
	random: help compiler out with fast_mix() by using simpler arguments
	siphash: use one source of truth for siphash permutations
	random: use symbolic constants for crng_init states
	random: avoid initializing twice in credit race
	random: move initialization out of reseeding hot path
	random: remove ratelimiting for in-kernel unseeded randomness
	random: use proper jiffies comparison macro
	random: handle latent entropy and command line from random_init()
	random: credit architectural init the exact amount
	random: use static branch for crng_ready()
	random: remove extern from functions in header
	random: use proper return types on get_random_{int,long}_wait()
	random: make consistent use of buf and len
	random: move initialization functions out of hot pages
	random: move randomize_page() into mm where it belongs
	random: unify batched entropy implementations
	random: convert to using fops->read_iter()
	random: convert to using fops->write_iter()
	random: wire up fops->splice_{read,write}_iter()
	random: check for signals after page of pool writes
	ALSA: ctxfi: Add SB046x PCI ID
	Linux 5.15.44

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I54546066f38abcce892689c492b3210ae380f851
2022-06-21 20:06:19 +02:00
Greg Kroah-Hartman
fdae29a28f Merge branch 'android13-5.15' into 'android13-5.15-lts'
Sync up with android13-5.15 for the following commits now that the ABI
is frozen:

e31981896d ANDROID: ABI: Update symbols to unisoc whitelist for the drm
f1bf82c3da ANDROID: Enable GKI Dr. No Enforcement
3456f4eeee ANDROID: GKI: 6/17/2022 KMI update
a047de7997 ANDROID: GKI: add PG_oem_reserved in enum pageflags
b7a7765d8a ANDROID: power: Add ANDROID_OEM_DATA_ARRAY in freq_qos_request.
d1faa010ca FROMGIT: cgroup: Use separate src/dst nodes when preloading css_sets for migration
dfdd57b019 ANDROID: vendor_hooks: export hooks of mem_cgroup subsystem
04bb2779c9 ANDROID: vendor_hooks: add a field in pglist_data
59e1e26589 ANDROID: Allow vendor module to reclaim a memcg
326983dc9c ANDROID: Export memcg functions to allow module to add new files
f50ef59058 ANDROID: vendor_hooks: add hooks in mem_cgroup subsystem
6575ef0cd7 ANDROID: ASoC: core- Add vendor data fields to support  hostless DAI
8255004dae ANDROID: GKI: Add ANDROID_OEM_DATA_ARRAY() in struct ufs_hba
1c450d2d9e ANDROID: gic-v3: Update vendor hook to set affinity in GIC v3
d13008eb9f ANDROID: GKI: add ANDROID_OEM_DATA in struct bio
6abf3c5ef2 BACKPORT: FROMLIST: cfg80211: Indicate MLO connection info in connect and roam callbacks
29356dc0a2 BACKPORT: FROMGIT: wifi: cfg80211: add optional link add/remove callbacks
becbedacf9 BACKPORT: FROMGIT: wifi: cfg80211: sort trace.h
e1913fb476 BACKPORT: FROMGIT: wifi: nl80211: update add/remove link command
3f048cd911 BACKPORT: FROMGIT: wifi: nl80211: support MLO in auth/assoc
9af03657fb BACKPORT: FROMGIT: wifi: cfg80211: simplify cfg80211_mlme_auth() prototype
27f48acb1b BACKPORT: FROMGIT: wifi: ieee80211: add definitions for multi-link element
10f80b7397 BACKPORT: FROMGIT: wifi: nl80211: refactor BSS lookup in nl80211_associate()
442c68f14f BACKPORT: FROMGIT: wifi: cfg80211: mlme: get BSS entry outside cfg80211_mlme_assoc()
d975927513 BACKPORT: FROMGIT: wifi: cfg80211: do some rework towards MLO link APIs
af34adaa6a BACKPORT: FROMLIST: cfg80211: Increase akm_suites array size in cfg80211_crypto_settings
bee631cec5 ANDROID: nl80211/cfg80211: Add support to do API changes after GKI freeze
3dc56c75d2 ANDROID: Add macros to create reserved data fields to backport upstream changes
10f3543124 UPSTREAM: wil6210: remove 'freq' debugfs
d14ea158d6 ANDROID: GKI: Add ANDROID_OEM_DATA() in struct queue_limits
d534eb259e FROMLIST: ALSA: control: Use xarray for faster  lookups
bcef255e59 ANDROID: vendor_hooks: add a field in mem_cgroup
efc7473371 FROMGIT: PCI: dwc: Fix MSI msi_msg dma mapping
99af01f2b7 Revert "ANDROID: PCI: dwc: revert dwc 32-bit DMA mask for MSI address requirement"
7b26719a77 ANDROID: GKI: use internal type definitions in vendor hooks
d5f809c84d ANDROID: GKI: use public type definitions in vendor hooks
6b7259073e ANDROID: GKI: add ANDROID_OEM_DATA() in struct request_queue
7a43f1f694 ANDROID: vendor_hooks: add hook and OEM data for slab shrink
cbd20786b6 FROMLIST: scsi: ufs: Export regulator functions
df17a9b985 ANDROID: GKI: timer.h: add Android ABI padding to a structure
706766bc6c ANDROID: GKI: USB: add Android ABI padding to some structures
a61964fc70 ANDROID: GKI: sched.h: add Android ABI padding to some structures
6a79d5b96b ANDROID: GKI: module.h: add Android ABI padding to some structures
09c51db0d2 ANDROID: GKI: sock.h: add Android ABI padding to some structures
0b82194ecb ANDROID: GKI: sched: add Android ABI padding to some structures
da717c3ce1 ANDROID: GKI: mount.h: add Android ABI padding to some structures
98042d19ad ANDROID: GKI: mm: add Android ABI padding to some structures
b89d56cc81 ANDROID: GKI: add some padding to some driver core structures
5940799827 ANDROID: GKI: add padding to struct hid_device
936b0da47b ANDROID: GKI: USB: XHCI: add Android ABI padding to lots of xhci structures
db2b68eb63 ANDROID: GKI: dwc3: add Android ABI padding to some structures
e5fd26ff2d ANDROID: GKI: sound/usb/card.h: add Android ABI padding to struct snd_usb_endpoint
0e6d2288f0 ANDROID: GKI: user_namespace.h: add Android ABI padding to a structure
55f5cb7439 ANDROID: GKI: quota.h: add Android ABI padding to some structures
8137f1d169 ANDROID: GKI: mmu_notifier.h: add Android ABI padding to some structures
30d36e31c5 ANDROID: GKI: mm.h: add Android ABI padding to a structure
c57f9e1d48 ANDROID: GKI: kobject.h: add Android ABI padding to some structures
4a30d8ecf0 ANDROID: GKI: kernfs.h: add Android ABI padding to some structures
7426a5b28c ANDROID: GKI: irqdomain.h: add Android ABI padding to a structure
abc5541f4c ANDROID: GKI: ioport.h: add Android ABI padding to a structure
80b63f2f01 ANDROID: GKI: iomap.h: add Android ABI padding to a structure
2ca1ba50e6 ANDROID: GKI: hrtimer.h: add Android ABI padding to a structure
f25b001302 ANDROID: GKI: genhd.h: add Android ABI padding to some structures
5988e691de ANDROID: GKI: ethtool.h: add Android ABI padding to a structure
5d4e30d9b9 ANDROID: GKI: dma-mapping.h: add Android ABI padding to a structure
bd3b9b13ef ANDROID: GKI: networking: add Android ABI padding to a lot of networking structures
c422535706 ANDROID: GKI: blk_types.h: add Android ABI padding to a structure
94e58fdb6e ANDROID: GKI: scsi.h: add Android ABI padding to a structure
804026210f ANDROID: GKI: pci: add Android ABI padding to some structures
4e079c929f ANDROID: GKI: add Android ABI padding to struct nf_conn
5e65f67ae0 ANDROID: abi_gki_aarch64_qcom: Add rproc and rpmsg helpers
111cae8473 FROMLIST: rpmsg: core: Introduce rproc_mem_entry_free
9eed2acb93 FROMLIST: remoteproc: core: Add helper to remove carveouts
6ac966ab47 UPSTREAM: remoteproc: move rproc_da_to_va declaration to remoteproc.h
76801c2626 FROMLIST: rpmsg: char: Add support to use rpmsg_rx_done
a4f64634ad FROMLIST: rpmsg: core: Add rx done hooks
60a6ad4211 FROMLIST: mmc: sdhci-msm: Enable force hw reset during cqe recovery
024f778bbb FROMLIST: mmc: core: Introduce new flag to force hardware reset
74e6357176 ANDROID: GKI: Add ANDROID_OEM_DATA in struct ufs_dev_info
9662426af3 ANDROID: sched: Add oem data in struct rq
d6f34bc835 FROMLIST: drivers/thermal/thermal_of: Add critical/hot ops support for thermal_of sensor
50bca2f782 Revert "Revert "ANDROID: GKI: enable CONFIG_BLK_CGROUP_IOCOST""
dc3e85677b Revert "Revert "ANDROID: GKI: Add ANDROID_OEM_DATA in struct blk_mq_tags""
90e5d9e303 Revert "Revert "ANDROID: GKI: Add ANDROID_OEM_DATA in struct blk_mq_ctx""
071859b45a ANDROID: mmc: Add vendor hooks
22c62839a1 ANDROID: scsi: ufs: Enable CONFIG_SCSI_UFS_HPB
1ef6a91031 FROMGIT: drivers/thermal/thermal_of: Add change_mode ops support for thermal_of sensor
377ef18ed6 FROMGIT: mmc: cqhci: Capture eMMC and SD card errors
232df716fb FROMGIT: mmc: debugfs: Add debug fs error state entry for mmc driver
a70d301048 FROMGIT: mmc: debugfs: Add debug fs entry for mmc driver
6f0f720466 FROMGIT: mmc: sdhci: Capture eMMC and SD card errors
7ace0d462a FROMGIT: mmc: core: Capture eMMC and SD card errors
45850948d1 ANDROID: GKI: Add OEM data to mutex/rwsem
1dc9f51423 ANDROID: GKI: net: add vendor hooks for 'struct sock' lifecycle
72c4b4cdad ANDROID: GKI: net: add vendor hooks for 'struct nf_conn' lifecycle
7948b5ff64 ANDROID: GKI: add vendor padding variable in struct sock
889670d815 ANDROID: GKI: add vendor padding variable in struct nf_conn
2d9a4bfb7b FROMLIST: dma-buf: Move sysfs work out of DMA-BUF export path
ebc5cf22b4 ANDROID: Add vendor hook for MemcgV2 optimization
dbb4320c14 UPSTREAM: scsi: ufs: core: Probe for temperature notification support
8ee9980737 ANDROID: scsi: ufs: Support Multi-Circular Queue
b528c7889d UPSTREAM: mmc: core: Add host specific tuning support for eMMC HS400 mode
6b6ee4548a UPSTREAM: mmc: mtk-sd: Add HS400 online tuning support
9a63e4dcc0 UPSTREAM: dt-bindings: mmc: mtk-sd: Add hs400 dly3 setting
6551a55c4d ANDROID: powerpc/mm: protect vm_file during speculative page fault handling
4fc18576ca ANDROID: x86/mm: protect vm_file during speculative page fault handling
0f4ea1e593 ANDROID: arm64/mm: protect vm_file during speculative page fault handling
a3fe25d923 ANDROID: add vma->file_ref_count to synchronize vma->vm_file destruction
a16e169d36 Revert "ANDROID: Use the notifier lock to perform file-backed vma teardown"
f25e13c1bc Revert "ANDROID: Fix build errors caused by missing mmu_notifier_lock definition"
9a526b9527 UPSTREAM: xfrm: fix "disable_policy" flag use when arriving from different devices
6508a3753c UPSTREAM: xfrm: rework default policy structure
3ae9599990 UPSTREAM: net: fix dev_fill_forward_path with pppoe + bridge
75cd98366d UPSTREAM: btrfs: fallback to blocking mode when doing async dio over multiple extents
a5070df850 UPSTREAM: btrfs: fix deadlock due to page faults during direct IO reads and writes
3446e643b7 UPSTREAM: mm: gup: make fault_in_safe_writeable() use fixup_user_fault()
ee1ecd7ea5 UPSTREAM: gfs2: Fix mmap + page fault deadlocks for direct I/O
127a8ed2d3 UPSTREAM: iov_iter: Introduce nofault flag to disable page faults
ccf74d1eca UPSTREAM: selftests/bpf: Add test for reg2btf_ids out of bounds access
83e7514f57 UPSTREAM: bpf: Fix crash due to out of bounds access into reg2btf_ids.
2f53e2190d UPSTREAM: bpf/selftests: Test PTR_TO_RDONLY_MEM
8f07caaddc UPSTREAM: bpf: Add MEM_RDONLY for helper args that are pointers to rdonly mem.
e1714bff1c UPSTREAM: bpf: Make per_cpu_ptr return rdonly PTR_TO_MEM.
d7ebee8df3 UPSTREAM: bpf: Convert PTR_TO_MEM_OR_NULL to composable types.
1cd4928129 UPSTREAM: bpf: Introduce MEM_RDONLY flag
13fc6550b0 UPSTREAM: bpf: Replace PTR_TO_XXX_OR_NULL with PTR_TO_XXX | PTR_MAYBE_NULL
f5a45f25bf UPSTREAM: bpf: Replace RET_XXX_OR_NULL with RET_XXX | PTR_MAYBE_NULL
cc6305f056 UPSTREAM: bpf: Replace ARG_XXX_OR_NULL with ARG_XXX | PTR_MAYBE_NULL
cc3b22bead UPSTREAM: bpf: Introduce composable reg, ret and arg types.
3f1805c930 ANDROID: Update symbol list for mtk
536083a4ce ANDROID: GKI: add symbol list file for honor
4993f5a6dd ANDROID: GKI: Update symbol list for Exynos SoC
546461d83f ANDROID: KVM: arm64: Prevent kmemleak from accessing .hyp.data
4a006e6d47 FROMGIT: KVM: arm64: Prevent kmemleak from accessing pKVM memory
3882af1c70 ANDROID: ABI: Update symbols to unisoc whitelist for the scheduler 4st
7754d28433 ANDROID: GKI: Update symbols to symbol list
4ee2f8b56d FROMLIST: iommu/mediatek: Allow page table PA up to 35bit
0b6600b792 FROMLIST: iommu/io-pgtable-arm-v7s: Add a quirk to allow pgtable PA up to 35bit
4f746c15d7 ANDROID: Add vendor hooks to signal.
fd2e5c65ed ANDROID: ashmem: Export is_ashmem_file
348b1456e9 ANDROID: vendor_hooks: bypass shrink slab
e53e6edb46 FROMLIST: devcoredump : Serialize devcd_del work
ab7e76f60c ANDROID: GKI: Update symbols list for vivo
f58e5166c0 ANDROID: ABI: Update symbols used by the unisoc filesystem whitelist for the 1st
f5ba378e89 FROMLIST: of: of_reserved_mem: Increase limit for reserved_mem regions
648e73245b ANDROID: GKI: Add symbol list file for vivo
64a4e77c86 ANDROID: Revert "tracing: Disable "other" permission bits in the tracefs files"
c8a2e13615 ANDROID: vendor_hooks: Add hook for binder
38d8fefb73 ANDROID: GKI: Update abi_gki_aarch64_qcom for devm_of_clk_del_provider
4a0a0fef25 Revert "ANDROID: umh: Enable usermode helper for required use cases"
43c339540b ANDROID: GKI: update module list for fips140 build
b5b6394e25 BACKPORT: mm: khugepaged: recalculate min_free_kbytes after stopping khugepaged
368cd63a4a ANDROID: fault: Add vendor hook for TLB conflict
56b51fac38 BACKPORT: FROMLIST: block/bfq: Enable I/O statistics
933eddd126 ANDROID: Adding Image.gz and boot-gz.img
f28cdbf9ee ANDROID: usb: dwc3: export tracepoint for dwc3 read/write
7a0c3689e0 ANDROID: usb: add EXPORT_TRACE_SYMBOL to export tracepoint
d03bf01b43 UPSTREAM: usb: dwc3: core: Add error log when core soft reset failed
435a42a0b4 ANDROID: GKI: Update symbols to abi_gki_aarch64_oplus
1502f0ea7c ANDROID: Add hook to show vendor info for transactions
15a32b46ee ANDROID: GKI: Update abi_gki_aarch64_qcom for partial init tracepoint
e8b5afb658 ANDROID: vendor_hooks: Add hook for partial_init
854f840411 ANDROID: mutex: Add vendor hook to init mutex oem data.
7c82ee91c2 FROMLIST: scsi: ufs-mediatek: Introduce workaround for power mode change
0b0ceacf04 FROMLIST: scsi: ufs: Fix ADAPT logic for HS-G5
97d940cfa3 FROMLIST: scsi: ufs: Export ufshcd_uic_change_pwr_mode()
57388a13ab ANDROID: Update symbol list for mtk
2d18a97422 BACKPORT: FROMGIT: usb: dwc3: add power down scale setting
08a1879c87 ANDROID: GKI: remove info print for header generation
5452f089f9 UPSTREAM: gup: Introduce FOLL_NOFAULT flag to disable page faults
18e16d6365 UPSTREAM: iomap: Support partial direct I/O on user copy failures
89f91db7ae UPSTREAM: iomap: Fix iomap_dio_rw return value for user copies
9d16bdb659 UPSTREAM: gfs2: Fix mmap + page fault deadlocks for buffered I/O
64ef40ba87 UPSTREAM: gfs2: Eliminate ip->i_gh
f0a127f84b UPSTREAM: gfs2: Move the inode glock locking to gfs2_file_buffered_write
4e70d7c309 UPSTREAM: gfs2: Introduce flag for glock holder auto-demotion
d0e98c116d UPSTREAM: gfs2: Clean up function may_grant
3b46c843f2 UPSTREAM: gfs2: Add wrapper for iomap_file_buffered_write
6603584106 UPSTREAM: iov_iter: Introduce fault_in_iov_iter_writeable
e1c331f4ec UPSTREAM: iov_iter: Turn iov_iter_fault_in_readable into fault_in_iov_iter_readable
d9fb814064 UPSTREAM: gup: Turn fault_in_pages_{readable,writeable} into fault_in_{readable,writeable}
4d242c3433 ANDROID: vendor_hooks: tune reclaim swappiness or scan type
113b63538c FROMLIST: power_supply: Register cooling device outside of probe
e4e3aadd01 ANDROID: vendor_hooks: Add hooks to tcp/udp send/recv msg functions.
cabca1b98e ANDROID: GKI: Add vendor hook to binder transaction
d1367b5473 ANDROID: binder: fix race in priority restore
e8fcc17a57 ANDROID: binder: switch task argument for binder_thread
16c04a2732 ANDROID: binder: pass desired priority by reference
7da5987f5d ANDROID: binder: fold common setup of node_prio
6fbdd5a252 ANDROID: vendor_hooks: Add hooks for account process tick
0902cc73b7 ANDROID: vendor_hooks: Add hooks for rwsem and mutex
3e3677f8f1 UPSTREAM: usb: gadget: f_mass_storage: Make CD-ROM emulation work with Mac OS-X
e0a580025c ANDROID: Update symbol list for mtk
9a7732c0b2 ANDROID: input: Add vendor hook for __pass_event in evdev.c
c555553a40 ANDROID: umh: Enable usermode helper for required use cases
50a2b178c5 ANDROID: vendor_hooks: Add hooks to dup_task_struct
d450a89aa1 ANDROID: GKI: add symbol list file for xiaomi
bfda92e572 ANDROID: ABI: Update symbols to unisoc whitelist for the 7th
dd4c3a3bc9 ANDROID: GKI: Update abi_gki_aarch64_qcom for pm flag set tracepoint
596dcf7986 ANDROID: vendor_hooks: Add hook in wakeup functionality
388f95c620 ANDROID: gki_defconfig: enable CONFIG_KFENCE_STATIC_KEYS
53df1b822d ANDROID: vendor_hooks: Add hooks for account irqtime process tick
825d9968d9 ANDROID: abi_gki_aarch64_qcom: Update qcom abi symbol list
862fbb8517 FROMGIT: mmc: core: Set reset done after hw reset
b9029542be ANDROID: KVM: arm64: Don't update IOMMUs unnecessarily
39e9847ef0 ANDROID: Creating boot.img for x86_64 GKI
3071eda198 ANDROID: abi_gki_aarch64_qcom: Update symbol list with usb_role_string
1ac270abbd ANDROID: gki_defconfig: Enable RCU_BOOST config
af6c1477c3 ANDROID: abi_gki_aarch64_qcom: Add android_vh_disable_thermal_cooling_stats
f6e47fd00f ANDROID: thermal: vendor hook to disable thermal cooling stats
2baf6bfef4 UPSTREAM: usb: gadget: f_mass_storage: Disable eps during disconnect
c1993b4cbc ANDROID: Update symbols list and ABI for qcom
03b512f716 UPSTREAM: media: uvcvideo: Add UVC_GUID_FORMAT_H265
d1b6bd094b ANDROID: vendor_hooks: Add hook in shrink_node_memcgs
120823bf95 UPSTREAM: usb: dwc3: gadget: Change to dev_dbg() when queuing to inactive gadget/ep
7bfb6542ae ANDROID: Add several symbol lists for unisoc
78d6de7863 ANDROID: Fix the CONFIG_ANDROID_VENDOR_OEM_DATA=n build
45a91f3011 ANDROID: abi_gki_aarch64_qcom: Add kobject_get
842137671f Revert "ANDROID: GKI: Add ANDROID_OEM_DATA in struct request_queue"
443c11e0b1 Revert "ANDROID: GKI: Add ANDROID_OEM_DATA in struct blk_mq_ctx"
b982f17e13 Revert "ANDROID: GKI: Add ANDROID_OEM_DATA in struct blk_mq_tags"
3062974bf9 Revert "ANDROID: GKI: enable CONFIG_BLK_CGROUP_IOCOST"
f0b29dd9e3 ANDROID: lib: Export show_mem() for vendor module usage
50e4cd9df7 ANDROID: vendor_hooks: Add hooks for memory when debug
5a70133feb ANDROID: vendor_hooks: Add hook in try_to_unmap_one()
73c9d4a9d5 ANDROID: vendor_hooks: Add hook in mmap_region()
caaafb7005 FROMGIT: cfi: Fix __cfi_slowpath_diag RCU usage with cpuidle
49ad57e915 ANDROID: mm/memory_hotplug: Don't special case memory_block_size_bytes
6b6c4a7373 ANDROID: abi_gki_aarch64_qcom: Add android_vh_ufs_clock_scaling
3ff9481aad ANDROID: scsi: ufs: Add hook to influence the UFS clock scaling policy
442d3a107b ANDROID: Update symbol list for mtk
f85e3d9101 ANDROID: scheduler: export task_sched_runtime
aa0e7ec774 ANDROID: GKI: enable CONFIG_BLK_CGROUP_IOCOST
9123d4dfe5 ANDROID: GKI: Add ANDROID_OEM_DATA in struct blk_mq_tags
7f6e518e43 ANDROID: GKI: Add ANDROID_OEM_DATA in struct blk_mq_ctx
f4e36db507 ANDROID: GKI: Add ANDROID_OEM_DATA in struct request_queue
7e54032750 ANDROID: Update mtktv symbol list
c6b53b7aac ANDROID: abi_gki_aarch64_qcom: Update qcom abi symbol list
3c55aa6ffe ANDROID: GKI: add vendor padding variable in struct skb_shared_info
f45d12df24 ANDROID: GKI: Enable DM_INIT
149474c544 FROMLIST: power_supply: Use of-thermal cdev registration API
291dfda577 ANDROID: init_task: Init android vendor and oem data
afd403d142 ANDROID: qcom: Add flush_delayed_fput to ABI
6976d861b5 ANDROID: GKI: build damon reclaim
11bc7e6f8e FROMLIST: mm/damon/reclaim: Fix the timer always stays active
71da156123 BACKPORT: treewide: Add missing includes masked by cgroup -> bpf dependency
caffd17b02 UPSTREAM: mm/damon: modify damon_rand() macro to static inline function
802a5dc657 UPSTREAM: mm/damon: add 'age' of region tracepoint support
7019f96d3f UPSTREAM: mm/damon: hide kernel pointer from tracepoint event
c5bf6f61a3 UPSTREAM: mm/damon/vaddr: hide kernel pointer from damon_va_three_regions() failure log
d7cbb8dc2a UPSTREAM: mm/damon/vaddr: use pr_debug() for damon_va_three_regions() failure logging
2d1227b126 UPSTREAM: mm/damon/dbgfs: remove an unnecessary variable
2861a7ee7f UPSTREAM: mm/damon: move the implementation of damon_insert_region to damon.h
508a322b77 UPSTREAM: mm/damon: add access checking for hugetlb pages
6fdce9a014 UPSTREAM: mm/damon/dbgfs: support all DAMOS stats
86a0f3958c UPSTREAM: mm/damon/reclaim: provide reclamation statistics
168c5dc29f UPSTREAM: mm/damon/schemes: account how many times quota limit has exceeded
9818aed77f UPSTREAM: mm/damon/schemes: account scheme actions that successfully applied
82b9795ec7 UPSTREAM: mm/damon: convert macro functions to static inline functions
f92ba978fa UPSTREAM: mm/damon: move damon_rand() definition into damon.h
6e04c85054 UPSTREAM: mm/damon/schemes: add the validity judgment of thresholds
548424cefd UPSTREAM: mm/damon/vaddr: remove swap_ranges() and replace it with swap()
428792a841 UPSTREAM: mm/damon: remove some unneeded function definitions in damon.h
38e43af06a UPSTREAM: mm/damon/core: use abs() instead of diff_of()
cd8dce3046 UPSTREAM: mm/damon: unified access_check function naming rules
bdf02a7f4e UPSTREAM: mm/damon/vaddr-test: remove unnecessary variables
a5bd0713be UPSTREAM: mm/damon/vaddr-test: split a test function having >1024 bytes frame size
2f0229c408 UPSTREAM: mm/damon/vaddr: remove an unnecessary warning message
999d83f120 UPSTREAM: mm/damon/core: remove unnecessary error messages
49de2cb8a5 UPSTREAM: mm/damon/dbgfs: remove an unnecessary error message
e5a2bdfb0a BACKPORT: mm/damon/core: use better timer mechanisms selection threshold
d49b62ccfd BACKPORT: mm/damon/dbgfs: fix missed use of damon_dbgfs_lock
4c2134830a UPSTREAM: mm/damon: remove return value from before_terminate callback
db9b97b547 UPSTREAM: mm/damon: fix a few spelling mistakes in comments and a pr_debug message
c91a782b6f UPSTREAM: mm/damon: simplify stop mechanism
fe6bcb8dd4 UPSTREAM: mm/damon/dbgfs: add adaptive_targets list check before enable monitor_on
ae3795eb00 UPSTREAM: mm/damon: remove unnecessary variable initialization
1a5e255ce9 UPSTREAM: mm/damon: introduce DAMON-based Reclamation (DAMON_RECLAIM)
97567267f7 UPSTREAM: selftests/damon: support watermarks
ffaa746d7c UPSTREAM: mm/damon/dbgfs: support watermarks
c70ef2a367 BACKPORT: mm/damon/schemes: activate schemes based on a watermarks mechanism
defd69e678 UPSTREAM: tools/selftests/damon: update for regions prioritization of schemes
875ca13d08 UPSTREAM: mm/damon/dbgfs: support prioritization weights
4cfed5d5b1 UPSTREAM: mm/damon/vaddr,paddr: support pageout prioritization
6662408061 UPSTREAM: mm/damon/schemes: prioritize regions within the quotas
ddd1df8526 UPSTREAM: mm/damon/selftests: support schemes quotas
5f680e394a UPSTREAM: mm/damon/dbgfs: support quotas of schemes
b4aefd1c72 UPSTREAM: mm/damon/schemes: implement time quota
f80ebb9d5d UPSTREAM: mm/damon/schemes: skip already charged targets and regions
80d2863f9e UPSTREAM: mm/damon/schemes: implement size quota for schemes application speed control
41d98d4c47 UPSTREAM: mm/damon/paddr: support the pageout scheme
8d5c271cff UPSTREAM: mm/damon/dbgfs: remove unnecessary variables
8168da37a5 UPSTREAM: mm/damon/vaddr: constify static mm_walk_ops
fc0bae05e1 UPSTREAM: mm/damon/dbgfs: support physical memory monitoring
ae84fa2e25 UPSTREAM: mm/damon: implement primitives for physical address space monitoring
80990f467b UPSTREAM: mm/damon/vaddr: separate commonly usable functions
12c21e91e4 UPSTREAM: mm/damon/dbgfs-test: add a unit test case for 'init_regions'
efc9721c40 UPSTREAM: mm/damon/dbgfs: allow users to set initial monitoring target regions
70ebdef092 UPSTREAM: selftests/damon: add 'schemes' debugfs tests
a48740173e UPSTREAM: mm/damon/schemes: implement statistics feature
fd5ed35b71 UPSTREAM: mm/damon/dbgfs: support DAMON-based Operation Schemes
573fab31a5 UPSTREAM: mm/damon/vaddr: support DAMON-based Operation Schemes
b35e82062a UPSTREAM: mm/damon/core: implement DAMON-based Operation Schemes (DAMOS)
41e99990b8 UPSTREAM: mm/damon/core: account age of target regions
aaa3878862 UPSTREAM: mm/damon/core: nullify pointer ctx->kdamond with a NULL
340c92bec2 UPSTREAM: mm/damon: needn't hold kdamond_lock to print pid of kdamond
2df0d2dbd1 UPSTREAM: mm/damon: remove unnecessary do_exit() from kdamond
ec9618400e UPSTREAM: mm/damon/core: print kdamond start log in debug mode only
4680f26136 UPSTREAM: include/linux/damon.h: fix kernel-doc comments for 'damon_callback'
f840a4de99 UPSTREAM: mm/damon: grammar s/works/work/
a41c70ee0b ANDROID: vendor_hooks: add vendor hook in blk_mq_rq_ctx_init()
1c6391dd7a ANDROID: vendor_hooks: add vendor hook in blk_mq_alloc_rqs()

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Iefbbab398942ad769576399accd3ffcd24e41e93
2022-06-21 15:05:01 +02:00
keystone-kernel-automerger
52504962a0 Merge remote-tracking branch into HEAD
* keystone/mirror-android13-5.15: (134 commits)
  ANDROID: Enable GKI Dr. No Enforcement
  ANDROID: GKI: 6/17/2022 KMI update
  ANDROID: GKI: add PG_oem_reserved in enum pageflags
  ANDROID: power: Add ANDROID_OEM_DATA_ARRAY in freq_qos_request.
  FROMGIT: cgroup: Use separate src/dst nodes when preloading css_sets for migration
  ANDROID: vendor_hooks: export hooks of mem_cgroup subsystem
  ANDROID: vendor_hooks: add a field in pglist_data
  ANDROID: Allow vendor module to reclaim a memcg
  ANDROID: Export memcg functions to allow module to add new files
  ANDROID: vendor_hooks: add hooks in mem_cgroup subsystem
  ANDROID: ASoC: core- Add vendor data fields to support  hostless DAI
  ANDROID: GKI: Add ANDROID_OEM_DATA_ARRAY() in struct ufs_hba
  ANDROID: gic-v3: Update vendor hook to set affinity in GIC v3
  ANDROID: GKI: add ANDROID_OEM_DATA in struct bio
  BACKPORT: FROMLIST: cfg80211: Indicate MLO connection info in connect and roam callbacks
  BACKPORT: FROMGIT: wifi: cfg80211: add optional link add/remove callbacks
  BACKPORT: FROMGIT: wifi: cfg80211: sort trace.h
  BACKPORT: FROMGIT: wifi: nl80211: update add/remove link command
  BACKPORT: FROMGIT: wifi: nl80211: support MLO in auth/assoc
  BACKPORT: FROMGIT: wifi: cfg80211: simplify cfg80211_mlme_auth() prototype
  ...

Signed-off-by: keystone-kernel-automerger <keystone-kernel-automerger@google.com>
Change-Id: I7a277803e1f5510551edd14b2bd37d323d87d001
2022-06-21 06:17:27 +00:00
Tejun Heo
d1faa010ca FROMGIT: cgroup: Use separate src/dst nodes when preloading css_sets for migration
Each cset (css_set) is pinned by its tasks. When we're moving tasks around
across csets for a migration, we need to hold the source and destination
csets to ensure that they don't go away while we're moving tasks about. This
is done by linking cset->mg_preload_node on either the
mgctx->preloaded_src_csets or mgctx->preloaded_dst_csets list. Using the
same cset->mg_preload_node for both the src and dst lists was deemed okay as
a cset can't be both the source and destination at the same time.

Unfortunately, this overloading becomes problematic when multiple tasks are
involved in a migration and some of them are identity noop migrations while
others are actually moving across cgroups. For example, this can happen with
the following sequence on cgroup1:

 #1> mkdir -p /sys/fs/cgroup/misc/a/b
 #2> echo $$ > /sys/fs/cgroup/misc/a/cgroup.procs
 #3> RUN_A_COMMAND_WHICH_CREATES_MULTIPLE_THREADS &
 #4> PID=$!
 #5> echo $PID > /sys/fs/cgroup/misc/a/b/tasks
 #6> echo $PID > /sys/fs/cgroup/misc/a/cgroup.procs

the process including the group leader back into a. In this final migration,
non-leader threads would be doing identity migration while the group leader
is doing an actual one.

After #3, let's say the whole process was in cset A, and that after #4, the
leader moves to cset B. Then, during #6, the following happens:

 1. cgroup_migrate_add_src() is called on B for the leader.

 2. cgroup_migrate_add_src() is called on A for the other threads.

 3. cgroup_migrate_prepare_dst() is called. It scans the src list.

 4. It notices that B wants to migrate to A, so it tries to A to the dst
    list but realizes that its ->mg_preload_node is already busy.

 5. and then it notices A wants to migrate to A as it's an identity
    migration, it culls it by list_del_init()'ing its ->mg_preload_node and
    putting references accordingly.

 6. The rest of migration takes place with B on the src list but nothing on
    the dst list.

This means that A isn't held while migration is in progress. If all tasks
leave A before the migration finishes and the incoming task pins it, the
cset will be destroyed leading to use-after-free.

This is caused by overloading cset->mg_preload_node for both src and dst
preload lists. We wanted to exclude the cset from the src list but ended up
inadvertently excluding it from the dst list too.

This patch fixes the issue by separating out cset->mg_preload_node into
->mg_src_preload_node and ->mg_dst_preload_node, so that the src and dst
preloadings don't interfere with each other.

Signed-off-by: Tejun Heo <tj@kernel.org>
Reported-by: Mukesh Ojha <quic_mojha@quicinc.com>
Reported-by: shisiyuan <shisiyuan19870131@gmail.com>
Link: http://lkml.kernel.org/r/1654187688-27411-1-git-send-email-shisiyuan@xiaomi.com
Link: https://www.spinics.net/lists/cgroups/msg33313.html
Fixes: f817de9851 ("cgroup: prepare migration path for unified hierarchy")
Cc: stable@vger.kernel.org # v3.16+
(cherry picked from commit 07fd5b6cdf3cc30bfde8fe0f644771688be04447
 https://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup.git for-5.19-fixes)
Bug: 235577024
Change-Id: Ieaf1c0c8fc23753570897fd6e48a54335ab939ce
Signed-off-by: Steve Muckle <smuckle@google.com>
2022-06-18 13:20:30 -07:00
Liujie Xie
326983dc9c ANDROID: Export memcg functions to allow module to add new files
Export cgroup_add_legacy_cftypes and a helper function to allow vendor module to expose additional files in the memory cgroup hierarchy.

Bug: 192052083

Signed-off-by: Liujie Xie <xieliujie@oppo.com>
Change-Id: Ie2b936b3e77c7ab6d740d1bb6d70e03c70a326a7
(cherry picked from commit f41a95eadca98506e627b21f5cc73332bba4d95c)
2022-06-18 13:20:30 -07:00
Greg Kroah-Hartman
0b82194ecb ANDROID: GKI: sched: add Android ABI padding to some structures
Try to mitigate potential future driver core api changes by adding
padding to a number of core internal scheduler structures.

Bug: 151154716
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I0ef2f8dd5f3259dcf443c5045aa1e8505ed78a76
2022-06-18 18:44:16 +00:00
Liangliang Li
9662426af3 ANDROID: sched: Add oem data in struct rq
Add ANDROID_OEM_DATA to struct rq, which is used to implement oem's
scheduler tuning.

Bug: 188899490
Change-Id: I1904b4fd83effc4b309bfb98811e9718398504f4
Signed-off-by: Liangliang Li <liliangliang@vivo.com>
2022-06-18 18:28:50 +00:00
Suren Baghdasaryan
a3fe25d923 ANDROID: add vma->file_ref_count to synchronize vma->vm_file destruction
In order to prevent destruction of vma->vm_file while it's being used
during speculative page fault handling, introduce an atomic refcounter.

Bug: 234527424
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Change-Id: I0e971156f3e76feb45136bac1582a7eaab8c75df
2022-06-18 18:28:46 +00:00
Suren Baghdasaryan
a16e169d36 Revert "ANDROID: Use the notifier lock to perform file-backed vma teardown"
This reverts commit dc8ac508af.
Reason for revert: performance regression.

Bug: 234527424
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Change-Id: I5811c7ee2feac7f9057ed0ccd848e5de71f79354
2022-06-18 18:28:46 +00:00
Kumar Kartikeya Dwivedi
83e7514f57 UPSTREAM: bpf: Fix crash due to out of bounds access into reg2btf_ids.
commit 45ce4b4f9009102cd9f581196d480a59208690c1 upstream

When commit e6ac2450d6 ("bpf: Support bpf program calling kernel function") added
kfunc support, it defined reg2btf_ids as a cheap way to translate the verifier
reg type to the appropriate btf_vmlinux BTF ID, however
commit c25b2ae13603 ("bpf: Replace PTR_TO_XXX_OR_NULL with PTR_TO_XXX | PTR_MAYBE_NULL")
moved the __BPF_REG_TYPE_MAX from the last member of bpf_reg_type enum to after
the base register types, and defined other variants using type flag
composition. However, now, the direct usage of reg->type to index into
reg2btf_ids may no longer fall into __BPF_REG_TYPE_MAX range, and hence lead to
out of bounds access and kernel crash on dereference of bad pointer.

[backport note: commit 3363bd0cfbb80 ("bpf: Extend kfunc with PTR_TO_CTX, PTR_TO_MEM
 argument support") was introduced after 5.15 and contains an out of bound
 reg2btf_ids access. Since that commit hasn't been backported, this patch
 doesn't include fix to that access. If we backport that commit in future,
 we need to fix its faulting access as well.]

Fixes: c25b2ae13603 ("bpf: Replace PTR_TO_XXX_OR_NULL with PTR_TO_XXX | PTR_MAYBE_NULL")
Signed-off-by: Kumar Kartikeya Dwivedi <memxor@gmail.com>
Signed-off-by: Hao Luo <haoluo@google.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/20220216201943.624869-1-memxor@gmail.com
Cc: stable@vger.kernel.org # v5.15+
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 8c39925e98)
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I7e341206119c7cb3552e58bb3e1c453e97e78a77
2022-06-18 18:28:45 +00:00
Hao Luo
8f07caaddc UPSTREAM: bpf: Add MEM_RDONLY for helper args that are pointers to rdonly mem.
commit 216e3cd2f28dbbf1fe86848e0e29e6693b9f0a20 upstream.

Some helper functions may modify its arguments, for example,
bpf_d_path, bpf_get_stack etc. Previously, their argument types
were marked as ARG_PTR_TO_MEM, which is compatible with read-only
mem types, such as PTR_TO_RDONLY_BUF. Therefore it's legitimate,
but technically incorrect, to modify a read-only memory by passing
it into one of such helper functions.

This patch tags the bpf_args compatible with immutable memory with
MEM_RDONLY flag. The arguments that don't have this flag will be
only compatible with mutable memory types, preventing the helper
from modifying a read-only memory. The bpf_args that have
MEM_RDONLY are compatible with both mutable memory and immutable
memory.

Signed-off-by: Hao Luo <haoluo@google.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/20211217003152.48334-9-haoluo@google.com
Cc: stable@vger.kernel.org # 5.15.x
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 2a77c58726)
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Id62021f1dde9eefc3148c877f5c1a68519a4b77f
2022-06-18 18:28:45 +00:00
Hao Luo
e1714bff1c UPSTREAM: bpf: Make per_cpu_ptr return rdonly PTR_TO_MEM.
commit 34d3a78c681e8e7844b43d1a2f4671a04249c821 upstream.

Tag the return type of {per, this}_cpu_ptr with RDONLY_MEM. The
returned value of this pair of helpers is kernel object, which
can not be updated by bpf programs. Previously these two helpers
return PTR_OT_MEM for kernel objects of scalar type, which allows
one to directly modify the memory. Now with RDONLY_MEM tagging,
the verifier will reject programs that write into RDONLY_MEM.

Fixes: 63d9b80dcf ("bpf: Introducte bpf_this_cpu_ptr()")
Fixes: eaa6bcb71e ("bpf: Introduce bpf_per_cpu_ptr()")
Fixes: 4976b718c3 ("bpf: Introduce pseudo_btf_id")
Signed-off-by: Hao Luo <haoluo@google.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/20211217003152.48334-8-haoluo@google.com
Cc: stable@vger.kernel.org # 5.15.x
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 15166bb300)
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Ia4b902ba12ab23cde1d0457e6619f42521032253
2022-06-18 18:28:44 +00:00
Hao Luo
d7ebee8df3 UPSTREAM: bpf: Convert PTR_TO_MEM_OR_NULL to composable types.
commit cf9f2f8d62eca810afbd1ee6cc0800202b000e57 upstream.

Remove PTR_TO_MEM_OR_NULL and replace it with PTR_TO_MEM combined with
flag PTR_MAYBE_NULL.

Signed-off-by: Hao Luo <haoluo@google.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/20211217003152.48334-7-haoluo@google.com
Cc: stable@vger.kernel.org # 5.15.x
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit b710f73704)
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Ie2c093c3deb2015c47a7ef0abc9498394d4cdacc
2022-06-18 18:28:44 +00:00
Hao Luo
1cd4928129 UPSTREAM: bpf: Introduce MEM_RDONLY flag
commit 20b2aff4bc15bda809f994761d5719827d66c0b4 upstream.

This patch introduce a flag MEM_RDONLY to tag a reg value
pointing to read-only memory. It makes the following changes:

1. PTR_TO_RDWR_BUF -> PTR_TO_BUF
2. PTR_TO_RDONLY_BUF -> PTR_TO_BUF | MEM_RDONLY

Signed-off-by: Hao Luo <haoluo@google.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/20211217003152.48334-6-haoluo@google.com
Cc: stable@vger.kernel.org # 5.15.x
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit b453361384)
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Ic4fa4f9f5832c9d2b65ea0272367fbbb8007f24c
2022-06-18 18:28:44 +00:00
Hao Luo
13fc6550b0 UPSTREAM: bpf: Replace PTR_TO_XXX_OR_NULL with PTR_TO_XXX | PTR_MAYBE_NULL
commit c25b2ae136039ffa820c26138ed4a5e5f3ab3841 upstream.

We have introduced a new type to make bpf_reg composable, by
allocating bits in the type to represent flags.

One of the flags is PTR_MAYBE_NULL which indicates a pointer
may be NULL. This patch switches the qualified reg_types to
use this flag. The reg_types changed in this patch include:

1. PTR_TO_MAP_VALUE_OR_NULL
2. PTR_TO_SOCKET_OR_NULL
3. PTR_TO_SOCK_COMMON_OR_NULL
4. PTR_TO_TCP_SOCK_OR_NULL
5. PTR_TO_BTF_ID_OR_NULL
6. PTR_TO_MEM_OR_NULL
7. PTR_TO_RDONLY_BUF_OR_NULL
8. PTR_TO_RDWR_BUF_OR_NULL

[haoluo: backport notes
 There was a reg_type_may_be_null() in adjust_ptr_min_max_vals() in
 5.15.x, but didn't exist in the upstream commit. This backport
 converted that reg_type_may_be_null() to type_may_be_null() as well.]

Signed-off-by: Hao Luo <haoluo@google.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/r/20211217003152.48334-5-haoluo@google.com
Cc: stable@vger.kernel.org # 5.15.x
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 8d38cde47a)
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Iad81be90619024512c0fd7f23e7115aec60244a4
2022-06-18 18:28:44 +00:00
Hao Luo
f5a45f25bf UPSTREAM: bpf: Replace RET_XXX_OR_NULL with RET_XXX | PTR_MAYBE_NULL
commit 3c4807322660d4290ac9062c034aed6b87243861 upstream.

We have introduced a new type to make bpf_ret composable, by
reserving high bits to represent flags.

One of the flag is PTR_MAYBE_NULL, which indicates a pointer
may be NULL. When applying this flag to ret_types, it means
the returned value could be a NULL pointer. This patch
switches the qualified arg_types to use this flag.
The ret_types changed in this patch include:

1. RET_PTR_TO_MAP_VALUE_OR_NULL
2. RET_PTR_TO_SOCKET_OR_NULL
3. RET_PTR_TO_TCP_SOCK_OR_NULL
4. RET_PTR_TO_SOCK_COMMON_OR_NULL
5. RET_PTR_TO_ALLOC_MEM_OR_NULL
6. RET_PTR_TO_MEM_OR_BTF_ID_OR_NULL
7. RET_PTR_TO_BTF_ID_OR_NULL

This patch doesn't eliminate the use of these names, instead
it makes them aliases to 'RET_PTR_TO_XXX | PTR_MAYBE_NULL'.

Signed-off-by: Hao Luo <haoluo@google.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/20211217003152.48334-4-haoluo@google.com
Cc: stable@vger.kernel.org # 5.15.x
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 3c141c82b9)
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I8839f9896424565ee6cef8a6706d1c313886fea2
2022-06-18 18:28:44 +00:00
Hao Luo
cc6305f056 UPSTREAM: bpf: Replace ARG_XXX_OR_NULL with ARG_XXX | PTR_MAYBE_NULL
commit 48946bd6a5d695c50b34546864b79c1f910a33c1 upstream.

We have introduced a new type to make bpf_arg composable, by
reserving high bits of bpf_arg to represent flags of a type.

One of the flags is PTR_MAYBE_NULL which indicates a pointer
may be NULL. When applying this flag to an arg_type, it means
the arg can take NULL pointer. This patch switches the
qualified arg_types to use this flag. The arg_types changed
in this patch include:

1. ARG_PTR_TO_MAP_VALUE_OR_NULL
2. ARG_PTR_TO_MEM_OR_NULL
3. ARG_PTR_TO_CTX_OR_NULL
4. ARG_PTR_TO_SOCKET_OR_NULL
5. ARG_PTR_TO_ALLOC_MEM_OR_NULL
6. ARG_PTR_TO_STACK_OR_NULL

This patch does not eliminate the use of these arg_types, instead
it makes them an alias to the 'ARG_XXX | PTR_MAYBE_NULL'.

Signed-off-by: Hao Luo <haoluo@google.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/20211217003152.48334-3-haoluo@google.com
Cc: stable@vger.kernel.org # 5.15.x
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit d58a396fa6)
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Ie031a5f36d9bedda846800ea79da41cd2d68f1a9
2022-06-18 18:28:44 +00:00
keystone-kernel-automerger
627adfa0b7 Merge remote-tracking branch into HEAD
* keystone/mirror-android13-5.15:
  ANDROID: GKI: Update symbols to symbol list
  FROMLIST: iommu/mediatek: Allow page table PA up to 35bit
  FROMLIST: iommu/io-pgtable-arm-v7s: Add a quirk to allow pgtable PA up to 35bit
  ANDROID: Add vendor hooks to signal.
  ANDROID: ashmem: Export is_ashmem_file
  ANDROID: vendor_hooks: bypass shrink slab
  FROMLIST: devcoredump : Serialize devcd_del work
  ANDROID: GKI: Update symbols list for vivo
  ANDROID: ABI: Update symbols used by the unisoc filesystem whitelist for the 1st
  FROMLIST: of: of_reserved_mem: Increase limit for reserved_mem regions

Signed-off-by: keystone-kernel-automerger <keystone-kernel-automerger@google.com>
Change-Id: Ifc427c44d02b7b2476acf7a7e90fa8b67d4bdc8f
2022-06-17 06:17:33 +00:00
Zhuguangqing
4f746c15d7 ANDROID: Add vendor hooks to signal.
Add vendor hook to get signal for vendor-specific tuning.

Conflicts:
    drivers/android/vendor_hooks.c

Bug: 184898838

Signed-off-by: Zhuguangqing <zhuguangqing@xiaomi.com>
Change-Id: I83a28b0a6eb413976f4c57f2314d008ad792fa0d
(cherry picked from commit d623f1ff724d5cdc0913e020b2a1b562868aa4d8)
2022-06-16 20:28:30 +00:00
keystone-kernel-automerger
e4e29121d7 Merge remote-tracking branch into HEAD
* keystone/mirror-android13-5.15:
  ANDROID: GKI: Add symbol list file for vivo
  ANDROID: Revert "tracing: Disable "other" permission bits in the tracefs files"
  ANDROID: vendor_hooks: Add hook for binder
  ANDROID: GKI: Update abi_gki_aarch64_qcom for devm_of_clk_del_provider
  Revert "ANDROID: umh: Enable usermode helper for required use cases"

Signed-off-by: keystone-kernel-automerger <keystone-kernel-automerger@google.com>
Change-Id: Ib5a7ae8f71ef40accfac325f3c6d28e049956be1
2022-06-16 06:17:15 +00:00
Kalesh Singh
64a4e77c86 ANDROID: Revert "tracing: Disable "other" permission bits in the tracefs files"
This reverts commit 4e4f6e33d6.

The file permission changes break android userspace tools that depend on
tracefs on device with older platform release (Android 12/12L).

The removal of other bits from tracefs directory permissions are reverted in android13 kernels, so also revert the change for file permission bits. android14 kernels will align with upstream tracefs.

Bug: 236018289
Signed-off-by: Kalesh Singh <kaleshsingh@google.com>
Change-Id: If07ae097c2a45fa54163681df7790a6e2537ba31
2022-06-15 20:45:53 +00:00
Greg Kroah-Hartman
4a0a0fef25 Revert "ANDROID: umh: Enable usermode helper for required use cases"
This reverts commit c555553a40.

Reason for revert: The binaries, and /sbin/ is not even present on Android systems.  This patch was never tested :(

Bug: 202192667
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Ia1c35eba4a89a62ba678d8004742563372d3d920
2022-06-15 05:43:05 +00:00
Mark-PK Tsai
6eb85cbd9e tracing: Avoid adding tracer option before update_tracer_options
[ Upstream commit ef9188bcc6ca1d8a2ad83e826b548e6820721061 ]

To prepare for support asynchronous tracer_init_tracefs initcall,
avoid calling create_trace_option_files before __update_tracer_options.
Otherwise, create_trace_option_files will show warning because
some tracers in trace_types list are already in tr->topts.

For example, hwlat_tracer call register_tracer in late_initcall,
and global_trace.dir is already created in tracing_init_dentry,
hwlat_tracer will be put into tr->topts.
Then if the __update_tracer_options is executed after hwlat_tracer
registered, create_trace_option_files find that hwlat_tracer is
already in tr->topts.

Link: https://lkml.kernel.org/r/20220426122407.17042-2-mark-pk.tsai@mediatek.com

Link: https://lore.kernel.org/lkml/20220322133339.GA32582@xsang-OptiPlex-9020/
Reported-by: kernel test robot <oliver.sang@intel.com>
Signed-off-by: Mark-PK Tsai <mark-pk.tsai@mediatek.com>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-06-14 18:36:14 +02:00
Jun Miao
9b534640a2 tracing: Fix sleeping function called from invalid context on RT kernel
[ Upstream commit 12025abdc8539ed9d5014e2d647a3fd1bd3de5cd ]

When setting bootparams="trace_event=initcall:initcall_start tp_printk=1" in the
cmdline, the output_printk() was called, and the spin_lock_irqsave() was called in the
atomic and irq disable interrupt context suitation. On the PREEMPT_RT kernel,
these locks are replaced with sleepable rt-spinlock, so the stack calltrace will
be triggered.
Fix it by raw_spin_lock_irqsave when PREEMPT_RT and "trace_event=initcall:initcall_start
tp_printk=1" enabled.

 BUG: sleeping function called from invalid context at kernel/locking/spinlock_rt.c:46
 in_atomic(): 1, irqs_disabled(): 0, non_block: 0, pid: 1, name: swapper/0
 preempt_count: 2, expected: 0
 RCU nest depth: 0, expected: 0
 Preemption disabled at:
 [<ffffffff8992303e>] try_to_wake_up+0x7e/0xba0
 CPU: 0 PID: 1 Comm: swapper/0 Not tainted 5.17.1-rt17+ #19 34c5812404187a875f32bee7977f7367f9679ea7
 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.14.0-2 04/01/2014
 Call Trace:
  <TASK>
  dump_stack_lvl+0x60/0x8c
  dump_stack+0x10/0x12
  __might_resched.cold+0x11d/0x155
  rt_spin_lock+0x40/0x70
  trace_event_buffer_commit+0x2fa/0x4c0
  ? map_vsyscall+0x93/0x93
  trace_event_raw_event_initcall_start+0xbe/0x110
  ? perf_trace_initcall_finish+0x210/0x210
  ? probe_sched_wakeup+0x34/0x40
  ? ttwu_do_wakeup+0xda/0x310
  ? trace_hardirqs_on+0x35/0x170
  ? map_vsyscall+0x93/0x93
  do_one_initcall+0x217/0x3c0
  ? trace_event_raw_event_initcall_level+0x170/0x170
  ? push_cpu_stop+0x400/0x400
  ? cblist_init_generic+0x241/0x290
  kernel_init_freeable+0x1ac/0x347
  ? _raw_spin_unlock_irq+0x65/0x80
  ? rest_init+0xf0/0xf0
  kernel_init+0x1e/0x150
  ret_from_fork+0x22/0x30
  </TASK>

Link: https://lkml.kernel.org/r/20220419013910.894370-1-jun.miao@intel.com

Signed-off-by: Jun Miao <jun.miao@intel.com>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-06-14 18:36:14 +02:00
Jeff Xie
c1c62c5fa9 tracing: Make tp_printk work on syscall tracepoints
[ Upstream commit cb1c45fb68b8a4285ccf750842b1136f26cfe267 ]

Currently the tp_printk option has no effect on syscall tracepoint.
When adding the kernel option parameter tp_printk, then:

echo 1 > /sys/kernel/debug/tracing/events/syscalls/enable

When running any application, no trace information is printed on the
terminal.

Now added printk for syscall tracepoints.

Link: https://lkml.kernel.org/r/20220410145025.681144-1-xiehuan09@gmail.com

Signed-off-by: Jeff Xie <xiehuan09@gmail.com>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-06-14 18:36:14 +02:00
Menglong Dong
f95e24bf19 bpf: Fix probe read error in ___bpf_prog_run()
[ Upstream commit caff1fa4118cec4dfd4336521ebd22a6408a1e3e ]

I think there is something wrong with BPF_PROBE_MEM in ___bpf_prog_run()
in big-endian machine. Let's make a test and see what will happen if we
want to load a 'u16' with BPF_PROBE_MEM.

Let's make the src value '0x0001', the value of dest register will become
0x0001000000000000, as the value will be loaded to the first 2 byte of
DST with following code:

  bpf_probe_read_kernel(&DST, SIZE, (const void *)(long) (SRC + insn->off));

Obviously, the value in DST is not correct. In fact, we can compare
BPF_PROBE_MEM with LDX_MEM_H:

  DST = *(SIZE *)(unsigned long) (SRC + insn->off);

If the memory load is done by LDX_MEM_H, the value in DST will be 0x1 now.

And I think this error results in the test case 'test_bpf_sk_storage_map'
failing:

  test_bpf_sk_storage_map:PASS:bpf_iter_bpf_sk_storage_map__open_and_load 0 nsec
  test_bpf_sk_storage_map:PASS:socket 0 nsec
  test_bpf_sk_storage_map:PASS:map_update 0 nsec
  test_bpf_sk_storage_map:PASS:socket 0 nsec
  test_bpf_sk_storage_map:PASS:map_update 0 nsec
  test_bpf_sk_storage_map:PASS:socket 0 nsec
  test_bpf_sk_storage_map:PASS:map_update 0 nsec
  test_bpf_sk_storage_map:PASS:attach_iter 0 nsec
  test_bpf_sk_storage_map:PASS:create_iter 0 nsec
  test_bpf_sk_storage_map:PASS:read 0 nsec
  test_bpf_sk_storage_map:FAIL:ipv6_sk_count got 0 expected 3
  $10/26 bpf_iter/bpf_sk_storage_map:FAIL

The code of the test case is simply, it will load sk->sk_family to the
register with BPF_PROBE_MEM and check if it is AF_INET6. With this patch,
now the test case 'bpf_iter' can pass:

  $10  bpf_iter:OK

Fixes: 2a02759ef5 ("bpf: Add support for BTF pointers to interpreter")
Signed-off-by: Menglong Dong <imagedong@tencent.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Reviewed-by: Jiang Biao <benbjiang@tencent.com>
Reviewed-by: Hao Peng <flyingpeng@tencent.com>
Cc: Ilya Leoshkevich <iii@linux.ibm.com>
Link: https://lore.kernel.org/bpf/20220524021228.533216-1-imagedong@tencent.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-06-14 18:36:11 +02:00
keystone-kernel-automerger
caa21ea7c0 Merge remote-tracking branch into HEAD
* keystone/mirror-android13-5.15:
  ANDROID: mutex: Add vendor hook to init mutex oem data.
  FROMLIST: scsi: ufs-mediatek: Introduce workaround for power mode change
  FROMLIST: scsi: ufs: Fix ADAPT logic for HS-G5
  FROMLIST: scsi: ufs: Export ufshcd_uic_change_pwr_mode()
  ANDROID: Update symbol list for mtk
  BACKPORT: FROMGIT: usb: dwc3: add power down scale setting
  ANDROID: GKI: remove info print for header generation
  UPSTREAM: gup: Introduce FOLL_NOFAULT flag to disable page faults
  UPSTREAM: iomap: Support partial direct I/O on user copy failures
  UPSTREAM: iomap: Fix iomap_dio_rw return value for user copies
  UPSTREAM: gfs2: Fix mmap + page fault deadlocks for buffered I/O
  UPSTREAM: gfs2: Eliminate ip->i_gh
  UPSTREAM: gfs2: Move the inode glock locking to gfs2_file_buffered_write
  UPSTREAM: gfs2: Introduce flag for glock holder auto-demotion
  UPSTREAM: gfs2: Clean up function may_grant
  UPSTREAM: gfs2: Add wrapper for iomap_file_buffered_write
  UPSTREAM: iov_iter: Introduce fault_in_iov_iter_writeable
  UPSTREAM: iov_iter: Turn iov_iter_fault_in_readable into fault_in_iov_iter_readable
  UPSTREAM: gup: Turn fault_in_pages_{readable,writeable} into fault_in_{readable,writeable}

Signed-off-by: keystone-kernel-automerger <keystone-kernel-automerger@google.com>
Change-Id: Iea9bec48d51e927a7ae28683288934b0c512e50b
2022-06-13 06:17:35 +00:00
Dezhi Huang
854f840411 ANDROID: mutex: Add vendor hook to init mutex oem data.
Add hooks to init oem data of mutex.

Bug: 231527236
Signed-off-by: Dezhi Huang <huangdezhi@hihonor.com>
Change-Id: Id0aeac168e81bd3d88051657c32ba709c329dbdd
2022-06-10 18:14:26 +00:00
keystone-kernel-automerger
becc7ccb69 Merge remote-tracking branch into HEAD
* keystone/mirror-android13-5.15:
  ANDROID: vendor_hooks: tune reclaim swappiness or scan type
  FROMLIST: power_supply: Register cooling device outside of probe
  ANDROID: vendor_hooks: Add hooks to tcp/udp send/recv msg functions.
  ANDROID: GKI: Add vendor hook to binder transaction
  ANDROID: binder: fix race in priority restore
  ANDROID: binder: switch task argument for binder_thread
  ANDROID: binder: pass desired priority by reference
  ANDROID: binder: fold common setup of node_prio
  ANDROID: vendor_hooks: Add hooks for account process tick
  ANDROID: vendor_hooks: Add hooks for rwsem and mutex
  UPSTREAM: usb: gadget: f_mass_storage: Make CD-ROM emulation work with Mac OS-X
  ANDROID: Update symbol list for mtk
  ANDROID: input: Add vendor hook for __pass_event in evdev.c

Signed-off-by: keystone-kernel-automerger <keystone-kernel-automerger@google.com>
Change-Id: Ifdaeb13b62dff3202821f7fd256947abd05dece6
2022-06-10 06:17:29 +00:00
Liujie Xie
6fbdd5a252 ANDROID: vendor_hooks: Add hooks for account process tick
Add a hook in account_process_tick, which help us to get information
about the high load task and the cpu they running on.

Bug: 183260319
Change-Id: I54162ce3c65bd69e08d2d4747e4d4883efe4c442
Signed-off-by: Liujie Xie <xieliujie@oppo.com>
(cherry picked from commit 63399b4e2e25b0a1522deb724f1de269ac4c8f8b)
2022-06-09 18:57:17 +00:00
xieliujie
0902cc73b7 ANDROID: vendor_hooks: Add hooks for rwsem and mutex
Add hooks to apply oem's optimization of rwsem and mutex

Bug: 182237112
Signed-off-by: xieliujie <xieliujie@oppo.com>
Change-Id: I6332623732e2d6826b8b61087ca74e55393e0c3d
(cherry picked from commit 80b4341d0520dce2ef1e33aef06c6a2bc8ada518)
2022-06-09 18:25:12 +00:00