Commit Graph

989918 Commits

Author SHA1 Message Date
Greg Kroah-Hartman
1aff1ca4be ANDROID: change function signatures for some random functions.
In 5.10.119 the functions add_device_randomness() and get_random_bytes()
want from:
	void get_random_bytes(void *buf, int len);
		->
	void get_random_bytes(void *buf, size_t len);

	void add_device_randomness(const void *buf, unsigned int len);
		->
	void add_device_randomness(const void *buf, size_t len);

	int __must_check get_random_bytes_arch(void *buf, int len);
		->
	size_t __must_check get_random_bytes_arch(void *buf, size_t len);

As these functions are part of the GKI abi to be preserved, move them
back.  As these are just lengths of the buffer, all is fine with the
size, they should never overflow.

Bug: 161946584
Fixes: 07280d2c3f ("random: make more consistent use of integer types")
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I5430259958b9a904e6e8b950e11526332c919c0c
2022-08-02 14:01:12 +02:00
Jason A. Donenfeld
335b7342a1 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: 5064550d42 ("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-08-02 14:01:12 +02:00
Greg Kroah-Hartman
cb817808c6 ANDROID: random: add back removed callback functions
Commit 6da877d2d4 ("random: replace custom notifier chain with
standard one") in 5.15.44 removed the add_random_ready_callback() and
del_random_ready_callback() functions, which are part of the current
Android ABI in this branch.  To handle this properly, add them back in
order for out-of-tree code to continue working.

Bug: 161946584
Fixes: 6da877d2d4 ("random: replace custom notifier chain with standard one")
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I422f3af1a28c5cf2e7f7806d6fb37d66901e3a33
2022-08-02 14:01:12 +02:00
Michal Kubecek
9829ff4f72 UPSTREAM: Revert "net: af_key: add check for pfkey_broadcast in function pfkey_process"
This reverts commit 4dc2a5a8f6.

A non-zero return value from pfkey_broadcast() does not necessarily mean
an error occurred as this function returns -ESRCH when no registered
listener received the message. In particular, a call with
BROADCAST_PROMISC_ONLY flag and null one_sk argument can never return
zero so that this commit in fact prevents processing any PF_KEY message.
One visible effect is that racoon daemon fails to find encryption
algorithms like aes and refuses to start.

Excluding -ESRCH return value would fix this but it's not obvious that
we really want to bail out here and most other callers of
pfkey_broadcast() also ignore the return value. Also, as pointed out by
Steffen Klassert, PF_KEY is kind of deprecated and newer userspace code
should use netlink instead so that we should only disturb the code for
really important fixes.

v2: add a comment explaining why is the return value ignored

Signed-off-by: Michal Kubecek <mkubecek@suse.cz>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
(cherry picked from commit 9c90c9b3e5)
Reported-by: Carlos Llamas <cmllamas@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Ia2df29e35828d87edfc45fa3fe359e0a5a0fcb71
2022-08-02 14:01:12 +02:00
Justin M. Forbes
9e9e52e98e UPSTREAM: lib/crypto: add prompts back to crypto libraries
commit e56e189855 upstream.

Commit 6048fdcc5f ("lib/crypto: blake2s: include as built-in") took
away a number of prompt texts from other crypto libraries. This makes
values flip from built-in to module when oldconfig runs, and causes
problems when these crypto libs need to be built in for thingslike
BIG_KEYS.

Fixes: 6048fdcc5f ("lib/crypto: blake2s: include as built-in")
Cc: Herbert Xu <herbert@gondor.apana.org.au>
Cc: linux-crypto@vger.kernel.org
Signed-off-by: Justin M. Forbes <jforbes@fedoraproject.org>
[Jason: - moved menu into submenu of lib/ instead of root menu
        - fixed chacha sub-dependencies for CONFIG_CRYPTO]
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 630192aa45)
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I9f92399d94f5b00408203ce4a9237925e7435ec1
2022-08-02 14:01:12 +02:00
Greg Kroah-Hartman
9ebc6036fd Merge 5.10.119 into android13-5.10-lts
Changes in 5.10.119
	lockdown: also lock down previous kgdb use
	staging: rtl8723bs: prevent ->Ssid overflow in rtw_wx_set_scan()
	KVM: x86: Properly handle APF vs disabled LAPIC situation
	KVM: x86/mmu: fix NULL pointer dereference on guest INVPCID
	tcp: change source port randomizarion at connect() time
	secure_seq: use the 64 bits of the siphash for port offset calculation
	media: vim2m: Register video device after setting up internals
	media: vim2m: initialize the media device earlier
	ACPI: sysfs: Make sparse happy about address space in use
	ACPI: sysfs: Fix BERT error region memory mapping
	random: avoid arch_get_random_seed_long() when collecting IRQ randomness
	random: remove dead code left over from blocking pool
	MAINTAINERS: co-maintain random.c
	MAINTAINERS: add git tree for random.c
	crypto: lib/blake2s - Move selftest prototype into header file
	crypto: blake2s - define shash_alg structs using macros
	crypto: x86/blake2s - define shash_alg structs using macros
	crypto: blake2s - remove unneeded includes
	crypto: blake2s - move update and final logic to internal/blake2s.h
	crypto: blake2s - share the "shash" API boilerplate code
	crypto: blake2s - optimize blake2s initialization
	crypto: blake2s - add comment for blake2s_state fields
	crypto: blake2s - adjust include guard naming
	crypto: blake2s - include <linux/bug.h> instead of <asm/bug.h>
	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.10.119

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I1544e958e791180f51d27dc39010468ed6551103
2022-08-02 14:00:36 +02:00
Greg Kroah-Hartman
64f18041dd Merge branch 'android13-5.10' into branch 'android13-5.10-lts'
Sync up with android13-5.10 for the following commits:

f677cbf076 ANDROID: GKI: include more type definitions in vendor hooks
2b35014fea ANDROID: fuse-bpf: Introduce readdirplus test case for fuse bpf
0559f8d2fd BACKPORT: nfc: nfcmrvl: main: reorder destructive operations in nfcmrvl_nci_unregister_dev to avoid bugs
2c8c8d03c1 ANDROID: fuse-bpf: Make sure force_again flag is false by default
4ad093cae1 ANDROID: fuse-bpf: Make inodes with backing_fd reachable for regular FUSE fuse_iget
6210ced850 BACKPORT: ptrace: Check PTRACE_O_SUSPEND_SECCOMP permission on PTRACE_SEIZE
da358e264c BACKPORT: locking: Add missing __sched attributes
4e1dd5a354 BACKPORT: ALSA: pcm: Fix races among concurrent prealloc proc writes
4e5367f25d BACKPORT: ALSA: pcm: Fix races among concurrent prepare and hw_params/hw_free calls
dd17ad6e7d BACKPORT: ALSA: pcm: Fix races among concurrent read/write and buffer changes
f39647e757 ANDROID: Fix up abi issue with struct snd_pcm_runtime
d7202e9cc4 BACKPORT: ALSA: pcm: Fix races among concurrent hw_params and hw_free calls
80b6ac8cf3 Revert "ANDROID: fuse-bpf: use target instead of parent inode to execute backing revalidate"
5d95acffca ANDROID: KVM: arm64: Fix error handling in pKVM FF-A proxy
854df93a7a ANDROID: GKI: Expose device async to userspace
18be5dcef3 FROMGIT: f2fs: fix iostat related lock protection
fc02d3582a BACKPORT: FROMLIST: dma-buf: Move sysfs work out of DMA-BUF export path
fca6ddffc8 ANDROID: vendor_hooks: add vendor hoook in current_alloc_flags()
45cb58e134 ANDROID: vendor_hooks: add vendor hoook to report acr_info in cma_alloc()
45d8a7d082 ANDROID: Enable GKI Dr. No Enforcement
06e6eb707d ANDROID: KVM: arm64: Prevent kmemleak from accessing .hyp.data
2f97e58fd2 BACKPORT: exfat: improve write performance when dirsync enabled
f8ca44396e FROMLIST: scsi: ufs: Fix a race between the interrupt handler and the reset handler
3e1a3ae036 FROMLIST: scsi: ufs: Support clearing multiple commands at once
986b493c4c FROMLIST: scsi: ufs: Simplify ufshcd_clear_cmd()
fe3b7f87c4 ANDROID: Adding Image.gz and boot-gz.img
e913814ab6 ANDROID: softirq: Refine RT defer softirq
043c58ffe0 ANDROID: binder: fix race in priority restore
d45e8f3336 ANDROID: binder: switch task argument for binder_thread
d4dce34fbb ANDROID: binder: pass desired priority by reference
e4f3cf6bdb ANDROID: binder: fold common setup of node_prio
a4e61a4805 ANDROID: Update the ABI representation
8d9e58e6f3 ANDROID: Update the ABI representation
19e41a3404 ANDROID: sched: Add vendor hook for cpu distribution functions
a08f978392 ANDROID: Update the ABI representation
4b895c556f BACKPORT: io_uring: fix race between timeout flush and removal
20c6e1ba55 ANDROID: KVM: arm64: Don't update IOMMUs unnecessarily
c84bdd74f8 ANDROID: Creating boot.img for x86_64 GKI
84b11bc9d4 ANDROID: Update the ABI representation
b5a54d8de2 BACKPORT: net/sched: cls_u32: fix netns refcount changes in u32_change()
d23166278e ANDROID: Update the ABI representation
13b6bd38bb ANDROID: mm: vh for compaction begin/end
d68ba8769b ANDROID: Fix the CONFIG_ANDROID_VENDOR_OEM_DATA=n build
2a6fab1479 ANDROID: Update the ABI representation
a1037b8e1b ANDROID: init_task: Init android vendor and oem data
bb697d4a01 FROMGIT: xfrm: do not set IPv4 DF flag when encapsulating IPv6 frames <= 1280 bytes.
812805ff3b UPSTREAM: io_uring: always use original task when preparing req identity
b610eff230 ANDROID: fuse-bpf: use target instead of parent inode to execute backing revalidate
1e48e8970c FROMLIST: remoteproc: Fix dma_mem leak after rproc_shutdown
91ad5ba0aa FROMLIST: dma-mapping: Add dma_release_coherent_memory to DMA API
6eece719b7 UPSTREAM: arm64: paravirt: Use RCU read locks to guard stolen_time
0db47d8194 Revert "FROMLIST: arm64: paravirt: Use RCU read locks to guard stolen_time"
e9dd78ebe1 FROMLIST: BACKPORT: mm: fix is_pinnable_page against on cma page
c0f1d79d13 ANDROID: Update the ABI representation
3676702251 ANDROID: Update the ABI representation
0ca85e35bf ANDROID: add vendor_hook to control CMA allocation ratio
1ccbb12b74 ANDROID: Creating boot-img.tar.gz for aarch64
5d08df9399 ANDROID: Update the ABI representation
f0cf55d4bd ANDROID: Update the ABI representation
45a00576f8 UPSTREAM: usb: dwc3: gadget: Move null pinter check to proper place
83962808e2 UPSTREAM: firmware_loader: use kernel credentials when reading firmware
f6243b50bb FROMGIT: dma-buf: ensure unique directory name for dmabuf stats
53cad4677c ANDROID: Update the ABI representation
9292423a3e BACKPORT: can: ems_usb: ems_usb_start_xmit(): fix double dev_kfree_skb() in error path
0944dd4741 ANDROID: arm64: Fix MMIO guard ioremap when called before slab_is_available().
65735b81dd ANDROID: sched: Add vendor hook for update_rq_clock_pelt
4acf9710ca ANDROID: Disable CFI on trace hooks
b6193c5685 ANDROID: KVM: arm64: pkvm: Ensure that TLBs and I-cache are private to each vcpu
729adca51a ANDROID: KVM: arm64: Remove stale shadow_handle field
bb4c6c0105 BACKPORT: can: usb_8dev: usb_8dev_start_xmit(): fix double dev_kfree_skb() in error path
4f1e1edb08 Revert "ANDROID: KVM: arm64: pkvm: Ensure that TLBs and I-cache are private to each vcpu"
273ad59b01 ANDROID: Update the ABI representation
9328b6c499 ANDROID: Update the ABI symbol list
207e72ba41 BACKPORT: esp: Fix possible buffer overflow in ESP transformation
46fc349c54 ANDROID: Update the ABI representation
45361b5a0f Revert "Revert "binder: Prevent context manager from incrementing ref 0""
346e46a9a3 UPSTREAM: scsi: ufs: core: Exclude UECxx from SFR dump list
f48d444fef FROMGIT: dma-buf: call dma_buf_stats_setup after dmabuf is in valid list
611d3745f3 ANDROID: mm: keep __get_user_pages_remote behavior
9afeef924c ANDROID: Update the ABI representation
ec9b4b8fff UPSTREAM: xfrm: fix tunnel model fragmentation behavior
42596c7b41 ANDROID: fix ABI breakage caused by per_cpu_pages
2eb3710ce5 ANDROID: fix ABI breakage caused by adding union type in struct page
fc19a77b2a FROMLIST: BACKPORT: mm/page_alloc: Remotely drain per-cpu lists
b71c6184df FROMLIST: BACKPORT: mm/page_alloc: Protect PCP lists with a spinlock
c249c40b79 FROMLIST: BACKPORT: mm/page_alloc: Split out buddy removal code from rmqueue into separate helper
a248d08a94 FROMLIST: BACKPORT: mm/page_alloc: Add page->buddy_list and page->pcp_list
e70a2e110b UPSTREAM: BACKPORT: mm/page_alloc: don't pass pfn to free_unref_page_commit()
5707719280 UPSTREAM: BACKPORT: mm/page_alloc: avoid conflating IRQs disabled with zone->lock
49f6aaf99d UPSTREAM: Revert "usb: dwc3: core: Add shutdown callback for dwc3"
721fb79e0e BACKPORT: staging: ion: Prevent incorrect reference counting behavour
0f6bc2b736 FROMGIT: net: fix wrong network header length
f6f08b9b18 UPSTREAM: mm: fix unexpected zeroed page mapping with zram swap
c607c61848 ANDROID: KVM: arm64: Fix for do not allow memslot changes after first VM run under pKVM
b9b94e2aca ANDROID: KVM: arm64: pkvm: Ensure that TLBs and I-cache are private to each vcpu
392241199b ANDROID: Update the ABI representation
cebb2c99be ANDROID: Update the ABI symbol list
10b114cc3c ANDROID: KVM: arm64: Export nvhe_hyp_panic_handler
67bef07aab FROMLIST: arm64: paravirt: Use RCU read locks to guard stolen_time
4dce9d7a65 ANDROID: clang: update to 14.0.7
43e6093d9d FROMGIT: KVM: arm64: Handle host stage-2 faults from 32-bit EL0
4eb197cb06 ANDROID: fix kernelci build issue for configfs module
3ed683cb94 ANDROID: gki - set CONFIG_USB_NET_AX88179_178A=y (usb gbit ethernet dongle)
277827dd5b ANDROID: fix KCFLAGS override by __ANDROID_COMMON_KERNEL__
4053a1e898 ANDROID: Add flag to indicate compiling against ACK
e78c5b621d UPSTREAM: mm: madvise: return correct bytes advised with process_madvise
5f9fb34d8b UPSTREAM: kfence, x86: fix preemptible warning on KPTI-enabled systems
a0046956bf BACKPORT: net/packet: fix slab-out-of-bounds access in packet_recvmsg()
06bb3003c6 BACKPORT: dm: fix NULL pointer issue when free bio
98c15b2bad ANDROID: dm-bow: Protect Ranges fetched and erased from the RB tree
6450df3d7e ANDROID: arm64: Auto-enroll MMIO guard on protected vms
3e591c63b1 ANDROID: cma: allow to use CMA in swap-in path
c56ecad172 UPSTREAM: f2fs: should not truncate blocks during roll-forward recovery
a50ef731e0 BACKPORT: media: v4l2-mem2mem: Apply DST_QUEUE_OFF_BASE on MMAP buffers across ioctls
0496c13ded ANDROID: GKI: build damon reclaim
b3190b539a FROMLIST: mm/damon/reclaim: Fix the timer always stays active
ca5cc6bc4c BACKPORT: treewide: Add missing includes masked by cgroup -> bpf dependency
891f111a14 UPSTREAM: mm/damon: modify damon_rand() macro to static inline function
284927effa UPSTREAM: mm/damon: add 'age' of region tracepoint support
3d89e63310 UPSTREAM: mm/damon: hide kernel pointer from tracepoint event
1656aa6e49 UPSTREAM: mm/damon/vaddr: hide kernel pointer from damon_va_three_regions() failure log
a0220f613b UPSTREAM: mm/damon/vaddr: use pr_debug() for damon_va_three_regions() failure logging
6be0ebcb89 UPSTREAM: mm/damon/dbgfs: remove an unnecessary variable
1b9e81febe UPSTREAM: mm/damon: move the implementation of damon_insert_region to damon.h
196600574b UPSTREAM: mm/damon: add access checking for hugetlb pages
2d885a4902 UPSTREAM: mm/damon/dbgfs: support all DAMOS stats
4baaaded13 UPSTREAM: mm/damon/reclaim: provide reclamation statistics
5388d0502f UPSTREAM: mm/damon/schemes: account how many times quota limit has exceeded
caa9694119 UPSTREAM: mm/damon/schemes: account scheme actions that successfully applied
cb7e28849d UPSTREAM: mm/damon: convert macro functions to static inline functions
e7b7a5370d UPSTREAM: mm/damon: move damon_rand() definition into damon.h
5fefa05ffd UPSTREAM: mm/damon/schemes: add the validity judgment of thresholds
1a8086a78e UPSTREAM: mm/damon/vaddr: remove swap_ranges() and replace it with swap()
ed97f2620f UPSTREAM: mm/damon: remove some unneeded function definitions in damon.h
0fb0a85d42 UPSTREAM: mm/damon/core: use abs() instead of diff_of()
df930c3b5d UPSTREAM: mm/damon: unified access_check function naming rules
b1ddf425f6 UPSTREAM: mm/damon/dbgfs: fix 'struct pid' leaks in 'dbgfs_target_ids_write()'
5529c8c7eb UPSTREAM: mm/damon/dbgfs: protect targets destructions with kdamond_lock
3de975028c UPSTREAM: mm/damon/vaddr-test: remove unnecessary variables
0a44e491b5 UPSTREAM: mm/damon/vaddr-test: split a test function having >1024 bytes frame size
a5405bc0f5 UPSTREAM: mm/damon/vaddr: remove an unnecessary warning message
04b67c5cf2 UPSTREAM: mm/damon/core: remove unnecessary error messages
1b77288b69 UPSTREAM: mm/damon/dbgfs: remove an unnecessary error message
5e31976171 UPSTREAM: mm/damon/core: use better timer mechanisms selection threshold
cce6ca2fa3 UPSTREAM: mm/damon/core: fix fake load reports due to uninterruptible sleeps
856b276105 BACKPORT: timers: implement usleep_idle_range()
4c721a7b6e UPSTREAM: mm/damon/dbgfs: fix missed use of damon_dbgfs_lock
48bd7c8963 UPSTREAM: mm/damon/dbgfs: use '__GFP_NOWARN' for user-specified size buffer allocation
90ba2d5488 UPSTREAM: mm/damon: remove return value from before_terminate callback
c8aa05a582 UPSTREAM: mm/damon: fix a few spelling mistakes in comments and a pr_debug message
8d31217aa0 UPSTREAM: mm/damon: simplify stop mechanism
c8f0959228 UPSTREAM: mm/damon/dbgfs: add adaptive_targets list check before enable monitor_on
2aafd45856 UPSTREAM: mm/damon: remove unnecessary variable initialization
b3b7318332 UPSTREAM: mm/damon: introduce DAMON-based Reclamation (DAMON_RECLAIM)
656bbf4bde UPSTREAM: selftests/damon: support watermarks
545df68814 UPSTREAM: mm/damon/dbgfs: support watermarks
62bd89b42a UPSTREAM: mm/damon/schemes: activate schemes based on a watermarks mechanism
f4a02dbcef UPSTREAM: tools/selftests/damon: update for regions prioritization of schemes
98260e4ee7 UPSTREAM: mm/damon/dbgfs: support prioritization weights
2b85e83330 UPSTREAM: mm/damon/vaddr,paddr: support pageout prioritization
76fb24657c UPSTREAM: mm/damon/schemes: prioritize regions within the quotas
6a0d2afdab UPSTREAM: mm/damon/selftests: support schemes quotas
350631992f UPSTREAM: mm/damon/dbgfs: support quotas of schemes
e2eee39ec1 UPSTREAM: mm/damon/schemes: implement time quota
a7e263a0c5 UPSTREAM: mm/damon/schemes: skip already charged targets and regions
51cd480dec UPSTREAM: mm/damon/schemes: implement size quota for schemes application speed control
78572870a2 UPSTREAM: mm/damon/paddr: support the pageout scheme
8d537db0f9 UPSTREAM: mm/damon/dbgfs: remove unnecessary variables
c525089abf UPSTREAM: mm/damon/vaddr: constify static mm_walk_ops
fd1bd69a67 UPSTREAM: mm/damon/dbgfs: support physical memory monitoring
2dc9fec10e UPSTREAM: mm/damon: implement primitives for physical address space monitoring
7dc7024f32 UPSTREAM: mm/damon/vaddr: separate commonly usable functions
319f3accc7 UPSTREAM: mm/damon/dbgfs-test: add a unit test case for 'init_regions'
2c807d1f1f UPSTREAM: mm/damon/dbgfs: allow users to set initial monitoring target regions
99510047c7 UPSTREAM: selftests/damon: add 'schemes' debugfs tests
fe2da2d930 UPSTREAM: mm/damon/schemes: implement statistics feature
59e4256bb0 UPSTREAM: mm/damon/dbgfs: support DAMON-based Operation Schemes
77091caf83 UPSTREAM: mm/damon/vaddr: support DAMON-based Operation Schemes
07cefe8b8c UPSTREAM: mm/damon/core: implement DAMON-based Operation Schemes (DAMOS)
a0a2eec57c UPSTREAM: mm/damon/core: account age of target regions
e5a92ffc76 UPSTREAM: mm/damon/core: nullify pointer ctx->kdamond with a NULL
f6a7b6527d UPSTREAM: mm/damon: needn't hold kdamond_lock to print pid of kdamond
7aa826a5df UPSTREAM: mm/damon: remove unnecessary do_exit() from kdamond
bbc7383c1f UPSTREAM: mm/damon/core: print kdamond start log in debug mode only
d09e6d4366 UPSTREAM: include/linux/damon.h: fix kernel-doc comments for 'damon_callback'
0492d06b2e UPSTREAM: mm/damon: grammar s/works/work/
e24d4d7d21 UPSTREAM: mm/damon/core-test: fix wrong expectations for 'damon_split_regions_of()'
729698e1ab UPSTREAM: mm/damon: don't use strnlen() with known-bogus source length
789928c5b6 UPSTREAM: mm/damon: add kunit tests
d3cff19d31 UPSTREAM: mm/damon: add user space selftests
ac418a7965 UPSTREAM: mm/damon/dbgfs: support multiple contexts
9fda42d2d6 UPSTREAM: mm/damon/dbgfs: export kdamond pid to the user space
c8ecb4f7a1 UPSTREAM: mm/damon: implement a debugfs-based user space interface
e415cf98cb UPSTREAM: mm/damon: add a tracepoint
75f4f6ebe9 UPSTREAM: mm/damon: implement primitives for the virtual memory address spaces
ad6156f833 UPSTREAM: mm/idle_page_tracking: make PG_idle reusable
f78eee74b4 UPSTREAM: mm/damon: adaptively adjust regions
40064a1877 UPSTREAM: mm/damon/core: implement region-based sampling
d1e43a5be8 UPSTREAM: mm: introduce Data Access MONitor (DAMON)
88e4dbaf59 ANDROID: Make MGLRU aware of speculative faults
e7c680add6 ANDROID: KVM: arm64: Prevent HVC calls outside of the core kernel text
32169780e8 ANDROID: fuse-bpf: Fix misuse of args.out_args
df2083258d ANDROID: Update the ABI representation
d7b1683f78 ANDROID: add __trace_bputs() to aarch64 ABI
f6c964af25 ANDROID: Suppress build.sh deprecation warnings.
5d6831add7 ANDROID: KVM: arm64: s2mpu: Allow r/o access to control regs
d5c0f0f937 ANDROID: KVM: arm64: s2mpu: Allow reading MPTC entries
e56d9603a6 ANDROID: KVM: arm64: s2mpu: Allow L1ENTRY_* r/o access
96767ad7be ANDROID: KVM: arm64: s2mpu: Refactor DABT handler
c43dfe89fe ANDROID: KVM: arm64: s2mpu: Extract L1ENTRY_* consts
7a9a532432 BACKPORT: ext4: don't BUG if someone dirty pages without asking ext4 first
c383610d0f UPSTREAM: binder: change error code from postive to negative in binder_transaction
d4d78c7278 ANDROID: fuse-bpf: Fix non-fusebpf build
9a5023967b ANDROID: fuse-bpf: Use fuse_bpf_args in uapi
92c8c21ad0 BACKPORT: nl80211: correctly check NL80211_ATTR_REG_ALPHA2 size
65533e0212 ANDROID: Update the ABI representation
a1013fd19b FROMLIST: kasan: mark KASAN_VMALLOC flags as kasan_vmalloc_flags_t
c098614509 FROMLIST: kasan: fix hw tags enablement when KUNIT tests are disabled
f60a0b3285 UPSTREAM: usb: dwc3: leave default DMA for PCI devices
3b508e8fe4 UPSTREAM: usb: dwc3: support 64 bit DMA in platform driver
03f40d5252 ANDROID: Update the ABI representation
6db38c5bbc FROMGIT: EXP rcu: Move expedited grace period (GP) work to RT kthread_worker
68c87a277c ANDROID: Update the ABI representation
699e6e3211 UPSTREAM: block: fix async_depth sysfs interface for mq-deadline
53ff5efb2c ANDROID: PCI/PM: Use usleep_range for d3hot_delay
609fa1be7a ANDROID: mm: page_pinner: fix elapsed time
d5d9a23576 ANDROID: mm: retry GUP with orignal gup_flags on failure
6acb261444 ANDROID: GKI: 4/15/2022 KMI freeze
a034320a68 ANDROID: add vendor fields to swap_slots_cache to support multiple swap devices
1b14ae01b0 ANDROID: add vendor fields to lruvec to record refault stats
af4eb0e377 ANDROID: add vendor fields to swap_info_struct to record swap stats
fae5207ecc ANDROID: scsi: ufs: Add suspend/resume SCSI command processing support
64293a57f1 ANDROID: scsi: ufs: Pass the clock scaling timeout as an argument
69014b2b36 ANDROID: scsi: ufs: Move a clock scaling check
aca52cabdb ANDROID: scsi: ufs: Reduce the clock scaling latency
00ed95fe93 FROMGIT: scsi: ufs: core: scsi_get_lba() error fix
c0a4aeb7aa FROMGIT: scsi: ufs: Fix runtime PM messages never-ending cycle
0cd3abcaa4 FROMGIT: scsi: core: sd: Add silence_suspend flag to suppress some PM messages
e46eb26194 FROMGIT: scsi: ufs: core: Remove wlun_dev_to_hba()
85d759e39a FROMGIT: scsi: ufs: Add checking lifetime attribute for WriteBooster
44b7a4f00f FROMGIT: scsi: ufs: Use generic error code in ufshcd_set_dev_pwr_mode()
aeedc78679 FROMGIT: scsi: ufs: ufs-mediatek: Fix error checking in ufs_mtk_init_va09_pwr_ctrl()
1fc4aef3d5 FROMGIT: scsi: ufs: Modify Tactive time setting conditions
d87405c2fe FROMGIT: scsi: ufs: ufs-pci: Add support for Intel ADL
b65cfd7b92 FROMGIT: scsi: ufs: ufs-mediatek: Add put_device() after of_find_device_by_node()
4f4bf31d39 FROMGIT: scsi: ufs: ufshpb: Fix warning in ufshpb_set_hpb_read_to_upiu()
acb0ef885c ANDROID: scsi: ufs: Minimize the difference with the upstream code
321995d280 ANDROID: GKI: build multi-gen LRU
306dbfb34c FROMLIST: mm: multi-gen LRU: design doc
8b006e4d1c FROMLIST: mm: multi-gen LRU: admin guide
3cf1dfaaa5 FROMLIST: mm: multi-gen LRU: debugfs interface
96f4a592d3 FROMLIST: mm: multi-gen LRU: thrashing prevention
76fdc1010b FROMLIST: mm: multi-gen LRU: kill switch
082bc8296a FROMLIST: mm: multi-gen LRU: optimize multiple memcgs
93c4f86793 FROMLIST: mm: multi-gen LRU: support page table walks
c8356f7573 FROMLIST: mm: multi-gen LRU: exploit locality in rmap
436dff20eb FROMLIST: mm: multi-gen LRU: minimal implementation
fe302bd1f9 FROMLIST: mm: multi-gen LRU: groundwork
4c6c817249 FROMLIST: mm/vmscan.c: refactor shrink_node()
95acc9c28b FROMLIST: mm: x86: add CONFIG_ARCH_HAS_NONLEAF_PMD_YOUNG
1ed19b562b FROMLIST: mm: x86, arm64: add arch_has_hw_pte_young()
b4f3b6ac71 UPSTREAM: include/linux/page-flags-layout.h: cleanups
2b286703d9 UPSTREAM: include/linux/page-flags-layout.h: correctly determine LAST_CPUPID_WIDTH
80343eeaf3 UPSTREAM: mm/swap: don't SetPageWorkingset unconditionally during swapin
0c20cff831 UPSTREAM: include/linux/mm_inline.h: fold page_lru_base_type() into its sole caller
aadc45fae6 BACKPORT: mm: VM_BUG_ON lru page flags
bcc2f50f7b BACKPORT: mm: add __clear_page_lru_flags() to replace page_off_lru()
552f416558 BACKPORT: mm/swap.c: don't pass "enum lru_list" to del_page_from_lru_list()
10899adee3 UPSTREAM: mm/swap.c: don't pass "enum lru_list" to trace_mm_lru_insertion()
c18b4f50ce BACKPORT: mm: don't pass "enum lru_list" to lru list addition functions
32ebee4382 BACKPORT: include/linux/mm_inline.h: shuffle lru list addition and deletion functions
885e11e970 BACKPORT: mm/vmscan.c: use add_page_to_lru_list()
75020bfbe2 ANDROID: Move BRANCH from build.config.common to .constants.
5ef1198a15 ANDROID: Update the ABI symbol list
0a227f89cf ANDROID: KVM: arm64: Do not allow memslot modifications once a PVM has run
8be6e93244 ANDROID: fuse-bpf: Fix read_iter
128ed57bca ANDROID: fuse-bpf: Use cache and refcount
8e24eb9a2d ANDROID: fuse-bpf: Rename iocb_fuse to iocb_orig
0f51319527 ANDROID: fuse-bpf: Fix fixattr in rename
0c37c1459a ANDROID: fuse-bpf: Fix readdir
68c9936883 ANDROID: clang: update to 14.0.4
7a197aa504 ANDROID: mm: fix build break
d9e4b67784 ANDROID: mm: freeing MIGRATE_ISOLATE page instantly
83aa7ef838 ANDROID: KVM: arm64: Fix size calculation of FFA memory range
2d2e0ad1d1 ANDROID: KVM: arm64: Pin FFA mailboxes shared by the host
b196350f2a ANDROID: fuse-bpf: Fix lseek return value for offset 0
bba21782c8 ANDROID: Update the ABI symbol list and xml
e5765b86ce ANDROID: GKI: set more vfs-only exports into their own namespace
74ff6e66d2 ANDROID: KVM: arm64: Fix ToCToU issue when refilling the hyp memcache
8fe46774c6 ANDROID: mm: page_pinner: remove dump_page_pinner
94c6c10c39 BACKPORT: mm, kasan: fix __GFP_BITS_SHIFT definition breaking LOCKDEP
7bfa608df5 UPSTREAM: kasan: test: support async (again) and asymm modes for HW_TAGS
4e56697b42 ANDROID: KVM: arm64: iommu: Optimize snapshot_host_stage2
174ac5b7c5 ANDROID: KVM: arm64: s2mpu: Initialize MPTs to PROT_RW
a946ac5ff5 ANDROID: KVM: arm64: iommu: Fix upper bound of PT walk
a63ec2bcac ANDROID: GKI: 4/6/2022 KMI update
ac3d413511 ANDROID: vendor_hooks: Reduce pointless modversions CRC churn
f33dc31c48 ANDROID: mm: gup: additional param in vendor hooks
16b4583a99 ANDROID: mm: page_pinner: fix build warning
01edbc91e2 ANDROID: mm: page_pinner: change pinner buffer size
b8a18e852e ANDROID: mm: page_pinner: remove static buffer
5c70ecb399 ANDROID: mm: page_pinner: remove longterm_pinner
e17f903a92 ANDROID: mm: page_pinner: change output format for alloc_contig_failed
a45f3891de ANDROID: mm: page_pinner refactoring
8e9a170748 FROMGIT: iommu/iova: Improve 32-bit free space estimate
34469ce1b4 ANDROID: KVM: arm64: pkvm: Track the SVE state in the shadow vcpu
7cea3ceefb ANDROID: KVM: arm64: Make the use of host or shadow vcpu less error prone
176c157bbe ANDROID: GKI: set vfs-only exports into their own namespace
21c7e202ac FROMLIST: export: fix string handling of namespace in EXPORT_SYMBOL_NS
fdf0178dba UPSTREAM: module.h: allow #define strings to work with MODULE_IMPORT_NS
7ba447d039 ANDROID: Update the ABI representation
8302ed7fba FROMGIT: arm64: head.S: Initialise MPAM EL2 registers and disable traps
5748592d14 ANDROID: arm64: Partial MPAM sysreg definition import
aadf7ad9db BACKPORT: virtio: pci: check bar values read from virtio config space
7e5df18bee UPSTREAM: Revert "virtio_pci: harden MSI-X interrupts"
c7912e3027 UPSTREAM: Revert "virtio-pci: harden INTX interrupts"
30d72758db FROMLIST: fuse: give wakeup hints to the scheduler
11e605185f ANDROID: KVM: arm64: Don't map host sections in pkvm
fce8d906cf ANDROID: KVM: arm64: Explicitely map kvm_vgic_global_state at EL2
6e12d67ad0 ANDROID: KVM: arm64: Unmap kvm_arm_hyp_percpu_base from the host
ae49ca9a17 ANDROID: KVM: arm64: pkvm: Don't access kvm_arm_hyp_percpu_base at EL1
b576a36a95 ANDROID: Update the ABI symbol list
4c3d004aa7 UPSTREAM: erofs: add sysfs interface
dc123bee94 Revert "ANDROID: dm-bow: Protect Ranges fetched and erased from the RB tree"
3f9db3f711 ANDROID: sched: Add vendor hook for rt util update
cd5c13796b ANDROID: Update the ABI symbol list
9859d2761e ANDROID: Add new pkvm_iommu_* functions to aarch64 ABI
8fd93b0ef9 ANDROID: KVM: arm64: iommu: Add pkvm_iommu_finalize
798c4ea545 ANDROID: KVM: arm64: iommu: No powered check in DABT handler
57381d548d ANDROID: KVM: arm64: s2mpu: Create SysMMU_SYNC driver
e69c61cf4e ANDROID: KVM: arm64: iommu: Create parent/child relation
be84f2c770 ANDROID: KVM: arm64: iommu: Run validate() on struct pkvm_iommu
e6574a68fa ANDROID: KVM: arm64: iommu: Create private mapping last
acb9a25416 ANDROID: KVM: arm64: iommu: Free memory on registration error
6eaed0b8b7 ANDROID: KVM: arm64: iommu: Harden __pkvm_iommu_pm_notify
a75cb9df82 ANDROID: KVM: arm64: Drop FOLL_FORCE when pinning guest memory pages
a246583fcc Revert "ANDROID: BACKPORT: KVM: arm64: Add initial support for KVM_CAP_EXIT_HYPERCALL"
bbe5c85592 Revert "ANDROID: KVM: arm64: Allow userspace to receive SHARE and UNSHARE notifications"
588affc843 BACKPORT: virtio-blk: Use blk_validate_block_size() to validate block size
fe0484006f ANDROID: Update the ABI representation
e3356ca0a6 ANDROID: sched: Add vendor hook for util-update related functions
ec7c9ea9d4 ANDROID: Update the ABI representation
982febefcd ANDROID: KVM: arm64: pkvm: Inject SIGSEGV on illegal accesses
e7b80adac2 ANDROID: KVM: arm64: Refactor enter_exception64()
91c32ff1fe ANDROID: KVM: arm64: Add is_pkvm_initialized() helper
ba73e0b827 ANDROID: KVM: arm64: Use PSCI MEM_PROTECT to zap guest pages on reset
40493bc91e ANDROID: KVM: arm64: Check pin_user_pages() return value
dbba49b6cb ANDROID: KVM: arm64: Handle all ID registers trapped for a protected VM
5c6f14f146 ANDROID: Update the ABI symbol list
373e5bd7d4 ANDROID: GKI: Enable BUILD_GKI_CERTIFICATION_TOOLS
83631772f3 ANDROID: usb: gadget: f_accessory: add compat_ioctl support
4443600ce1 UPSTREAM: mm: fix use-after-free when anon vma name is used after vma is freed
6962eb33d8 UPSTREAM: mm: prevent vm_area_struct::anon_name refcount saturation
9fbdc4b53f UPSTREAM: mm: refactor vm_area_struct::anon_vma_name usage code
6b94b8c3b7 ANDROID: KVM: arm64: Only map swap-backed pages into the guest
c8b5505153 ANDROID: Update the ABI representation
3101b49e5b ANDROID: clang: update to 14.0.3
93846ccca1 ANDROID: KVM: arm64: Invalidate TLB by VMID when tearing down the shadow VM
ed0dec098e ANDROID: gki_config: enable F2FS_UNFAIR_RWSEM
f8c415b6c2 Merge remote-tracking branch 'aosp/upstream-f2fs-stable-linux-5.10.y' into android13-5.10
cf9be86ac4 ANDROID: GKI: 3/23/2022 KMI update
e5315a20b2 ANDROID: GKI: enable macsec
7531264e68 ANDROID: Update the ABI symbol list
aea946bdf0 ANDROID: mm: gup: vendor hook in GUP friends
0375b0d297 ANDROID: selftests: incfs: Add umount helper function
5fdeabb1a2 ANDROID: selftests: incfs: skip large_file_test test is not enough free space
9a7faf669a ANDROID: Update the ABI symbol list
b6079b142e ANDROID: incremental-fs: limit mount stack depth
68980ff96c fscrypt: update documentation for direct I/O support
1654219723 f2fs: support direct I/O with fscrypt using blk-crypto
9f7cc5fda4 ext4: support direct I/O with fscrypt using blk-crypto
4b613cb0c4 iomap: support direct I/O with fscrypt using blk-crypto
b6da748bab fscrypt: add functions for direct I/O support
21557656af ANDROID: selftests: incfs: Add -fno-omit-frame-pointer
59e664cd0e f2fs: fix to do sanity check on .cp_pack_total_block_count
40185ceea1 f2fs: make gc_urgent and gc_segment_mode sysfs node readable
f1e8564c55 FROMLIST: kasan, scs: support tagged vmalloc mappings
c05355c5f8 ANDROID: kasan: sync vmalloc support with linux-next/akpm
2fce32030b f2fs: use aggressive GC policy during f2fs_disable_checkpoint()
9214367dd9 f2fs: fix compressed file start atomic write may cause data corruption
bb434bbb77 f2fs: initialize sbi->gc_mode explicitly
81a9c7d6ac f2fs: introduce gc_urgent_mid mode
13f1b8f147 f2fs: compress: fix to print raw data size in error path of lz4 decompression
bede94339a f2fs: remove redundant parameter judgment
4bab14807f f2fs: use spin_lock to avoid hang
e3d44a0028 f2fs: don't get FREEZE lock in f2fs_evict_inode in frozen fs
e182f50c16 f2fs: remove unnecessary read for F2FS_FITS_IN_INODE
e9e689047f f2fs: introduce F2FS_UNFAIR_RWSEM to support unfair rwsem
beebf94806 f2fs: avoid an infinite loop in f2fs_sync_dirty_inodes
266c3326ad f2fs: fix to do sanity check on curseg->alloc_type
7a711a5447 f2fs: fix to avoid potential deadlock
185e61d607 f2fs: quota: fix loop condition at f2fs_quota_sync()
150ce3cd60 f2fs: Restore rwsem lockdep support
c5feaf141e f2fs: fix missing free nid in f2fs_handle_failed_inode
421c7a5850 f2fs: add a way to limit roll forward recovery time
95c5bd71d4 f2fs: introduce F2FS_IPU_HONOR_OPU_WRITE ipu policy
a3bb3ae25e f2fs: adjust readahead block number during recovery
4af7ca6cc2 f2fs: fix to unlock page correctly in error path of is_alive()
7fa3e73d19 f2fs: expose discard related parameters in sysfs
7f148c6c55 f2fs: move discard parameters into discard_cmd_control
04e34c8449 f2fs: fix to enable ATGC correctly via gc_idle sysfs interface
c4454e2978 f2fs: move f2fs to use reader-unfair rwsems

And track more new symbols that were added to the 'android13-5.10' branch:

Leaf changes summary: 28 artifacts changed
Changed leaf types summary: 0 leaf type changed
Removed/Changed/Added functions summary: 0 Removed, 0 Changed, 18 Added functions
Removed/Changed/Added variables summary: 0 Removed, 0 Changed, 10 Added variables

18 Added functions:

  [A] 'function int __traceiter_android_rvh_cpumask_any_and_distribute(void*, task_struct*, const cpumask*, const cpumask*, int*)'
  [A] 'function int __traceiter_android_rvh_update_rq_clock_pelt(void*, rq*, s64, bool*)'
  [A] 'function int __traceiter_android_vh_cma_alloc_adjust(void*, zone*, bool*)'
  [A] 'function int __traceiter_android_vh_dump_throttled_rt_tasks(void*, int, u64, ktime_t, u64, s64)'
  [A] 'function int __traceiter_android_vh_mm_compaction_begin(void*, compact_control*, long int*)'
  [A] 'function int __traceiter_android_vh_mm_compaction_end(void*, compact_control*, long int)'
  [A] 'function int __traceiter_android_vh_sched_setaffinity_early(void*, task_struct*, const cpumask*, int*)'
  [A] 'function int __traceiter_android_vh_show_max_freq(void*, cpufreq_policy*, unsigned int*)'
  [A] 'function int __traceiter_android_vh_ufs_update_sdev(void*, scsi_device*)'
  [A] 'function unsigned int cfg80211_vendor_cmd_get_sender(wiphy*)'
  [A] 'function int cpumask_any_and_distribute(const cpumask*, const cpumask*)'
  [A] 'function char* d_path(const path*, char*, int)'
  [A] 'function pid* find_vpid(int)'
  [A] 'function mm_struct* get_task_mm(task_struct*)'
  [A] 'function void lru_cache_disable()'
  [A] 'function void lru_cache_enable()'
  [A] 'function void mmput(mm_struct*)'
  [A] 'function int vprintk_emit(int, int, const dev_printk_info*, const char*, va_list)'

10 Added variables:

  [A] 'tracepoint __tracepoint_android_rvh_cpumask_any_and_distribute'
  [A] 'tracepoint __tracepoint_android_rvh_update_rq_clock_pelt'
  [A] 'tracepoint __tracepoint_android_vh_cma_alloc_adjust'
  [A] 'tracepoint __tracepoint_android_vh_dump_throttled_rt_tasks'
  [A] 'tracepoint __tracepoint_android_vh_mm_compaction_begin'
  [A] 'tracepoint __tracepoint_android_vh_mm_compaction_end'
  [A] 'tracepoint __tracepoint_android_vh_sched_setaffinity_early'
  [A] 'tracepoint __tracepoint_android_vh_show_max_freq'
  [A] 'tracepoint __tracepoint_android_vh_ufs_update_sdev'
  [A] 'unsigned long int freq_scale'

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Ie158191bf4ee4639506c2adb7d8beebdca4923c2
2022-07-01 13:36:13 +02:00
Giuliano Procida
f677cbf076 ANDROID: GKI: include more type definitions in vendor hooks
In an effort to improve ABI coverage, type definitions are now pulled
into vendor hook by #including public and internal kernel headers
where possible.

Exceptional cases (due to build breakage):

* `struct cgroup_taskset` remains forward declared
* `struct uclamp_se` is available in public header but only
  conditionally, so it is forward declared as well

Note the changes are all conditional on ! __GENKSYMS__ so that
MODVERSIONS symbol CRCs remain the same.

Bug: 233047575
Change-Id: I8d11b9afb0136fe006772f07affa993e9a8d23d3
Signed-off-by: Giuliano Procida <gprocida@google.com>
2022-07-01 07:24:27 +00:00
Dmitrii Merkurev
2b35014fea ANDROID: fuse-bpf: Introduce readdirplus test case for
fuse bpf

Readdir plus is potentially dangerous place because
this leads us to allocate fuse inodes. If we have
problems with inode allocation and discovery we may
end up with inode conflict which may cause backing_fd
losing.

We currently have this problem and this test clearly
reproduce it.

More information about the problem:
go/fuse-loosing-inode-with-backing

Fixes for this problem:
https://android-review.googlesource.com/c/kernel/common/+/2135866
https://android-review.googlesource.com/c/kernel/common/+/2135457

Bug: 219958836
Test: Currently it’s fairly failed, after applying patches from
above it passed.
Co-developed-by: Paul Lawrence <paullawrence@google.com>

Change-Id: I8afb535605faffc9facf626d0c7d0f244dc8d28e
Signed-off-by: Dmitrii Merkurev <dimorinny@google.com>
2022-06-30 16:44:12 +00:00
Duoming Zhou
0559f8d2fd BACKPORT: nfc: nfcmrvl: main: reorder destructive operations in nfcmrvl_nci_unregister_dev to avoid bugs
commit d270453a0d upstream.

There are destructive operations such as nfcmrvl_fw_dnld_abort and
gpio_free in nfcmrvl_nci_unregister_dev. The resources such as firmware,
gpio and so on could be destructed while the upper layer functions such as
nfcmrvl_fw_dnld_start and nfcmrvl_nci_recv_frame is executing, which leads
to double-free, use-after-free and null-ptr-deref bugs.

There are three situations that could lead to double-free bugs.

The first situation is shown below:

   (Thread 1)                 |      (Thread 2)
nfcmrvl_fw_dnld_start         |
 ...                          |  nfcmrvl_nci_unregister_dev
 release_firmware()           |   nfcmrvl_fw_dnld_abort
  kfree(fw) //(1)             |    fw_dnld_over
                              |     release_firmware
  ...                         |      kfree(fw) //(2)
                              |     ...

The second situation is shown below:

   (Thread 1)                 |      (Thread 2)
nfcmrvl_fw_dnld_start         |
 ...                          |
 mod_timer                    |
 (wait a time)                |
 fw_dnld_timeout              |  nfcmrvl_nci_unregister_dev
   fw_dnld_over               |   nfcmrvl_fw_dnld_abort
    release_firmware          |    fw_dnld_over
     kfree(fw) //(1)          |     release_firmware
     ...                      |      kfree(fw) //(2)

The third situation is shown below:

       (Thread 1)               |       (Thread 2)
nfcmrvl_nci_recv_frame          |
 if(..->fw_download_in_progress)|
  nfcmrvl_fw_dnld_recv_frame    |
   queue_work                   |
                                |
fw_dnld_rx_work                 | nfcmrvl_nci_unregister_dev
 fw_dnld_over                   |  nfcmrvl_fw_dnld_abort
  release_firmware              |   fw_dnld_over
   kfree(fw) //(1)              |    release_firmware
                                |     kfree(fw) //(2)

The firmware struct is deallocated in position (1) and deallocated
in position (2) again.

The crash trace triggered by POC is like below:

BUG: KASAN: double-free or invalid-free in fw_dnld_over
Call Trace:
  kfree
  fw_dnld_over
  nfcmrvl_nci_unregister_dev
  nci_uart_tty_close
  tty_ldisc_kill
  tty_ldisc_hangup
  __tty_hangup.part.0
  tty_release
  ...

What's more, there are also use-after-free and null-ptr-deref bugs
in nfcmrvl_fw_dnld_start. If we deallocate firmware struct, gpio or
set null to the members of priv->fw_dnld in nfcmrvl_nci_unregister_dev,
then, we dereference firmware, gpio or the members of priv->fw_dnld in
nfcmrvl_fw_dnld_start, the UAF or NPD bugs will happen.

This patch reorders destructive operations after nci_unregister_device
in order to synchronize between cleanup routine and firmware download
routine.

The nci_unregister_device is well synchronized. If the device is
detaching, the firmware download routine will goto error. If firmware
download routine is executing, nci_unregister_device will wait until
firmware download routine is finished.

Bug: 234690530
Fixes: 3194c68701 ("NFC: nfcmrvl: add firmware download support")
Signed-off-by: Duoming Zhou <duoming@zju.edu.cn>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Change-Id: I8cc1f6450c7fecf5f5994033931da1d23a522282
2022-06-30 15:33:55 +00:00
Dmitrii Merkurev
2c8c8d03c1 ANDROID: fuse-bpf: Make sure force_again flag is false by default
Usage of uninitialized boolean is potentially can cause annoying
and “hard to catch” types of problems. Currently we have 1
case where we use uninitialized boolean:

int fuse_readdir(struct file *file, struct dir_context *ctx)

And I constantly see that every userspace readdir operation
causes an infinite cycle inside the Kernel for my QEMU tests
(gcc).
This problem isn’t reproducible inside cuttlefish, probably
because we use clang toolchain.

Bug: 219958836
Test: atest ScopedStorageDeviceTest
Test: selftests
Change-Id: I2c38056448cd2910e0cb20da5839d7db9ebd26b9
Signed-off-by: Dmitrii Merkurev <dimorinny@google.com>
2022-06-30 14:22:22 +00:00
Dmitrii Merkurev
4ad093cae1 ANDROID: fuse-bpf: Make inodes with backing_fd reachable
for regular FUSE fuse_iget

Currently, when we’re trying to find inode based on their
backing inode we strictly checking on nodeid == 0, so
basically we’re not supporting nodeid != 0 for inode,
which is backed by another one. Alongside with this, we’re
using backing_inode as a hash for inode which make this inode
not reachable for regular FUSE fuse_iget that as a result
causing backing_inode losing because instead of getting
existent one (with backing inode) we create a new one as
a part of readdirplus.

For more details please check: go/fuse-loosing-inode-with-backing

Bug: 219958836
Test: Manually checked that /data and /obb inodes
always have inode numbers configured.
Co-developed-by: Paul Lawrence <paullawrence@google.com>

Change-Id: If6a5fb340561ac6320d3c4e86215f1bcd4c2c10c
Signed-off-by: Dmitrii Merkurev <dimorinny@google.com>
2022-06-30 14:21:25 +00:00
Greg Kroah-Hartman
3cbab1c9ac Revert "xfrm: Add possibility to set the default to block if we have no policy"
This reverts commit 5b7f84b1f9 which is
commit 2d151d3907 upstream.

It breaks the Android kernel ABI and if this really needs to be added to
Android, it must come back in a format in the future that does not break
the abi.

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Ic222a9dfeaa3775f1173b4cd13de7e9ae959ccd9
2022-06-30 07:45:13 +00:00
Greg Kroah-Hartman
49412256c9 Revert "net: xfrm: fix shift-out-of-bounce"
This reverts commit ab610ee1d1 which is
5d8dbb7fb8 commit upstream.

It breaks the Android kernel ABI and if this really needs to be added to
Android, it must come back in a format in the future that does not break
the abi.

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I1843039a406d0e39cdbde7f1da9be30fb1cbcd6a
2022-06-30 07:45:13 +00:00
Greg Kroah-Hartman
65b0a22abc Revert "xfrm: make user policy API complete"
This reverts commit 20fd28df40 which is
f8d858e607 commit upstream.

It breaks the Android kernel ABI and if this really needs to be added to
Android, it must come back in a format in the future that does not break
the abi.

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I0597156be84f636d8196c81b2625a04bab57dc0c
2022-06-30 07:45:13 +00:00
Greg Kroah-Hartman
b60c58879e Revert "xfrm: notify default policy on update"
This reverts commit 9856c3a129 which is
88d0adb5f1 commit upstream.

It breaks the Android kernel ABI and if this really needs to be added to
Android, it must come back in a format in the future that does not break
the abi.

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I4e7bf3d512309e061272648fdb5733e270ab4279
2022-06-30 07:45:13 +00:00
Greg Kroah-Hartman
51b82c1241 Revert "xfrm: fix dflt policy check when there is no policy configured"
This reverts commit 57c1bbe709 which is
ec3bb89081 commit upstream.

It breaks the Android kernel ABI and if this really needs to be added to
Android, it must come back in a format in the future that does not break
the abi.

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Iebfe2659463646982cc41c7cd29db2d51ef5e6eb
2022-06-30 07:45:13 +00:00
Greg Kroah-Hartman
f91fa99d4b Revert "xfrm: rework default policy structure"
This reverts commit 0d2e9d8000 which is
b58b1f563a commit upstream.

It breaks the Android kernel ABI and if this really needs to be added to
Android, it must come back in a format in the future that does not break
the abi.

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I0a8403a202b21cda7f856ea143c5b01b78346078
2022-06-30 07:45:13 +00:00
Greg Kroah-Hartman
c932832406 Revert "xfrm: fix "disable_policy" flag use when arriving from different devices"
This reverts commit 47f04f95ed which is
e6175a2ed1 commit upstream.

It breaks the Android kernel ABI and if this really needs to be added to
Android, it must come back in a format in the future that does not break
the abi.

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Ibb0fcc031d2bf71f137d3c760d84858436acc801
2022-06-30 07:45:13 +00:00
Greg Kroah-Hartman
6629a18b57 Revert "include/uapi/linux/xfrm.h: Fix XFRM_MSG_MAPPING ABI breakage"
This reverts commit 633be494c3 which is
commit 844f7eaaed upstream.

It breaks the Android kernel ABI and if this really needs to be added to
Android, it must come back in a format in the future that does not break
the abi.

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I4224f0b86fdc8cfba5e18f9632ed191d18552a30
2022-06-30 07:45:13 +00:00
Treehugger Robot
a6c120a514 Merge "Merge 5.10.118 into android13-5.10-lts" into android13-5.10-lts 2022-06-30 07:45:13 +00:00
Bowgo Tsai
17267bb8e8 ANDROID: Adding Image.gz and boot-gz.img
This adds <10 seconds for a LTO=thin build, while the original
build time is about ~250 seconds on a build machine with 48 2.60 GHz
processors and 64GB RAM.

Within the 10 seconds, ~3 seconds spent on building Image.gz,
~5 seconds for packing Image.gz as boot-gz.img and <1 second for
including the boot-gz.img into the boot-img.tar.gz.

Bug: 233352819
Test: LTO=thin BUILD_CONFIG=common/build.config.gki.aarch64 build/build.sh
Signed-off-by: Bowgo Tsai <bowgotsai@google.com>
Change-Id: I283ef004d1233d2e175573b893379e0d68221353
(cherry picked from commit 2ad997b4d1)
(cherry picked from commit 933eddd126d18b45f5a693d695bc69a7a6770167)
(cherry picked from commit 0082c521ea)
2022-06-29 18:39:59 +00:00
Bowgo Tsai
3b28477cb8 ANDROID: Creating boot-img.tar.gz for aarch64
The boot-img.tar.gz includes boot.img and boot-lz4.img,
with kernel image: Image and Image.lz4, respectively.

Bug: 222078981
Test: BUILD_CONFIG=common/build.config.gki.aarch64 build/build.sh
Signed-off-by: Bowgo Tsai <bowgotsai@google.com>
Change-Id: I7f929a73967ce87d0d653d0b9926198cfeedc973
(cherry picked from commit 3361d46a39)
(cherry picked from commit 841307cecccb131df86a09cefcf7e5ea6b329a35)
(cherry picked from commit f60f35c121)
2022-06-29 18:39:33 +00:00
Jann Horn
6210ced850 BACKPORT: ptrace: Check PTRACE_O_SUSPEND_SECCOMP permission on PTRACE_SEIZE
commit ee1fee9005 upstream.

Setting PTRACE_O_SUSPEND_SECCOMP is supposed to be a highly privileged
operation because it allows the tracee to completely bypass all seccomp
filters on kernels with CONFIG_CHECKPOINT_RESTORE=y. It is only supposed to
be settable by a process with global CAP_SYS_ADMIN, and only if that
process is not subject to any seccomp filters at all.

However, while these permission checks were done on the PTRACE_SETOPTIONS
path, they were missing on the PTRACE_SEIZE path, which also sets
user-specified ptrace flags.

Move the permissions checks out into a helper function and let both
ptrace_attach() and ptrace_setoptions() call it.

Bug: 233438137
Cc: stable@kernel.org
Fixes: 13c4a90119 ("seccomp: add ptrace options for suspend/resume")
Signed-off-by: Jann Horn <jannh@google.com>
Link: https://lkml.kernel.org/r/20220319010838.1386861-1-jannh@google.com
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Change-Id: Ic2f98b220f24ff2f27b1d4aadd5c6d6dca2678ed
2022-06-29 15:04:37 +01:00
Minchan Kim
da358e264c 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 c441e934b6)
Signed-off-by: Minchan Kim <minchan@google.com>
2022-06-26 23:49:25 +00:00
Takashi Iwai
4e1dd5a354 BACKPORT: ALSA: pcm: Fix races among concurrent prealloc proc writes
commit 69534c48ba upstream.

We have no protection against concurrent PCM buffer preallocation
changes via proc files, and it may potentially lead to UAF or some
weird problem.  This patch applies the PCM open_mutex to the proc
write operation for avoiding the racy proc writes and the PCM stream
open (and further operations).

Bug: 232293337
Cc: <stable@vger.kernel.org>
Reviewed-by: Jaroslav Kysela <perex@perex.cz>
Link: https://lore.kernel.org/r/20220322170720.3529-5-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Change-Id: I52d0347c440b87c700b28e082eee9ab9d3ec4910
2022-06-24 19:45:33 +00:00
Takashi Iwai
4e5367f25d BACKPORT: ALSA: pcm: Fix races among concurrent prepare and hw_params/hw_free calls
commit 3c3201f8c7 upstream.

Like the previous fixes to hw_params and hw_free ioctl races, we need
to paper over the concurrent prepare ioctl calls against hw_params and
hw_free, too.

This patch implements the locking with the existing
runtime->buffer_mutex for prepare ioctls.  Unlike the previous case
for snd_pcm_hw_hw_params() and snd_pcm_hw_free(), snd_pcm_prepare() is
performed to the linked streams, hence the lock can't be applied
simply on the top.  For tracking the lock in each linked substream, we
modify snd_pcm_action_group() slightly and apply the buffer_mutex for
the case stream_lock=false (formerly there was no lock applied)
there.

Bug: 232293337
Cc: <stable@vger.kernel.org>
Reviewed-by: Jaroslav Kysela <perex@perex.cz>
Link: https://lore.kernel.org/r/20220322170720.3529-4-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Change-Id: Idcb26b8b178b9617e44443f2ca093074b76068b0
2022-06-24 19:45:26 +00:00
Takashi Iwai
dd17ad6e7d BACKPORT: ALSA: pcm: Fix races among concurrent read/write and buffer changes
commit dca947d4d2 upstream.

In the current PCM design, the read/write syscalls (as well as the
equivalent ioctls) are allowed before the PCM stream is running, that
is, at PCM PREPARED state.  Meanwhile, we also allow to re-issue
hw_params and hw_free ioctl calls at the PREPARED state that may
change or free the buffers, too.  The problem is that there is no
protection against those mix-ups.

This patch applies the previously introduced runtime->buffer_mutex to
the read/write operations so that the concurrent hw_params or hw_free
call can no longer interfere during the operation.  The mutex is
unlocked before scheduling, so we don't take it too long.

Bug: 232293337
Cc: <stable@vger.kernel.org>
Reviewed-by: Jaroslav Kysela <perex@perex.cz>
Link: https://lore.kernel.org/r/20220322170720.3529-3-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Change-Id: I4ec9ab14347e88de6b51025b845d13514ac289e9
2022-06-24 19:45:26 +00:00
Greg Kroah-Hartman
f39647e757 ANDROID: Fix up abi issue with struct snd_pcm_runtime
A portion of the fix for CVE-2022-1048, commit 0f6947f5f5 ("ALSA: pcm:
Fix races among concurrent hw_params and hw_free calls"), caused an ABI
break by adding a new field to struct snd_pcm_runtime.  Because we have
to keep this new addition, it is safe to move it to the end of the
structure because this is only ever created by the sound core, and
referenced as a pointer everywhere else.

This does require a .xml update also to handle the increased structure
size:

Leaf changes summary: 1 artifact changed
Changed leaf types summary: 1 leaf type changed
Removed/Changed/Added functions summary: 0 Removed, 0 Changed, 0 Added function
Removed/Changed/Added variables summary: 0 Removed, 0 Changed, 0 Added variable

'struct snd_pcm_runtime at pcm.h:344:1' changed:
  type size changed from 6144 to 6528 (in bits)
  1 data member insertion:
    'mutex buffer_mutex', at offset 6144 (in bits) at pcm.h:432:1
  72 impacted interfaces

Bug: 161946584
Fixes: 0f6947f5f5 ("ALSA: pcm: Fix races among concurrent hw_params and hw_free calls")
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
[Lee: Update XML files for this branch]
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Change-Id: I20340387fbe85fb82676517a93bb0184c8c1eb65
2022-06-24 19:45:26 +00:00
Takashi Iwai
d7202e9cc4 BACKPORT: ALSA: pcm: Fix races among concurrent hw_params and hw_free calls
commit 92ee3c60ec upstream.

Currently we have neither proper check nor protection against the
concurrent calls of PCM hw_params and hw_free ioctls, which may result
in a UAF.  Since the existing PCM stream lock can't be used for
protecting the whole ioctl operations, we need a new mutex to protect
those racy calls.

This patch introduced a new mutex, runtime->buffer_mutex, and applies
it to both hw_params and hw_free ioctl code paths.  Along with it, the
both functions are slightly modified (the mmap_count check is moved
into the state-check block) for code simplicity.

Bug: 5d95acffca
Reported-by: Hu Jiahui <kirin.say@gmail.com>
Cc: <stable@vger.kernel.org>
Reviewed-by: Jaroslav Kysela <perex@perex.cz>
Link: https://lore.kernel.org/r/20220322170720.3529-2-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Change-Id: I33b5ed3d1f38904e215692a236fe39e8b3ee1f15
2022-06-24 19:45:26 +00:00
Dmitrii Merkurev
80b6ac8cf3 Revert "ANDROID: fuse-bpf: use target instead of parent inode
to execute backing revalidate"

This reverts commit b610eff230.

Reason for revert: I broke BPF calling logic with this one. Possible
fix is here:
https://android-review.googlesource.com/c/kernel/common/+/2132134 but
we're still discussing possible way to go there:
go/fuse-bpf-revalidate-problem
Change-Id: I517941a2c341999dc8133b93cf045ec67bcf8a9e
Signed-off-by: Dmitrii Merkurev <dimorinny@google.com>
2022-06-24 15:29:28 +00:00
Greg Kroah-Hartman
4cbf7ff510 Merge 5.10.118 into android13-5.10-lts
Changes in 5.10.118
	usb: gadget: fix race when gadget driver register via ioctl
	io_uring: always grab file table for deferred statx
	floppy: use a statically allocated error counter
	Revert "drm/i915/opregion: check port number bounds for SWSCI display power state"
	igc: Remove _I_PHY_ID checking
	igc: Remove phy->type checking
	igc: Update I226_K device ID
	rtc: fix use-after-free on device removal
	rtc: pcf2127: fix bug when reading alarm registers
	um: Cleanup syscall_handler_t definition/cast, fix warning
	Input: add bounds checking to input_set_capability()
	Input: stmfts - fix reference leak in stmfts_input_open
	nvme-pci: add quirks for Samsung X5 SSDs
	gfs2: Disable page faults during lockless buffered reads
	rtc: sun6i: Fix time overflow handling
	crypto: stm32 - fix reference leak in stm32_crc_remove
	crypto: x86/chacha20 - Avoid spurious jumps to other functions
	ALSA: hda/realtek: Enable headset mic on Lenovo P360
	s390/pci: improve zpci_dev reference counting
	vhost_vdpa: don't setup irq offloading when irq_num < 0
	tools/virtio: compile with -pthread
	nvme-multipath: fix hang when disk goes live over reconnect
	rtc: mc146818-lib: Fix the AltCentury for AMD platforms
	fs: fix an infinite loop in iomap_fiemap
	MIPS: lantiq: check the return value of kzalloc()
	drbd: remove usage of list iterator variable after loop
	platform/chrome: cros_ec_debugfs: detach log reader wq from devm
	ARM: 9191/1: arm/stacktrace, kasan: Silence KASAN warnings in unwind_frame()
	nilfs2: fix lockdep warnings in page operations for btree nodes
	nilfs2: fix lockdep warnings during disk space reclamation
	Revert "swiotlb: fix info leak with DMA_FROM_DEVICE"
	Reinstate some of "swiotlb: rework "fix info leak with DMA_FROM_DEVICE""
	ALSA: usb-audio: Restore Rane SL-1 quirk
	ALSA: wavefront: Proper check of get_user() error
	ALSA: hda/realtek: Add quirk for TongFang devices with pop noise
	perf: Fix sys_perf_event_open() race against self
	selinux: fix bad cleanup on error in hashtab_duplicate()
	Fix double fget() in vhost_net_set_backend()
	PCI/PM: Avoid putting Elo i2 PCIe Ports in D3cold
	KVM: x86/mmu: Update number of zapped pages even if page list is stable
	arm64: paravirt: Use RCU read locks to guard stolen_time
	arm64: mte: Ensure the cleared tags are visible before setting the PTE
	crypto: qcom-rng - fix infinite loop on requests not multiple of WORD_SZ
	libceph: fix potential use-after-free on linger ping and resends
	drm/dp/mst: fix a possible memory leak in fetch_monitor_name()
	dma-buf: fix use of DMA_BUF_SET_NAME_{A,B} in userspace
	ARM: dts: aspeed-g6: remove FWQSPID group in pinctrl dtsi
	pinctrl: pinctrl-aspeed-g6: remove FWQSPID group in pinctrl
	ARM: dts: aspeed-g6: fix SPI1/SPI2 quad pin group
	net: ipa: record proper RX transaction count
	net: macb: Increment rx bd head after allocating skb and buffer
	net: evaluate net.ipvX.conf.all.disable_policy and disable_xfrm
	xfrm: Add possibility to set the default to block if we have no policy
	net: xfrm: fix shift-out-of-bounce
	xfrm: make user policy API complete
	xfrm: notify default policy on update
	xfrm: fix dflt policy check when there is no policy configured
	xfrm: rework default policy structure
	xfrm: fix "disable_policy" flag use when arriving from different devices
	net/sched: act_pedit: sanitize shift argument before usage
	net: systemport: Fix an error handling path in bcm_sysport_probe()
	net: vmxnet3: fix possible use-after-free bugs in vmxnet3_rq_alloc_rx_buf()
	net: vmxnet3: fix possible NULL pointer dereference in vmxnet3_rq_cleanup()
	ice: fix possible under reporting of ethtool Tx and Rx statistics
	clk: at91: generated: consider range when calculating best rate
	net/qla3xxx: Fix a test in ql_reset_work()
	NFC: nci: fix sleep in atomic context bugs caused by nci_skb_alloc
	net/mlx5e: Properly block LRO when XDP is enabled
	net: af_key: add check for pfkey_broadcast in function pfkey_process
	ARM: 9196/1: spectre-bhb: enable for Cortex-A15
	ARM: 9197/1: spectre-bhb: fix loop8 sequence for Thumb2
	igb: skip phy status check where unavailable
	net: bridge: Clear offload_fwd_mark when passing frame up bridge interface.
	riscv: dts: sifive: fu540-c000: align dma node name with dtschema
	gpio: gpio-vf610: do not touch other bits when set the target bit
	gpio: mvebu/pwm: Refuse requests with inverted polarity
	perf bench numa: Address compiler error on s390
	scsi: qla2xxx: Fix missed DMA unmap for aborted commands
	mac80211: fix rx reordering with non explicit / psmp ack policy
	nl80211: validate S1G channel width
	selftests: add ping test with ping_group_range tuned
	nl80211: fix locking in nl80211_set_tx_bitrate_mask()
	ethernet: tulip: fix missing pci_disable_device() on error in tulip_init_one()
	net: stmmac: fix missing pci_disable_device() on error in stmmac_pci_probe()
	net: atlantic: fix "frag[0] not initialized"
	net: atlantic: reduce scope of is_rsc_complete
	net: atlantic: add check for MAX_SKB_FRAGS
	net: atlantic: verify hw_head_ lies within TX buffer ring
	arm64: Enable repeat tlbi workaround on KRYO4XX gold CPUs
	Input: ili210x - fix reset timing
	dt-bindings: pinctrl: aspeed-g6: remove FWQSPID group
	module: treat exit sections the same as init sections when !CONFIG_MODULE_UNLOAD
	i2c: mt7621: fix missing clk_disable_unprepare() on error in mtk_i2c_probe()
	afs: Fix afs_getattr() to refetch file status if callback break occurred
	include/uapi/linux/xfrm.h: Fix XFRM_MSG_MAPPING ABI breakage
	module: check for exit sections in layout_sections() instead of module_init_section()
	Linux 5.10.118

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Idc3c64688441b3a071bebde50b7675ffff115bfe
2022-06-24 17:04:19 +02:00
Greg Kroah-Hartman
9ab92c66ba Merge 5.10.117 into android13-5.10-lts
Changes in 5.10.117
	batman-adv: Don't skb_split skbuffs with frag_list
	iwlwifi: iwl-dbg: Use del_timer_sync() before freeing
	hwmon: (tmp401) Add OF device ID table
	mac80211: Reset MBSSID parameters upon connection
	net: Fix features skip in for_each_netdev_feature()
	net: mscc: ocelot: fix last VCAP IS1/IS2 filter persisting in hardware when deleted
	net: mscc: ocelot: fix VCAP IS2 filters matching on both lookups
	net: mscc: ocelot: restrict tc-trap actions to VCAP IS2 lookup 0
	net: mscc: ocelot: avoid corrupting hardware counters when moving VCAP filters
	ipv4: drop dst in multicast routing path
	drm/nouveau: Fix a potential theorical leak in nouveau_get_backlight_name()
	netlink: do not reset transport header in netlink_recvmsg()
	sfc: Use swap() instead of open coding it
	net: sfc: fix memory leak due to ptp channel
	mac80211_hwsim: call ieee80211_tx_prepare_skb under RCU protection
	nfs: fix broken handling of the softreval mount option
	ionic: fix missing pci_release_regions() on error in ionic_probe()
	dim: initialize all struct fields
	hwmon: (ltq-cputemp) restrict it to SOC_XWAY
	selftests: vm: Makefile: rename TARGETS to VMTARGETS
	s390/ctcm: fix variable dereferenced before check
	s390/ctcm: fix potential memory leak
	s390/lcs: fix variable dereferenced before check
	net/sched: act_pedit: really ensure the skb is writable
	net: bcmgenet: Check for Wake-on-LAN interrupt probe deferral
	net: dsa: bcm_sf2: Fix Wake-on-LAN with mac_link_down()
	net/smc: non blocking recvmsg() return -EAGAIN when no data and signal_pending
	net: sfc: ef10: fix memory leak in efx_ef10_mtd_probe()
	tls: Fix context leak on tls_device_down
	gfs2: Fix filesystem block deallocation for short writes
	hwmon: (f71882fg) Fix negative temperature
	ASoC: max98090: Reject invalid values in custom control put()
	ASoC: max98090: Generate notifications on changes for custom control
	ASoC: ops: Validate input values in snd_soc_put_volsw_range()
	s390: disable -Warray-bounds
	net: emaclite: Don't advertise 1000BASE-T and do auto negotiation
	net: sfp: Add tx-fault workaround for Huawei MA5671A SFP ONT
	tcp: resalt the secret every 10 seconds
	firmware_loader: use kernel credentials when reading firmware
	tty/serial: digicolor: fix possible null-ptr-deref in digicolor_uart_probe()
	tty: n_gsm: fix mux activation issues in gsm_config()
	usb: cdc-wdm: fix reading stuck on device close
	usb: typec: tcpci: Don't skip cleanup in .remove() on error
	usb: typec: tcpci_mt6360: Update for BMC PHY setting
	USB: serial: pl2303: add device id for HP LM930 Display
	USB: serial: qcserial: add support for Sierra Wireless EM7590
	USB: serial: option: add Fibocom L610 modem
	USB: serial: option: add Fibocom MA510 modem
	slimbus: qcom: Fix IRQ check in qcom_slim_probe
	serial: 8250_mtk: Fix UART_EFR register address
	serial: 8250_mtk: Fix register address for XON/XOFF character
	ceph: fix setting of xattrs on async created inodes
	drm/nouveau/tegra: Stop using iommu_present()
	i40e: i40e_main: fix a missing check on list iterator
	net: atlantic: always deep reset on pm op, fixing up my null deref regression
	cgroup/cpuset: Remove cpus_allowed/mems_allowed setup in cpuset_init_smp()
	drm/vmwgfx: Initialize drm_mode_fb_cmd2
	SUNRPC: Clean up scheduling of autoclose
	SUNRPC: Prevent immediate close+reconnect
	SUNRPC: Don't call connect() more than once on a TCP socket
	SUNRPC: Ensure we flush any closed sockets before xs_xprt_free()
	net: phy: Fix race condition on link status change
	arm[64]/memremap: don't abuse pfn_valid() to ensure presence of linear map
	ping: fix address binding wrt vrf
	usb: gadget: uvc: rename function to be more consistent
	usb: gadget: uvc: allow for application to cleanly shutdown
	io_uring: always use original task when preparing req identity
	SUNRPC: Fix fall-through warnings for Clang
	Linux 5.10.117

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I9f7183e78f2967a52f1623164a5e2b10e575ee6c
2022-06-24 16:50:30 +02:00
Greg Kroah-Hartman
d96a068cc6 Merge 5.10.116 into android13-5.10-lts
Changes in 5.10.116
	MIPS: Use address-of operator on section symbols
	regulator: consumer: Add missing stubs to regulator/consumer.h
	block: drbd: drbd_nl: Make conversion to 'enum drbd_ret_code' explicit
	drm/amd/display/dc/gpio/gpio_service: Pass around correct dce_{version, environment} types
	nfp: bpf: silence bitwise vs. logical OR warning
	arm: remove CONFIG_ARCH_HAS_HOLES_MEMORYMODEL
	Bluetooth: Fix the creation of hdev->name
	mm: fix missing cache flush for all tail pages of compound page
	mm: hugetlb: fix missing cache flush in copy_huge_page_from_user()
	mm: userfaultfd: fix missing cache flush in mcopy_atomic_pte() and __mcopy_atomic()
	Linux 5.10.116

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I2a986e4b144f6d7c64aa6cab0e75649b0dad7ccc
2022-06-24 16:49:34 +02:00
Greg Kroah-Hartman
8e6b4843be Merge 5.10.115 into android13-5.10-lts
Changes in 5.10.115
	MIPS: Fix CP0 counter erratum detection for R4k CPUs
	parisc: Merge model and model name into one line in /proc/cpuinfo
	ALSA: hda/realtek: Add quirk for Yoga Duet 7 13ITL6 speakers
	ALSA: fireworks: fix wrong return count shorter than expected by 4 bytes
	mmc: sdhci-msm: Reset GCC_SDCC_BCR register for SDHC
	mmc: core: Set HS clock speed before sending HS CMD13
	gpiolib: of: fix bounds check for 'gpio-reserved-ranges'
	KVM: x86/svm: Account for family 17h event renumberings in amd_pmc_perf_hw_id
	iommu/vt-d: Calculate mask for non-aligned flushes
	drm/amd/display: Avoid reading audio pattern past AUDIO_CHANNELS_COUNT
	Revert "SUNRPC: attempt AF_LOCAL connect on setup"
	firewire: fix potential uaf in outbound_phy_packet_callback()
	firewire: remove check of list iterator against head past the loop body
	firewire: core: extend card->lock in fw_core_handle_bus_reset
	net: stmmac: disable Split Header (SPH) for Intel platforms
	genirq: Synchronize interrupt thread startup
	ASoC: da7219: Fix change notifications for tone generator frequency
	ASoC: wm8958: Fix change notifications for DSP controls
	ASoC: meson: Fix event generation for AUI ACODEC mux
	ASoC: meson: Fix event generation for G12A tohdmi mux
	ASoC: meson: Fix event generation for AUI CODEC mux
	s390/dasd: fix data corruption for ESE devices
	s390/dasd: prevent double format of tracks for ESE devices
	s390/dasd: Fix read for ESE with blksize < 4k
	s390/dasd: Fix read inconsistency for ESE DASD devices
	can: grcan: grcan_close(): fix deadlock
	can: isotp: remove re-binding of bound socket
	can: grcan: use ofdev->dev when allocating DMA memory
	can: grcan: grcan_probe(): fix broken system id check for errata workaround needs
	can: grcan: only use the NAPI poll budget for RX
	nfc: replace improper check device_is_registered() in netlink related functions
	nfc: nfcmrvl: main: reorder destructive operations in nfcmrvl_nci_unregister_dev to avoid bugs
	NFC: netlink: fix sleep in atomic bug when firmware download timeout
	gpio: pca953x: fix irq_stat not updated when irq is disabled (irq_mask not set)
	hwmon: (adt7470) Fix warning on module removal
	ASoC: dmaengine: Restore NULL prepare_slave_config() callback
	net/mlx5e: Fix trust state reset in reload
	net/mlx5e: Don't match double-vlan packets if cvlan is not set
	net/mlx5e: CT: Fix queued up restore put() executing after relevant ft release
	net/mlx5e: Fix the calling of update_buffer_lossy() API
	net/mlx5: Avoid double clear or set of sync reset requested
	selftests/seccomp: Don't call read() on TTY from background pgrp
	RDMA/siw: Fix a condition race issue in MPA request processing
	NFSv4: Don't invalidate inode attributes on delegation return
	net: ethernet: mediatek: add missing of_node_put() in mtk_sgmii_init()
	net: dsa: mt7530: add missing of_node_put() in mt7530_setup()
	net: stmmac: dwmac-sun8i: add missing of_node_put() in sun8i_dwmac_register_mdio_mux()
	net: cpsw: add missing of_node_put() in cpsw_probe_dt()
	net: emaclite: Add error handling for of_address_to_resource()
	hinic: fix bug of wq out of bound access
	selftests: mirror_gre_bridge_1q: Avoid changing PVID while interface is operational
	bnxt_en: Fix possible bnxt_open() failure caused by wrong RFS flag
	bnxt_en: Fix unnecessary dropping of RX packets
	selftests: ocelot: tc_flower_chains: specify conform-exceed action for policer
	smsc911x: allow using IRQ0
	btrfs: always log symlinks in full mode
	net: igmp: respect RCU rules in ip_mc_source() and ip_mc_msfilter()
	kvm: x86/cpuid: Only provide CPUID leaf 0xA if host has architectural PMU
	net/mlx5: Fix slab-out-of-bounds while reading resource dump menu
	x86/kvm: Preserve BSP MSR_KVM_POLL_CONTROL across suspend/resume
	KVM: x86: Do not change ICR on write to APIC_SELF_IPI
	KVM: x86/mmu: avoid NULL-pointer dereference on page freeing bugs
	KVM: LAPIC: Enable timer posted-interrupt only when mwait/hlt is advertised
	rcu: Fix callbacks processing time limit retaining cond_resched()
	rcu: Apply callbacks processing time limit only on softirq
	block-map: add __GFP_ZERO flag for alloc_page in function bio_copy_kern
	dm: interlock pending dm_io and dm_wait_for_bios_completion
	PCI: aardvark: Clear all MSIs at setup
	PCI: aardvark: Fix reading MSI interrupt number
	mmc: rtsx: add 74 Clocks in power on flow
	Linux 5.10.115

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Ibbeaf3230bdc7b515263da1f49d3e641e5fdfae6
2022-06-24 16:47:24 +02:00
Greg Kroah-Hartman
a8cb914f75 ANDROID: GKI: update the abi .xml file due to hex_to_bin() changes
Commit 616d354fb9 ("hex2bin: make the function hex_to_bin
constant-time") in 5.10.114 changed the signature of the hex_to_bin()
function to fix a key leak attack vector.  This is not an abi break as
older modules that use the function will still work properly, and the
CRC is preserved, but this resolves any issues going forward as well.

Leaf changes summary: 1 artifact changed
Changed leaf types summary: 0 leaf type changed
Removed/Changed/Added functions summary: 0 Removed, 1 Changed, 0 Added function
Removed/Changed/Added variables summary: 0 Removed, 0 Changed, 0 Added variable

1 function with some sub-type change:

  [C] 'function int hex_to_bin(char)' at hexdump.c:53:1 has some sub-type changes:
    parameter 1 of type 'char' changed:
      type name changed from 'char' to 'unsigned char'
      type size hasn't changed

Fixes: 616d354fb9 ("hex2bin: make the function hex_to_bin constant-time")
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I26b2283300369049abc831072df9a5ace3e770d1
2022-06-24 16:46:41 +02:00
Greg Kroah-Hartman
3828f1164c Revert "tcp: ensure to use the most recently sent skb when filling the rate sample"
This reverts commit 3c464db03c which is
commit b253a0680c upstream.

It breaks the abi and is not needed for Android systems, so revert it.

Bug: 161946584
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I6c40e8900bcc80b03e3d5fb2c99c9e95615b81ff
2022-06-24 16:14:47 +02:00
Greg Kroah-Hartman
52ddbabcb3 Merge 5.10.114 into android13-5.10-lts
Changes in 5.10.114
	floppy: disable FDRAWCMD by default
	lightnvm: disable the subsystem
	usb: mtu3: fix USB 3.0 dual-role-switch from device to host
	USB: quirks: add a Realtek card reader
	USB: quirks: add STRING quirk for VCOM device
	USB: serial: whiteheat: fix heap overflow in WHITEHEAT_GET_DTR_RTS
	USB: serial: cp210x: add PIDs for Kamstrup USB Meter Reader
	USB: serial: option: add support for Cinterion MV32-WA/MV32-WB
	USB: serial: option: add Telit 0x1057, 0x1058, 0x1075 compositions
	xhci: Enable runtime PM on second Alderlake controller
	xhci: stop polling roothubs after shutdown
	xhci: increase usb U3 -> U0 link resume timeout from 100ms to 500ms
	iio: dac: ad5592r: Fix the missing return value.
	iio: dac: ad5446: Fix read_raw not returning set value
	iio: magnetometer: ak8975: Fix the error handling in ak8975_power_on()
	iio: imu: inv_icm42600: Fix I2C init possible nack
	usb: misc: fix improper handling of refcount in uss720_probe()
	usb: typec: ucsi: Fix reuse of completion structure
	usb: typec: ucsi: Fix role swapping
	usb: gadget: uvc: Fix crash when encoding data for usb request
	usb: gadget: configfs: clear deactivation flag in configfs_composite_unbind()
	usb: dwc3: Try usb-role-switch first in dwc3_drd_init
	usb: dwc3: core: Fix tx/rx threshold settings
	usb: dwc3: core: Only handle soft-reset in DCTL
	usb: dwc3: gadget: Return proper request status
	usb: cdns3: Fix issue for clear halt endpoint
	usb: phy: generic: Get the vbus supply
	serial: imx: fix overrun interrupts in DMA mode
	serial: 8250: Also set sticky MCR bits in console restoration
	serial: 8250: Correct the clock for EndRun PTP/1588 PCIe device
	arch_topology: Do not set llc_sibling if llc_id is invalid
	pinctrl: samsung: fix missing GPIOLIB on ARM64 Exynos config
	hex2bin: make the function hex_to_bin constant-time
	hex2bin: fix access beyond string end
	riscv: patch_text: Fixup last cpu should be master
	x86/pci/xen: Disable PCI/MSI[-X] masking for XEN_HVM guests
	iocost: don't reset the inuse weight of under-weighted debtors
	video: fbdev: udlfb: properly check endpoint type
	arm64: dts: meson: remove CPU opps below 1GHz for G12B boards
	arm64: dts: meson: remove CPU opps below 1GHz for SM1 boards
	iio:imu:bmi160: disable regulator in error path
	mtd: rawnand: fix ecc parameters for mt7622
	USB: Fix xhci event ring dequeue pointer ERDP update issue
	ARM: dts: imx6qdl-apalis: Fix sgtl5000 detection issue
	phy: samsung: Fix missing of_node_put() in exynos_sata_phy_probe
	phy: samsung: exynos5250-sata: fix missing device put in probe error paths
	ARM: OMAP2+: Fix refcount leak in omap_gic_of_init
	bus: ti-sysc: Make omap3 gpt12 quirk handling SoC specific
	phy: ti: omap-usb2: Fix error handling in omap_usb2_enable_clocks
	ARM: dts: at91: Map MCLK for wm8731 on at91sam9g20ek
	ARM: dts: at91: sama5d4_xplained: fix pinctrl phandle name
	phy: mapphone-mdm6600: Fix PM error handling in phy_mdm6600_probe
	phy: ti: Add missing pm_runtime_disable() in serdes_am654_probe
	ARM: dts: Fix mmc order for omap3-gta04
	ARM: dts: am3517-evm: Fix misc pinmuxing
	ARM: dts: logicpd-som-lv: Fix wrong pinmuxing on OMAP35
	ipvs: correctly print the memory size of ip_vs_conn_tab
	pinctrl: mediatek: moore: Fix build error
	mtd: rawnand: Fix return value check of wait_for_completion_timeout
	mtd: fix 'part' field data corruption in mtd_info
	pinctrl: stm32: Do not call stm32_gpio_get() for edge triggered IRQs in EOI
	memory: renesas-rpc-if: Fix HF/OSPI data transfer in Manual Mode
	net: dsa: Add missing of_node_put() in dsa_port_link_register_of
	netfilter: nft_set_rbtree: overlap detection with element re-addition after deletion
	bpf, lwt: Fix crash when using bpf_skb_set_tunnel_key() from bpf_xmit lwt hook
	pinctrl: rockchip: fix RK3308 pinmux bits
	tcp: md5: incorrect tcp_header_len for incoming connections
	pinctrl: stm32: Keep pinctrl block clock enabled when LEVEL IRQ requested
	tcp: ensure to use the most recently sent skb when filling the rate sample
	wireguard: device: check for metadata_dst with skb_valid_dst()
	sctp: check asoc strreset_chunk in sctp_generate_reconf_event
	ARM: dts: imx6ull-colibri: fix vqmmc regulator
	arm64: dts: imx8mn-ddr4-evk: Describe the 32.768 kHz PMIC clock
	pinctrl: pistachio: fix use of irq_of_parse_and_map()
	cpufreq: fix memory leak in sun50i_cpufreq_nvmem_probe
	net: hns3: modify the return code of hclge_get_ring_chain_from_mbx
	net: hns3: add validity check for message data length
	net: hns3: add return value for mailbox handling in PF
	net/smc: sync err code when tcp connection was refused
	ip_gre: Make o_seqno start from 0 in native mode
	ip6_gre: Make o_seqno start from 0 in native mode
	ip_gre, ip6_gre: Fix race condition on o_seqno in collect_md mode
	tcp: fix potential xmit stalls caused by TCP_NOTSENT_LOWAT
	tcp: make sure treq->af_specific is initialized
	bus: sunxi-rsb: Fix the return value of sunxi_rsb_device_create()
	clk: sunxi: sun9i-mmc: check return value after calling platform_get_resource()
	net: bcmgenet: hide status block before TX timestamping
	net: phy: marvell10g: fix return value on error
	net: dsa: lantiq_gswip: Don't set GSWIP_MII_CFG_RMII_CLK
	drm/amdkfd: Fix GWS queue count
	drm/amd/display: Fix memory leak in dcn21_clock_source_create
	tls: Skip tls_append_frag on zero copy size
	bnx2x: fix napi API usage sequence
	net: fec: add missing of_node_put() in fec_enet_init_stop_mode()
	ixgbe: ensure IPsec VF<->PF compatibility
	ibmvnic: fix miscellaneous checks
	Revert "ibmvnic: Add ethtool private flag for driver-defined queue limits"
	tcp: fix F-RTO may not work correctly when receiving DSACK
	ASoC: Intel: soc-acpi: correct device endpoints for max98373
	ASoC: wm8731: Disable the regulator when probing fails
	ext4: fix bug_on in start_this_handle during umount filesystem
	x86: __memcpy_flushcache: fix wrong alignment if size > 2^32
	cifs: destage any unwritten data to the server before calling copychunk_write
	drivers: net: hippi: Fix deadlock in rr_close()
	powerpc/perf: Fix 32bit compile
	zonefs: Fix management of open zones
	zonefs: Clear inode information flags on inode creation
	kasan: prevent cpu_quarantine corruption when CPU offline and cache shrink occur at same time
	drm/i915: Fix SEL_FETCH_PLANE_*(PIPE_B+) register addresses
	net: ethernet: stmmac: fix write to sgmii_adapter_base
	thermal: int340x: Fix attr.show callback prototype
	x86/cpu: Load microcode during restore_processor_state()
	perf symbol: Pass is_kallsyms to symbols__fixup_end()
	perf symbol: Update symbols__fixup_end()
	tty: n_gsm: fix restart handling via CLD command
	tty: n_gsm: fix decoupled mux resource
	tty: n_gsm: fix mux cleanup after unregister tty device
	tty: n_gsm: fix wrong signal octet encoding in convergence layer type 2
	tty: n_gsm: fix malformed counter for out of frame data
	netfilter: nft_socket: only do sk lookups when indev is available
	tty: n_gsm: fix insufficient txframe size
	tty: n_gsm: fix wrong DLCI release order
	tty: n_gsm: fix missing explicit ldisc flush
	tty: n_gsm: fix wrong command retry handling
	tty: n_gsm: fix wrong command frame length field encoding
	tty: n_gsm: fix reset fifo race condition
	tty: n_gsm: fix incorrect UA handling
	tty: n_gsm: fix software flow control handling
	perf symbol: Remove arch__symbols__fixup_end()
	Linux 5.10.114

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I2c0a8fe7b57e81d61d86108dcbd18d7619b2140f
2022-06-24 16:14:24 +02:00
Greg Kroah-Hartman
902d7527c1 Revert "ipv6: make ip6_rt_gc_expire an atomic_t"
This reverts commit 49516e6ed9 which is
commit 9cb7c01342 upstream.

It breaks the Android KABI and is not needed in Android devices, so just
revert it.

Bug: 161946584
Fixes: 49516e6ed9 ("ipv6: make ip6_rt_gc_expire an atomic_t")
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Ibab89760234525cc5622cd60e61599784fd0f80a
2022-06-24 16:13:17 +02:00
Greg Kroah-Hartman
d3d4f869cd Revert "oom_kill.c: futex: delay the OOM reaper to allow time for proper futex cleanup"
This reverts commit ed5d4efb4d which is
commit e4a38402c3 upstream.

It breaks the kernel ABI and should not be an issue for Android at this
point in time.  If it is, it can come back in a different, abi-stable
form.

Bug: 161946584
Fixes: ed5d4efb4d ("oom_kill.c: futex: delay the OOM reaper to allow time for proper futex cleanup")
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I729614c373a7b28546376913e719bbaf6dd306a9
2022-06-24 16:13:09 +02:00
Greg Kroah-Hartman
11565b017b Merge 5.10.113 into android13-5.10-lts
Changes in 5.10.113
	etherdevice: Adjust ether_addr* prototypes to silence -Wstringop-overead
	mm: page_alloc: fix building error on -Werror=array-compare
	tracing: Dump stacktrace trigger to the corresponding instance
	perf tools: Fix segfault accessing sample_id xyarray
	gfs2: assign rgrp glock before compute_bitstructs
	net/sched: cls_u32: fix netns refcount changes in u32_change()
	ALSA: usb-audio: Clear MIDI port active flag after draining
	ALSA: hda/realtek: Add quirk for Clevo NP70PNP
	dm: fix mempool NULL pointer race when completing IO
	ASoC: atmel: Remove system clock tree configuration for at91sam9g20ek
	ASoC: msm8916-wcd-digital: Check failure for devm_snd_soc_register_component
	ASoC: codecs: wcd934x: do not switch off SIDO Buck when codec is in use
	dmaengine: imx-sdma: Fix error checking in sdma_event_remap
	dmaengine: mediatek:Fix PM usage reference leak of mtk_uart_apdma_alloc_chan_resources
	spi: spi-mtk-nor: initialize spi controller after resume
	esp: limit skb_page_frag_refill use to a single page
	igc: Fix infinite loop in release_swfw_sync
	igc: Fix BUG: scheduling while atomic
	rxrpc: Restore removed timer deletion
	net/smc: Fix sock leak when release after smc_shutdown()
	net/packet: fix packet_sock xmit return value checking
	ip6_gre: Avoid updating tunnel->tun_hlen in __gre6_xmit()
	ip6_gre: Fix skb_under_panic in __gre6_xmit()
	net/sched: cls_u32: fix possible leak in u32_init_knode()
	l3mdev: l3mdev_master_upper_ifindex_by_index_rcu should be using netdev_master_upper_dev_get_rcu
	ipv6: make ip6_rt_gc_expire an atomic_t
	netlink: reset network and mac headers in netlink_dump()
	net: stmmac: Use readl_poll_timeout_atomic() in atomic state
	dmaengine: idxd: add RO check for wq max_batch_size write
	dmaengine: idxd: add RO check for wq max_transfer_size write
	selftests: mlxsw: vxlan_flooding: Prevent flooding of unwanted packets
	arm64/mm: Remove [PUD|PMD]_TABLE_BIT from [pud|pmd]_bad()
	arm64: mm: fix p?d_leaf()
	ARM: vexpress/spc: Avoid negative array index when !SMP
	reset: tegra-bpmp: Restore Handle errors in BPMP response
	platform/x86: samsung-laptop: Fix an unsigned comparison which can never be negative
	ALSA: usb-audio: Fix undefined behavior due to shift overflowing the constant
	arm64: dts: imx: Fix imx8*-var-som touchscreen property sizes
	vxlan: fix error return code in vxlan_fdb_append
	cifs: Check the IOCB_DIRECT flag, not O_DIRECT
	net: atlantic: Avoid out-of-bounds indexing
	mt76: Fix undefined behavior due to shift overflowing the constant
	brcmfmac: sdio: Fix undefined behavior due to shift overflowing the constant
	dpaa_eth: Fix missing of_node_put in dpaa_get_ts_info()
	drm/msm/mdp5: check the return of kzalloc()
	net: macb: Restart tx only if queue pointer is lagging
	scsi: qedi: Fix failed disconnect handling
	stat: fix inconsistency between struct stat and struct compat_stat
	nvme: add a quirk to disable namespace identifiers
	nvme-pci: disable namespace identifiers for Qemu controllers
	EDAC/synopsys: Read the error count from the correct register
	mm, hugetlb: allow for "high" userspace addresses
	oom_kill.c: futex: delay the OOM reaper to allow time for proper futex cleanup
	mm/mmu_notifier.c: fix race in mmu_interval_notifier_remove()
	ata: pata_marvell: Check the 'bmdma_addr' beforing reading
	dma: at_xdmac: fix a missing check on list iterator
	net: atlantic: invert deep par in pm functions, preventing null derefs
	xtensa: patch_text: Fixup last cpu should be master
	xtensa: fix a7 clobbering in coprocessor context load/store
	openvswitch: fix OOB access in reserve_sfa_size()
	gpio: Request interrupts after IRQ is initialized
	ASoC: soc-dapm: fix two incorrect uses of list iterator
	e1000e: Fix possible overflow in LTR decoding
	ARC: entry: fix syscall_trace_exit argument
	arm_pmu: Validate single/group leader events
	sched/pelt: Fix attach_entity_load_avg() corner case
	perf/core: Fix perf_mmap fail when CONFIG_PERF_USE_VMALLOC enabled
	drm/panel/raspberrypi-touchscreen: Avoid NULL deref if not initialised
	drm/panel/raspberrypi-touchscreen: Initialise the bridge in prepare
	KVM: PPC: Fix TCE handling for VFIO
	drm/vc4: Use pm_runtime_resume_and_get to fix pm_runtime_get_sync() usage
	powerpc/perf: Fix power9 event alternatives
	perf report: Set PERF_SAMPLE_DATA_SRC bit for Arm SPE event
	ext4: fix fallocate to use file_modified to update permissions consistently
	ext4: fix symlink file size not match to file content
	ext4: fix use-after-free in ext4_search_dir
	ext4: limit length to bitmap_maxbytes - blocksize in punch_hole
	ext4, doc: fix incorrect h_reserved size
	ext4: fix overhead calculation to account for the reserved gdt blocks
	ext4: force overhead calculation if the s_overhead_cluster makes no sense
	can: isotp: stop timeout monitoring when no first frame was sent
	jbd2: fix a potential race while discarding reserved buffers after an abort
	spi: atmel-quadspi: Fix the buswidth adjustment between spi-mem and controller
	staging: ion: Prevent incorrect reference counting behavour
	block/compat_ioctl: fix range check in BLKGETSIZE
	Revert "net: micrel: fix KS8851_MLL Kconfig"
	Linux 5.10.113

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Ief4c24e385efd5fe0aba5577a1ef63da93a1b38f
2022-06-24 12:21:25 +02:00
Greg Kroah-Hartman
fe917bad60 Merge 5.10.112 into android13-5.10-lts
Changes in 5.10.112
	drm/amdkfd: Use drm_priv to pass VM from KFD to amdgpu
	hamradio: defer 6pack kfree after unregister_netdev
	hamradio: remove needs_free_netdev to avoid UAF
	cpuidle: PSCI: Move the `has_lpi` check to the beginning of the function
	ACPI: processor idle: Check for architectural support for LPI
	btrfs: remove unused variable in btrfs_{start,write}_dirty_block_groups()
	drm/msm: Add missing put_task_struct() in debugfs path
	memory: atmel-ebi: Fix missing of_node_put in atmel_ebi_probe
	firmware: arm_scmi: Fix sorting of retrieved clock rates
	media: rockchip/rga: do proper error checking in probe
	SUNRPC: Fix the svc_deferred_event trace class
	net/sched: flower: fix parsing of ethertype following VLAN header
	veth: Ensure eth header is in skb's linear part
	gpiolib: acpi: use correct format characters
	net: mdio: Alphabetically sort header inclusion
	mlxsw: i2c: Fix initialization error flow
	net/sched: fix initialization order when updating chain 0 head
	net: dsa: felix: suppress -EPROBE_DEFER errors
	net: ethernet: stmmac: fix altr_tse_pcs function when using a fixed-link
	net/sched: taprio: Check if socket flags are valid
	cfg80211: hold bss_lock while updating nontrans_list
	drm/msm: Fix range size vs end confusion
	drm/msm/dsi: Use connector directly in msm_dsi_manager_connector_init()
	net/smc: Fix NULL pointer dereference in smc_pnet_find_ib()
	scsi: pm80xx: Mask and unmask upper interrupt vectors 32-63
	scsi: pm80xx: Enable upper inbound, outbound queues
	scsi: iscsi: Stop queueing during ep_disconnect
	scsi: iscsi: Force immediate failure during shutdown
	scsi: iscsi: Use system_unbound_wq for destroy_work
	scsi: iscsi: Rel ref after iscsi_lookup_endpoint()
	scsi: iscsi: Fix in-kernel conn failure handling
	scsi: iscsi: Move iscsi_ep_disconnect()
	scsi: iscsi: Fix offload conn cleanup when iscsid restarts
	scsi: iscsi: Fix conn cleanup and stop race during iscsid restart
	sctp: Initialize daddr on peeled off socket
	testing/selftests/mqueue: Fix mq_perf_tests to free the allocated cpu set
	perf tools: Fix misleading add event PMU debug message
	nfc: nci: add flush_workqueue to prevent uaf
	cifs: potential buffer overflow in handling symlinks
	dm mpath: only use ktime_get_ns() in historical selector
	net: bcmgenet: Revert "Use stronger register read/writes to assure ordering"
	drm/amd: Add USBC connector ID
	btrfs: fix fallocate to use file_modified to update permissions consistently
	btrfs: do not warn for free space inode in cow_file_range
	drm/amd/display: fix audio format not updated after edid updated
	drm/amd/display: FEC check in timing validation
	drm/amd/display: Update VTEM Infopacket definition
	drm/amdkfd: Fix Incorrect VMIDs passed to HWS
	drm/amdgpu/vcn: improve vcn dpg stop procedure
	drm/amdkfd: Check for potential null return of kmalloc_array()
	Drivers: hv: vmbus: Prevent load re-ordering when reading ring buffer
	scsi: target: tcmu: Fix possible page UAF
	scsi: lpfc: Fix queue failures when recovering from PCI parity error
	scsi: ibmvscsis: Increase INITIAL_SRP_LIMIT to 1024
	net: micrel: fix KS8851_MLL Kconfig
	ata: libata-core: Disable READ LOG DMA EXT for Samsung 840 EVOs
	gpu: ipu-v3: Fix dev_dbg frequency output
	regulator: wm8994: Add an off-on delay for WM8994 variant
	arm64: alternatives: mark patch_alternative() as `noinstr`
	tlb: hugetlb: Add more sizes to tlb_remove_huge_tlb_entry
	net: axienet: setup mdio unconditionally
	net: usb: aqc111: Fix out-of-bounds accesses in RX fixup
	myri10ge: fix an incorrect free for skb in myri10ge_sw_tso
	drm/amd/display: Revert FEC check in validation
	drm/amd/display: Fix allocate_mst_payload assert on resume
	scsi: mvsas: Add PCI ID of RocketRaid 2640
	scsi: megaraid_sas: Target with invalid LUN ID is deleted during scan
	drivers: net: slip: fix NPD bug in sl_tx_timeout()
	perf/imx_ddr: Fix undefined behavior due to shift overflowing the constant
	mm, page_alloc: fix build_zonerefs_node()
	mm: fix unexpected zeroed page mapping with zram swap
	mm: kmemleak: take a full lowmem check in kmemleak_*_phys()
	KVM: x86/mmu: Resolve nx_huge_pages when kvm.ko is loaded
	memory: renesas-rpc-if: fix platform-device leak in error path
	gcc-plugins: latent_entropy: use /dev/urandom
	ath9k: Properly clear TX status area before reporting to mac80211
	ath9k: Fix usage of driver-private space in tx_info
	btrfs: fix root ref counts in error handling in btrfs_get_root_ref
	btrfs: mark resumed async balance as writing
	ALSA: hda/realtek: Add quirk for Clevo PD50PNT
	ALSA: hda/realtek: add quirk for Lenovo Thinkpad X12 speakers
	ALSA: pcm: Test for "silence" field in struct "pcm_format_data"
	nl80211: correctly check NL80211_ATTR_REG_ALPHA2 size
	ipv6: fix panic when forwarding a pkt with no in6 dev
	drm/amd/display: don't ignore alpha property on pre-multiplied mode
	drm/amdgpu: Enable gfxoff quirk on MacBook Pro
	genirq/affinity: Consider that CPUs on nodes can be unbalanced
	tick/nohz: Use WARN_ON_ONCE() to prevent console saturation
	ARM: davinci: da850-evm: Avoid NULL pointer dereference
	dm integrity: fix memory corruption when tag_size is less than digest size
	smp: Fix offline cpu check in flush_smp_call_function_queue()
	i2c: pasemi: Wait for write xfers to finish
	timers: Fix warning condition in __run_timers()
	dma-direct: avoid redundant memory sync for swiotlb
	scsi: iscsi: Fix endpoint reuse regression
	scsi: iscsi: Fix unbound endpoint error handling
	ax25: add refcount in ax25_dev to avoid UAF bugs
	ax25: fix reference count leaks of ax25_dev
	ax25: fix UAF bugs of net_device caused by rebinding operation
	ax25: Fix refcount leaks caused by ax25_cb_del()
	ax25: fix UAF bug in ax25_send_control()
	ax25: fix NPD bug in ax25_disconnect
	ax25: Fix NULL pointer dereferences in ax25 timers
	ax25: Fix UAF bugs in ax25 timers
	Linux 5.10.112

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I87b4d246682e80ccd6426265d3af4842f9d5e722
2022-06-24 11:54:12 +02:00
Greg Kroah-Hartman
c356141b2b ANDROID: fix up gpio change in 5.10.111
Commit 7e88a50704 ("gpio: Restrict usage of GPIO chip irq members
before initialization") causes an abi break, so use one of our reserved
fields to handle the change properly.

This causes the .xml file to need to be updated as libabigail notices
that the structure has changed a bit, but this is to be expected:

Leaf changes summary: 0 artifact changed (2 filtered out)
Changed leaf types summary: 0 (2 filtered out) leaf types changed
Removed/Changed/Added functions summary: 0 Removed, 0 Changed, 0 Added function
Removed/Changed/Added variables summary: 0 Removed, 0 Changed, 0 Added variable

type 'struct gpio_irq_chip' changed
  member 'union { bool initialized; struct { u64 android_kabi_reserved1; }; union { }; }' was added
  member 'u64 android_kabi_reserved1' was removed

Bug: 161946584
Fixes: 7e88a50704 ("gpio: Restrict usage of GPIO chip irq members before initialization")
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I010117f847936389e3a3d21d1119b52ee35005fd
2022-06-24 11:05:33 +02:00
Quentin Perret
5d95acffca ANDROID: KVM: arm64: Fix error handling in pKVM FF-A proxy
__ffa_host_{un}share_ranges() returns the number of {un}shared pages,
and not 0 upon success, so make sure to check for that in the error path
of ffa_host_{un}share_ranges().

Bug: 236751556
Signed-off-by: Quentin Perret <qperret@google.com>
Change-Id: Ie122e394f1bc4ce79fcbb24d2a5c58cd53b3c146
2022-06-23 09:20:08 +00:00
Vincent Palomares
854df93a7a ANDROID: GKI: Expose device async to userspace
Setting CONFIG_PM_ADVANCED_DEBUG=y to expose device async fields
to userspace, allowing to fine-tune the suspend/resume path.

Bug: 235135485
Change-Id: I75060e88ce0c1e199aa8740f446a2c0f8167f3d7
Signed-off-by: Vincent Palomares <paillon@google.com>
2022-06-22 21:57:14 +00:00
Daeho Jeong
18be5dcef3 FROMGIT: f2fs: fix iostat related lock protection
Made iostat related locks safe to be called from irq context again.

Bug: 233000474
Cc: <stable@vger.kernel.org>
Fixes: a1e09b03e6 ("f2fs: use iomap for direct I/O")
Signed-off-by: Daeho Jeong <daehojeong@google.com>
Reviewed-by: Stanley Chu <stanley.chu@mediatek.com>
Tested-by: Eddie Huang <eddie.huang@mediatek.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
(cherry picked from commit f8ed39ad779fbc5d37d08e83643384fc06e4bae4 git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs.git dev)
Change-Id: I8f6288b1fa80ba80be316d6f248216a260461e2f
2022-06-22 19:58:21 +00:00
T.J. Mercier
fc02d3582a BACKPORT: FROMLIST: dma-buf: Move sysfs work out of DMA-BUF export path
Recently, we noticed an issue where a process went into direct reclaim
while holding the kernfs rw semaphore for sysfs in write (exclusive)
mode. This caused processes who were doing DMA-BUF exports and releases
to go into uninterruptible sleep since they needed to acquire the same
semaphore for the DMA-BUF sysfs entry creation/deletion. In order to avoid
blocking DMA-BUF export for an indeterminate amount of time while
another process is holding the sysfs rw semaphore in exclusive mode,
this patch moves the per-buffer sysfs file creation to the default work
queue. Note that this can lead to a short-term inaccuracy in the dmabuf
sysfs statistics, but this is a tradeoff to prevent the hot path from
being blocked. A work_struct is added to dma_buf to achieve this, but as
it is unioned with the kobject in the sysfs_entry, dma_buf does not
increase in size.

Fixes: bdb8d06dfe ("dmabuf: Add the capability to expose DMA-BUF stats in sysfs")
Originally-by: Hridya Valsaraju <hridya@google.com>
Signed-off-by: T.J. Mercier <tjmercier@google.com>
Bug: 206979019
Link: https://lore.kernel.org/lkml/CABdmKX2dNYhgOYdrrJU6-jt6F=LjCidbKhR6t4F7yaa0SPr+-A@mail.gmail.com/T/

Conflicts:
	include/linux/dma-buf.h

1. The android13-5.10 KMI is frozen, and the modification to struct
   dma_buf_sysfs_entry in the original patch triggers ABI check
   failures. Instead of an anonymous union, use the existing struct
   kobject directly as a work_struct with type punning.

(cherry picked from commit b78809ea5239174f9282b6a8e323baa7c5c231c0
         https://android.git.corp.google.com/kernel/common android13-5.15)
Signed-off-by: T.J. Mercier <tjmercier@google.com>
Change-Id: Ic0386849b6b248b0a72215633fc1a50782455bac
2022-06-22 18:23:09 +00:00
Edward Wu
fca6ddffc8 ANDROID: vendor_hooks: add vendor hoook in current_alloc_flags()
By this vh, you can made your policy of ALLOC_CMA.
ex: skip __GFP_CMA to allow file-backed memory on CMA area

Bug: 234498088
Signed-off-by: Edward Wu <edwardwu@realtek.com>
Change-Id: Ief8de1f82885abeddbb6c0b625f7deca9fd74f6b
2022-06-21 09:24:53 +08:00
Edward Wu
45cb58e134 ANDROID: vendor_hooks: add vendor hoook to report acr_info in cma_alloc()
Add android_vh_cma_alloc_busy_info vh after EBUSY not only useful
for profiling but also pinned page handling.

Bug: 234498088
Signed-off-by: Edward Wu <edwardwu@realtek.com>
Change-Id: If1de7b63c431a79889e932ff3363314199175cce
2022-06-21 08:59:19 +08:00
Steve Muckle
45d8a7d082 ANDROID: Enable GKI Dr. No Enforcement
This locks down OWNERS approval to a small group to guard against
unintentional breakages.

Bug: 235646184
Signed-off-by: Steve Muckle <smuckle@google.com>
Change-Id: I58ca467b1e7786e1ad0f6ad67c7a7a5845a91ec6
2022-06-19 02:47:56 +00:00