Commit Graph

1148091 Commits

Author SHA1 Message Date
Shivani Baranwal
c59181f352 UPSTREAM: wifi: cfg80211: Support 32 bytes KCK key in GTK rekey offload
Currently, maximum KCK key length supported for GTK rekey offload is 24
bytes but with some newer AKMs the KCK key length can be 32 bytes. e.g.,
00-0F-AC:24 AKM suite with SAE finite cyclic group 21. Add support to
allow 32 bytes KCK keys in GTK rekey offload.

Signed-off-by: Shivani Baranwal <quic_shivbara@quicinc.com>
Signed-off-by: Veerendranath Jakkam <quic_vjakkam@quicinc.com>
Link: https://lore.kernel.org/r/20221206143715.1802987-3-quic_vjakkam@quicinc.com
Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Bug: 271996243
Change-Id: I065477436f41780425e3d1417fc7deddbe18da1c
(cherry picked from commit 648fba791cb0f5ef6166449d056f82e6639fe268)
Signed-off-by: Shivani Baranwal <quic_shivbara@quicinc.com>
2023-03-30 10:23:26 +00:00
Johannes Berg
c20c83bbab UPSTREAM: wifi: nl80211: use link ID in NL80211_CMD_SET_BSS
We clearly need the link ID here, to know the right BSS
to configure. Use/require it.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Bug: 271996243
Change-Id: I071708c1f521ee6f930472a60d5ee5d6aca43d72
(cherry picked from commit 1e0f8cc96b7162075d2e3b6bef856497884a3ae8)
Signed-off-by: Shivani Baranwal <quic_shivbara@quicinc.com>
2023-03-30 10:23:26 +00:00
Johannes Berg
1d2f0fdb9a UPSTREAM: wifi: cfg80211: support reporting failed links
For assoc and connect result APIs, support reporting
failed links; they should still come with the BSS
pointer in the case of assoc, so they're released
correctly. In the case of connect result, this is
optional.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Bug: 271996243
Change-Id: Ibd996c8807ad118787911fd8fe4dc2098d9c75e9
(cherry picked from commit 53ad07e9823bca10c26e71d662b58c3e80e8ff2a)
Signed-off-by: Shivani Baranwal <quic_shivbara@quicinc.com>
2023-03-30 10:23:26 +00:00
Quentin Perret
4f0e2cac4c ANDROID: KVM: arm64: Allow post-freeze backports to pKVM
The GKI policy allows the addition of new symbols to a frozen KMI as
long as doing so has no impact on existing frozen symbols. Interestingly
the hypervisor's ABI is defined by the pkvm_module_ops structure. Any
addition to this struct will be flagged as a type change, which equates
to a KMI breakage in the GKI world. This could become a major problem
long term if it prevented backport of (security) fixes to KMI-frozen
kernels.

To allow such backports, add a set of reserved ABI slots to the
pkvm_module_ops struct. These slots are usually reserved to fix LTS
merges, but given that none of the pKVM module code is upstream yet,
these slots are likely to be used by Android-specific fixes.

Bug: 233587962
Change-Id: I61a00a09947ccff153c96a4829e083ef9ede19d3
Signed-off-by: Quentin Perret <qperret@google.com>
2023-03-30 10:23:26 +00:00
Quentin Perret
b4b279e9e3 ANDROID: KVM: arm64: Expose host_{un}share_hyp() to modules
pKVM modules may need to access memory that is kept map in the host's
stage-2 page-table. Expose the host_{un}share_hyp() API to allow the
use-case, as well as the pinning API that goes with it.

Bug: 245034629
Change-Id: I1b5abacfcd2f066b1cbb1bbac43b77e6808f559c
Signed-off-by: Quentin Perret <qperret@google.com>
2023-03-30 10:23:26 +00:00
Nick Desaulniers
509a7a32a5 ANDROID: gki_config: use DWARFv5 rather than DWARFv4
DWARFv5 is the latest iteration of the debug info spec; it contains many
encoding tricks to optimize for space.

For example, with this patch applied (DWARFv5), for
build.config.gki.aarch64:
$ du -h out/android-mainline/dist/vmlinux
304M	out/android-mainline/dist/vmlinux

Before (DWARFv4):
du -h out/android-mainline/dist/vmlinux
339M	out/android-mainline/dist/vmlinux

Bug: 192694378
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
Change-Id: I6644482d9b12eb3e0d1d3676c53ee2eee97a6573
2023-03-30 06:28:22 +00:00
Ramji Jiyani
0d5b95acb6 ANDROID: GKI: Multi arch exports protection support
ABI is being implemented for x86_64, making it necessary
to support protected exports header file generation for
the GKI modules for multiple architecture.

Enable support to select required inputs based on the ARCH
to generate gki_module_protected_exports.h during kernel
build.

Inputs for generating gki_module_protected_exports.h are:

ARCH = arm64:
ABI Protected exports list: abi_gki_protected_exports_aarch64
Protected GKI modules list: gki_aarch64_protected_modules

ARCH = x86_64:
ABI Protected exports list: abi_gki_protected_exports_x86_64
Protected GKI modules list: gki_x86_64_protected_modules

Test: TH
Test: Manual verification of the generated header file
Test: bazel run //common:kernel_aarch64_abi_update_protected_exports
Bug: 151893768
Change-Id: Ic4bcb2732199b71a7973b5ce4c852bcd95d37131
Signed-off-by: Ramji Jiyani <ramjiyani@google.com>
2023-03-29 23:11:03 +00:00
YOUNGJIN JOO
cf6897ede5 ANDROID: ABI: update symbol list for galaxy
10 function symbol(s) added
  'int generic_mii_ioctl(struct mii_if_info*, struct mii_ioctl_data*, int, unsigned int*)'
  'int genphy_read_lpa(struct phy_device*)'
  'int genphy_update_link(struct phy_device*)'
  'unsigned int mii_check_media(struct mii_if_info*, unsigned int, unsigned int)'
  'void mii_ethtool_gset(struct mii_if_info*, struct ethtool_cmd*)'
  'int mii_nway_restart(struct mii_if_info*)'
  'void phy_resolve_aneg_linkmode(struct phy_device*)'
  'int phy_start_aneg(struct phy_device*)'
  'int usbnet_get_endpoints(struct usbnet*, struct usb_interface*)'
  'void usbnet_link_change(struct usbnet*, bool, bool)'

Bug: 275670974
Change-Id: I51b8c5ae4e172d350fca570b917dcd6024be9dc5
Signed-off-by: YOUNGJIN JOO <youngjin79.joo@samsung.com>
2023-03-29 21:52:21 +00:00
Jaegeuk Kim
1c94f5d776 FROMGIT: f2fs: fix scheduling while atomic in decompression path
[   16.945668][    C0] Call trace:
[   16.945678][    C0]  dump_backtrace+0x110/0x204
[   16.945706][    C0]  dump_stack_lvl+0x84/0xbc
[   16.945735][    C0]  __schedule_bug+0xb8/0x1ac
[   16.945756][    C0]  __schedule+0x724/0xbdc
[   16.945778][    C0]  schedule+0x154/0x258
[   16.945793][    C0]  bit_wait_io+0x48/0xa4
[   16.945808][    C0]  out_of_line_wait_on_bit+0x114/0x198
[   16.945824][    C0]  __sync_dirty_buffer+0x1f8/0x2e8
[   16.945853][    C0]  __f2fs_commit_super+0x140/0x1f4
[   16.945881][    C0]  f2fs_commit_super+0x110/0x28c
[   16.945898][    C0]  f2fs_handle_error+0x1f4/0x2f4
[   16.945917][    C0]  f2fs_decompress_cluster+0xc4/0x450
[   16.945942][    C0]  f2fs_end_read_compressed_page+0xc0/0xfc
[   16.945959][    C0]  f2fs_handle_step_decompress+0x118/0x1cc
[   16.945978][    C0]  f2fs_read_end_io+0x168/0x2b0
[   16.945993][    C0]  bio_endio+0x25c/0x2c8
[   16.946015][    C0]  dm_io_dec_pending+0x3e8/0x57c
[   16.946052][    C0]  clone_endio+0x134/0x254
[   16.946069][    C0]  bio_endio+0x25c/0x2c8
[   16.946084][    C0]  blk_update_request+0x1d4/0x478
[   16.946103][    C0]  scsi_end_request+0x38/0x4cc
[   16.946129][    C0]  scsi_io_completion+0x94/0x184
[   16.946147][    C0]  scsi_finish_command+0xe8/0x154
[   16.946164][    C0]  scsi_complete+0x90/0x1d8
[   16.946181][    C0]  blk_done_softirq+0xa4/0x11c
[   16.946198][    C0]  _stext+0x184/0x614
[   16.946214][    C0]  __irq_exit_rcu+0x78/0x144
[   16.946234][    C0]  handle_domain_irq+0xd4/0x154
[   16.946260][    C0]  gic_handle_irq.33881+0x5c/0x27c
[   16.946281][    C0]  call_on_irq_stack+0x40/0x70
[   16.946298][    C0]  do_interrupt_handler+0x48/0xa4
[   16.946313][    C0]  el1_interrupt+0x38/0x68
[   16.946346][    C0]  el1h_64_irq_handler+0x20/0x30
[   16.946362][    C0]  el1h_64_irq+0x78/0x7c
[   16.946377][    C0]  finish_task_switch+0xc8/0x3d8
[   16.946394][    C0]  __schedule+0x600/0xbdc
[   16.946408][    C0]  preempt_schedule_common+0x34/0x5c
[   16.946423][    C0]  preempt_schedule+0x44/0x48
[   16.946438][    C0]  process_one_work+0x30c/0x550
[   16.946456][    C0]  worker_thread+0x414/0x8bc
[   16.946472][    C0]  kthread+0x16c/0x1e0
[   16.946486][    C0]  ret_from_fork+0x10/0x20

Bug: 274972806
Fixes: bff139b49d ("f2fs: handle decompress only post processing in softirq")
Fixes: 95fa90c9e5 ("f2fs: support recording errors into superblock")
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
(cherry picked from commit 8906fb10b77f8ed72365da9f930fefc9c4e53caf
https: //git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs.git dev)
Change-Id: I9310705c881865ae4462e63b398aeed8afcfd58c
2023-03-29 21:44:21 +00:00
Eric Biggers
35fe8aaba9 ANDROID: dm-default-key: update for blk_crypto_evict_key() returning void
blk_crypto_evict_key() now returns void, so update default_key_dtr()
accordingly.

Bug: 270098322
Change-Id: I6add49a8f792c51f33e7adb189a9e7ed5ff410b0
Signed-off-by: Eric Biggers <ebiggers@google.com>
2023-03-29 20:05:28 +00:00
Eric Biggers
9fe0c97d45 FROMGIT: blk-crypto: make blk_crypto_evict_key() more robust
If blk_crypto_evict_key() sees that the key is still in-use (due to a
bug) or that ->keyslot_evict failed, it currently just returns while
leaving the key linked into the keyslot management structures.

However, blk_crypto_evict_key() is only called in contexts such as inode
eviction where failure is not an option.  So actually the caller
proceeds with freeing the blk_crypto_key regardless of the return value
of blk_crypto_evict_key().

These two assumptions don't match, and the result is that there can be a
use-after-free in blk_crypto_reprogram_all_keys() after one of these
errors occurs.  (Note, these errors *shouldn't* happen; we're just
talking about what happens if they do anyway.)

Fix this by making blk_crypto_evict_key() unlink the key from the
keyslot management structures even on failure.

Also improve some comments.

Fixes: 1b26283970 ("block: Keyslot Manager for Inline Encryption")
Cc: stable@vger.kernel.org
Signed-off-by: Eric Biggers <ebiggers@google.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/r/20230315183907.53675-2-ebiggers@kernel.org
Signed-off-by: Jens Axboe <axboe@kernel.dk>

Bug: 270098322
(cherry picked from commit 5c7cb94452901a93e90c2230632e2c12a681bc92
 https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git/log/?h=for-next)
Change-Id: I4e8983ad7db94ea8cd422743196da8854adda552
Signed-off-by: Eric Biggers <ebiggers@google.com>
2023-03-29 20:05:28 +00:00
Eric Biggers
6393d24553 FROMGIT: blk-crypto: make blk_crypto_evict_key() return void
blk_crypto_evict_key() is only called in contexts such as inode eviction
where failure is not an option.  So there is nothing the caller can do
with errors except log them.  (dm-table.c does "use" the error code, but
only to pass on to upper layers, so it doesn't really count.)

Just make blk_crypto_evict_key() return void and log errors itself.

Cc: stable@vger.kernel.org
Signed-off-by: Eric Biggers <ebiggers@google.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/r/20230315183907.53675-2-ebiggers@kernel.org
Signed-off-by: Jens Axboe <axboe@kernel.dk>

Bug: 270098322
(cherry picked from commit 70493a63ba04f754f7a7dd53a4fcc82700181490
 https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git/log/?h=for-next)
Change-Id: I8b9c7a74473e21fb740f021ac9f2fff95f986aa4
Signed-off-by: Eric Biggers <ebiggers@google.com>
2023-03-29 20:05:28 +00:00
Eric Biggers
dbcd8b8827 FROMGIT: blk-mq: release crypto keyslot before reporting I/O complete
Once all I/O using a blk_crypto_key has completed, filesystems can call
blk_crypto_evict_key().  However, the block layer currently doesn't call
blk_crypto_put_keyslot() until the request is being freed, which happens
after upper layers have been told (via bio_endio()) the I/O has
completed.  This causes a race condition where blk_crypto_evict_key()
can see 'slot_refs != 0' without there being an actual bug.

This makes __blk_crypto_evict_key() hit the
'WARN_ON_ONCE(atomic_read(&slot->slot_refs) != 0)' and return without
doing anything, eventually causing a use-after-free in
blk_crypto_reprogram_all_keys().  (This is a very rare bug and has only
been seen when per-file keys are being used with fscrypt.)

There are two options to fix this: either release the keyslot before
bio_endio() is called on the request's last bio, or make
__blk_crypto_evict_key() ignore slot_refs.  Let's go with the first
solution, since it preserves the ability to report bugs (via
WARN_ON_ONCE) where a key is evicted while still in-use.

Fixes: a892c8d52c ("block: Inline encryption support for blk-mq")
Cc: stable@vger.kernel.org
Reviewed-by: Nathan Huckleberry <nhuck@google.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Eric Biggers <ebiggers@google.com>
Link: https://lore.kernel.org/r/20230315183907.53675-2-ebiggers@kernel.org
Signed-off-by: Jens Axboe <axboe@kernel.dk>

Bug: 270098322
(cherry picked from commit 9cd1e566676bbcb8a126acd921e4e194e6339603
 https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git/log/?h=for-next)
Change-Id: Ic2c2426db7693a06901c7893d481471f30de03b2
Signed-off-by: Eric Biggers <ebiggers@google.com>
2023-03-29 20:05:28 +00:00
Eric Biggers
ac8758b1b2 ANDROID: gki_defconfig: enable CONFIG_CRYPTO_GHASH_ARM64_CE
Enable the ARMv8 Crypto Extensions implementation of AES-GCM, as it's an
order of magnitude faster than the generic implementation and is more
secure.  AES-GCM is used by Android's IPsec support
(https://developer.android.com/reference/android/net/IpSecAlgorithm#AUTH_CRYPT_AES_GCM)
and often is the first choice of algorithm for new purposes as well.

This also makes GKI on arm64 consistent with GKI on x86, as the AES-NI
accelerated AES-GCM is already enabled on x86.  (It is not its own
option on x86, but rather is included in CONFIG_CRYPTO_AES_NI_INTEL.)

Bug: 274721410
Change-Id: I2877192dad8f71a961d6f6f465b62b6aeee69540
Signed-off-by: Eric Biggers <ebiggers@google.com>
2023-03-29 17:52:11 +00:00
Greg Kroah-Hartman
88df355018 Revert "ANDROID: module: Add vendor hooks"
This reverts commit 60e6687899.

The hooks added in it, android_rvh_set_module_core_rw_nx,
android_rvh_set_module_init_rw_nx,
android_rvh_set_module_permit_before_init, and
android_rvh_set_module_permit_after_init, are not used by any vendor
symbol list, so remove them as they are unused.

Bug: 248994334
Cc: Kuan-Ying Lee <Kuan-Ying.Lee@mediatek.com>
Change-Id: I39d02510916e2a645526f7d3bfaa3e4066901a3e
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2023-03-29 08:05:07 +00:00
Greg Kroah-Hartman
98b6ece5f3 Revert "ANDROID: GKI: Export clocksource_mmio_init"
This reverts commit c0b208dbee.

The symbols exported by it (clocksource_mmio_init and
clocksource_mmio_readl_up) are not used by any vendor symbol list, and
so the exports are not needed.

Bug: 161675989
Cc: Chun-Hung Wu <chun-hung.wu@mediatek.com>
Change-Id: Ic3b1105d093815ead780519661184aeab9c1f026
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2023-03-29 06:30:17 +00:00
Yi Kong
244e3955fe ANDROID: clang: update to 17.0.0
Bug: 264965700
Change-Id: Icccbbe9c188b4fca580789d7ad72f289fbcc1c78
Signed-off-by: Yi Kong <yikong@google.com>
2023-03-28 17:12:02 +00:00
Jaegeuk Kim
3d44f9b49e FROMGIT: f2fs v2: factor out discard_cmd usage from general rb_tree use
I found a bug in the previous version and this patch fixes the gap from
upstream version.

Fixes: fcc385fd44a0 ("FROMGIT: f2fs: factor out discard_cmd usage from general rb_tree use")
Signed-off-by: Jaegeuk Kim <jaegeuk@google.com>
(cherry picked from commit e39836183be8
https: //git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs.git dev)
Change-Id: I4dbfb9f1f2cc956685a7c4de5fcfbba705c30cfb
2023-03-27 09:39:16 -07:00
Rajesh kv
6e55119ce0 ANDROID: ABI: Update QCOM symbol list
Add required symbols to QCOM symbol list.
There is no ABI impact.

Bug: 270890283
Change-Id: Iec7e99fa6e3555f1b4a41e4ac828022f74bfa254
Signed-off-by: Rajesh kv <quic_kvrajesh@quicinc.com>
2023-03-27 16:21:27 +00:00
YOUNGJIN JOO
b56777fad6 ANDROID: ABI: update symbol list for galaxy
2 function symbol(s) added
  'int gpiod_cansleep(const struct gpio_desc*)'
  'int i2c_bit_add_numbered_bus(struct i2c_adapter*)'

Bug: 275003525
Change-Id: I68d9c7dd955be28ac6754a0088a25518d883e8de
Signed-off-by: YOUNGJIN JOO <youngjin79.joo@samsung.com>
2023-03-27 11:41:44 +00:00
Greg Kroah-Hartman
f472016c8c ANDROID: update db845c symbol list.
In the 6.1.21 some new icc_* symbols are needed by the db845c build:
	icc_provider_deregister
	icc_provider_init
	icc_provider_register
so add them to the symbol list.

Fixes: e3a87a10f2 ("Linux 6.1.21")
Change-Id: I5ca82eaf66a447264967626d1de410d616474bf3
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2023-03-24 16:51:25 +00:00
Greg Kroah-Hartman
eb1f5e4656 Revert "drm/msm/gem: Prevent blocking within shrinker loop"
This reverts commit 96a5aee274.

It breaks the ABI right now, but will be brought back at the next ABI
break as it will be needed for Android systems.

Bug: 161946584
Change-Id: Icbb2e68d017ac8c697dcab908aed8449670b281e
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2023-03-24 16:51:25 +00:00
Greg Kroah-Hartman
ad8dbd4420 Revert "scsi: core: Add BLIST_NO_VPD_SIZE for some VDASD"
This reverts commit d2112b18b5.

It breaks the ABI right now, but will be brought back at the next ABI
break as it will be needed for Android systems.

Bug: 161946584
Change-Id: I26711f5fc537c34fe6e9af2fa6cbb64fd62cb681
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2023-03-24 16:51:25 +00:00
Treehugger Robot
d3ea2c2a28 Merge "Merge 6.1.21 into android14-6.1" into android14-6.1 2023-03-24 16:51:25 +00:00
Jaskaran Singh
993b35e7e8 ANDROID: ABI: Update QCOM symbol list for minidump
Add the following symbols to support the minidump module.

9 function symbol(s) added
  'unsigned long vmalloc_nr_pages(void)'
  'unsigned long pcpu_nr_pages(void)'
  'void si_swapinfo(struct sysinfo *val)'
  'void page_ext_put(struct page_ext *page_ext)'
  'struct page_ext *page_ext_get(struct page *page)'
  'void get_slabinfo(struct kmem_cache *s, struct slabinfo *sinfo)'
  'unsigned long get_each_object_track(struct kmem_cache *s,
		struct page *page, enum track_item alloc,
		int (*fn)(const struct kmem_cache *, const void *,
		const struct track *, void *), void *private)'
  'int dma_buf_get_each(int (*callback)(const struct dma_buf *dmabuf,
		void *private), void *private)'
  'depot_stack_handle_t get_page_owner_handle(struct page_ext *page_ext,
		unsigned long pfn)'

Bug: 274861632
Change-Id: If96a6dd55bd65c0d815e9a4e954218a7eea4b859
Signed-off-by: Jaskaran Singh <quic_jasksing@quicinc.com>
2023-03-24 12:17:07 +00:00
Venkata Rao Kakani
3ede901fc7 ANDROID: ABI: Update QCOM symbol list
The list of symbols that are needed after enabling a
set of features.

Bug: 273879650

Change-Id: I93867dd1aab4073f63f80bae6ff6462a5cc7aaf3
Signed-off-by: Venkata Rao Kakani <quic_vkakani@quicinc.com>
2023-03-24 10:45:33 +00:00
Udipto Goswami
9e208c6d41 ANDROID: ABI: Update QCOM symbol list
1 function symbol(s) added
  'ktime_t ktime_add_safe(ktime_t, ktime_t)'

Bug: 275009920
Change-Id: I73ec4551b4e2b0fee1196a696354d19dd952a2a7
Signed-off-by: Udipto Goswami <quic_ugoswami@quicinc.com>
2023-03-24 10:45:30 +00:00
Greg Kroah-Hartman
d14ac9ddc6 Merge 6.1.21 into android14-6.1
Changes in 6.1.21
	xfrm: Allow transport-mode states with AF_UNSPEC selector
	drm/virtio: Pass correct device to dma_sync_sgtable_for_device()
	drm/msm/gem: Prevent blocking within shrinker loop
	drm/panfrost: Don't sync rpm suspension after mmu flushing
	fbdev: chipsfb: Fix error codes in chipsfb_pci_init()
	cifs: Move the in_send statistic to __smb_send_rqst()
	drm/meson: fix 1px pink line on GXM when scaling video overlay
	clk: HI655X: select REGMAP instead of depending on it
	ASoC: SOF: Intel: MTL: Fix the device description
	ASoC: SOF: Intel: HDA: Fix device description
	ASoC: SOF: Intel: SKL: Fix device description
	ASOC: SOF: Intel: pci-tgl: Fix device description
	ASoC: SOF: ipc4-topology: set dmic dai index from copier
	docs: Correct missing "d_" prefix for dentry_operations member d_weak_revalidate
	scsi: mpt3sas: Fix NULL pointer access in mpt3sas_transport_port_add()
	scsi: mpi3mr: Fix throttle_groups memory leak
	scsi: mpi3mr: Fix config page DMA memory leak
	scsi: mpi3mr: Fix mpi3mr_hba_port memory leak in mpi3mr_remove()
	scsi: mpi3mr: Fix sas_hba.phy memory leak in mpi3mr_remove()
	scsi: mpi3mr: Return proper values for failures in firmware init path
	scsi: mpi3mr: Fix memory leaks in mpi3mr_init_ioc()
	scsi: mpi3mr: ioctl timeout when disabling/enabling interrupt
	scsi: mpi3mr: Fix expander node leak in mpi3mr_remove()
	ALSA: hda: Match only Intel devices with CONTROLLER_IN_GPU()
	netfilter: nft_nat: correct length for loading protocol registers
	netfilter: nft_masq: correct length for loading protocol registers
	netfilter: nft_redir: correct length for loading protocol registers
	netfilter: nft_redir: correct value of inet type `.maxattrs`
	scsi: core: Add BLIST_NO_VPD_SIZE for some VDASD
	scsi: core: Fix a procfs host directory removal regression
	ftrace,kcfi: Define ftrace_stub_graph conditionally
	tcp: tcp_make_synack() can be called from process context
	vdpa/mlx5: should not activate virtq object when suspended
	wifi: nl80211: fix NULL-ptr deref in offchan check
	wifi: cfg80211: fix MLO connection ownership
	selftests: fix LLVM build for i386 and x86_64
	nfc: pn533: initialize struct pn533_out_arg properly
	ipvlan: Make skb->skb_iif track skb->dev for l3s mode
	i40e: Fix kernel crash during reboot when adapter is in recovery mode
	vhost-vdpa: free iommu domain after last use during cleanup
	vdpa_sim: not reset state in vdpasim_queue_ready
	vdpa_sim: set last_used_idx as last_avail_idx in vdpasim_queue_ready
	PCI: s390: Fix use-after-free of PCI resources with per-function hotplug
	drm/i915/psr: Use calculated io and fast wake lines
	drm/i915/sseu: fix max_subslices array-index-out-of-bounds access
	net/smc: fix NULL sndbuf_desc in smc_cdc_tx_handler()
	qed/qed_dev: guard against a possible division by zero
	net: dsa: mt7530: remove now incorrect comment regarding port 5
	net: dsa: mt7530: set PLL frequency and trgmii only when trgmii is used
	block: do not reverse request order when flushing plug list
	loop: Fix use-after-free issues
	net: tunnels: annotate lockless accesses to dev->needed_headroom
	net: phy: smsc: bail out in lan87xx_read_status if genphy_read_status fails
	tcp: Fix bind() conflict check for dual-stack wildcard address.
	nfc: st-nci: Fix use after free bug in ndlc_remove due to race condition
	mlxsw: spectrum: Fix incorrect parsing depth after reload
	net/smc: fix deadlock triggered by cancel_delayed_work_syn()
	net: usb: smsc75xx: Limit packet length to skb->len
	drm/bridge: Fix returned array size name for atomic_get_input_bus_fmts kdoc
	powerpc/mm: Fix false detection of read faults
	block: null_blk: Fix handling of fake timeout request
	nvme: fix handling single range discard request
	nvmet: avoid potential UAF in nvmet_req_complete()
	block: sunvdc: add check for mdesc_grab() returning NULL
	net/mlx5e: Fix macsec ASO context alignment
	net/mlx5e: Don't cache tunnel offloads capability
	net/mlx5: Fix setting ec_function bit in MANAGE_PAGES
	net/mlx5: Disable eswitch before waiting for VF pages
	net/mlx5e: Support Geneve and GRE with VF tunnel offload
	net/mlx5: E-switch, Fix wrong usage of source port rewrite in split rules
	net/mlx5: E-switch, Fix missing set of split_count when forward to ovs internal port
	net/mlx5e: Fix cleanup null-ptr deref on encap lock
	net/mlx5: Set BREAK_FW_WAIT flag first when removing driver
	veth: Fix use after free in XDP_REDIRECT
	ice: xsk: disable txq irq before flushing hw
	net: dsa: don't error out when drivers return ETH_DATA_LEN in .port_max_mtu()
	net: dsa: mv88e6xxx: fix max_mtu of 1492 on 6165, 6191, 6220, 6250, 6290
	ravb: avoid PHY being resumed when interface is not up
	sh_eth: avoid PHY being resumed when interface is not up
	ipv4: Fix incorrect table ID in IOCTL path
	net: usb: smsc75xx: Move packet length check to prevent kernel panic in skb_pull
	net: atlantic: Fix crash when XDP is enabled but no program is loaded
	net/iucv: Fix size of interrupt data
	i825xx: sni_82596: use eth_hw_addr_set()
	selftests: net: devlink_port_split.py: skip test if no suitable device available
	qed/qed_mng_tlv: correctly zero out ->min instead of ->hour
	net: dsa: microchip: fix RGMII delay configuration on KSZ8765/KSZ8794/KSZ8795
	ethernet: sun: add check for the mdesc_grab()
	bonding: restore IFF_MASTER/SLAVE flags on bond enslave ether type change
	bonding: restore bond's IFF_SLAVE flag if a non-eth dev enslave fails
	hwmon: (adt7475) Display smoothing attributes in correct order
	hwmon: (adt7475) Fix masking of hysteresis registers
	hwmon: (xgene) Fix use after free bug in xgene_hwmon_remove due to race condition
	hwmon: (ina3221) return prober error code
	hwmon: (ucd90320) Add minimum delay between bus accesses
	hwmon: tmp512: drop of_match_ptr for ID table
	kconfig: Update config changed flag before calling callback
	hwmon: (adm1266) Set `can_sleep` flag for GPIO chip
	hwmon: (ltc2992) Set `can_sleep` flag for GPIO chip
	media: m5mols: fix off-by-one loop termination error
	mmc: atmel-mci: fix race between stop command and start of next command
	soc: mediatek: mtk-svs: keep svs alive if CONFIG_DEBUG_FS not supported
	jffs2: correct logic when creating a hole in jffs2_write_begin
	rust: arch/um: Disable FP/SIMD instruction to match x86
	ext4: fail ext4_iget if special inode unallocated
	ext4: update s_journal_inum if it changes after journal replay
	ext4: fix task hung in ext4_xattr_delete_inode
	drm/amdkfd: Fix an illegal memory access
	net/9p: fix bug in client create for .L
	LoongArch: Only call get_timer_irq() once in constant_clockevent_init()
	sh: intc: Avoid spurious sizeof-pointer-div warning
	drm/amdgpu: fix ttm_bo calltrace warning in psp_hw_fini
	drm/amd/display: fix shift-out-of-bounds in CalculateVMAndRowBytes
	ext4: fix possible double unlock when moving a directory
	Revert "tty: serial: fsl_lpuart: adjust SERIAL_FSL_LPUART_CONSOLE config dependency"
	tty: serial: fsl_lpuart: skip waiting for transmission complete when UARTCTRL_SBK is asserted
	serial: 8250_em: Fix UART port type
	serial: 8250_fsl: fix handle_irq locking
	serial: 8250: ASPEED_VUART: select REGMAP instead of depending on it
	firmware: xilinx: don't make a sleepable memory allocation from an atomic context
	memory: tegra: fix interconnect registration race
	memory: tegra20-emc: fix interconnect registration race
	memory: tegra124-emc: fix interconnect registration race
	memory: tegra30-emc: fix interconnect registration race
	drm/ttm: Fix a NULL pointer dereference
	s390/ipl: add missing intersection check to ipl_report handling
	interconnect: fix icc_provider_del() error handling
	interconnect: fix provider registration API
	interconnect: imx: fix registration race
	interconnect: fix mem leak when freeing nodes
	interconnect: qcom: osm-l3: fix registration race
	interconnect: qcom: rpm: fix probe child-node error handling
	interconnect: qcom: rpm: fix registration race
	interconnect: qcom: rpmh: fix probe child-node error handling
	interconnect: qcom: rpmh: fix registration race
	interconnect: qcom: msm8974: fix registration race
	interconnect: exynos: fix node leak in probe PM QoS error path
	interconnect: exynos: fix registration race
	md: select BLOCK_LEGACY_AUTOLOAD
	cifs: generate signkey for the channel that's reconnecting
	tracing: Make splice_read available again
	tracing: Check field value in hist_field_name()
	tracing: Make tracepoint lockdep check actually test something
	cifs: Fix smb2_set_path_size()
	KVM: SVM: Fix a benign off-by-one bug in AVIC physical table mask
	KVM: SVM: Modify AVIC GATag to support max number of 512 vCPUs
	KVM: nVMX: add missing consistency checks for CR0 and CR4
	ALSA: hda: intel-dsp-config: add MTL PCI id
	ALSA: hda/realtek: Fix the speaker output on Samsung Galaxy Book2 Pro
	ALSA: hda/realtek: fix speaker, mute/micmute LEDs not work on a HP platform
	Revert "riscv: mm: notify remote harts about mmu cache updates"
	riscv: asid: Fixup stale TLB entry cause application crash
	drm/shmem-helper: Remove another errant put in error path
	drm/sun4i: fix missing component unbind on bind errors
	drm/i915/active: Fix misuse of non-idle barriers as fence trackers
	drm/i915/dg2: Add HDMI pixel clock frequencies 267.30 and 319.89 MHz
	drm/amdgpu: Don't resume IOMMU after incomplete init
	drm/amd/pm: Fix sienna cichlid incorrect OD volage after resume
	drm/amd/pm: bump SMU 13.0.4 driver_if header version
	drm/amd/display: Do not set DRR on pipe Commit
	drm/amd/display: disconnect MPCC only on OTG change
	mptcp: fix possible deadlock in subflow_error_report
	mptcp: add ro_after_init for tcp{,v6}_prot_override
	mptcp: avoid setting TCP_CLOSE state twice
	mptcp: fix lockdep false positive in mptcp_pm_nl_create_listen_socket()
	ftrace: Fix invalid address access in lookup_rec() when index is 0
	ocfs2: fix data corruption after failed write
	nvme-pci: add NVME_QUIRK_BOGUS_NID for Netac NV3000
	ice: avoid bonding causing auxiliary plug/unplug under RTNL lock
	vp_vdpa: fix the crash in hot unplug with vp_vdpa
	mm/userfaultfd: propagate uffd-wp bit when PTE-mapping the huge zeropage
	mm: teach mincore_hugetlb about pte markers
	powerpc/64: Set default CPU in Kconfig
	powerpc/boot: Don't always pass -mcpu=powerpc when building 32-bit uImage
	mmc: sdhci_am654: lower power-on failed message severity
	fbdev: stifb: Provide valid pixelclock and add fb_check_var() checks
	trace/hwlat: Do not wipe the contents of per-cpu thread data
	trace/hwlat: Do not start per-cpu thread if it is already running
	ACPI: PPTT: Fix to avoid sleep in the atomic context when PPTT is absent
	net: phy: nxp-c45-tja11xx: fix MII_BASIC_CONFIG_REV bit
	fbdev: Fix incorrect page mapping clearance at fb_deferred_io_release()
	cpuidle: psci: Iterate backwards over list in psci_pd_remove()
	ASoC: Intel: soc-acpi: fix copy-paste issue in topology names
	ASoC: qcom: q6prm: fix incorrect clk_root passed to ADSP
	x86/mce: Make sure logged MCEs are processed after sysfs update
	x86/mm: Fix use of uninitialized buffer in sme_enable()
	x86/resctrl: Clear staged_config[] before and after it is used
	powerpc: Pass correct CPU reference to assembler
	virt/coco/sev-guest: Check SEV_SNP attribute at probe time
	virt/coco/sev-guest: Simplify extended guest request handling
	virt/coco/sev-guest: Remove the disable_vmpck label in handle_guest_request()
	virt/coco/sev-guest: Carve out the request issuing logic into a helper
	virt/coco/sev-guest: Do some code style cleanups
	virt/coco/sev-guest: Convert the sw_exit_info_2 checking to a switch-case
	virt/coco/sev-guest: Add throttling awareness
	io_uring/msg_ring: let target know allocated index
	perf: Fix check before add_event_to_groups() in perf_group_detach()
	powerpc: Disable CPU unknown by CLANG when CC_IS_CLANG
	powerpc/64: Replace -mcpu=e500mc64 by -mcpu=e5500
	Linux 6.1.21

Change-Id: I4b7f6e01381c0c121c9e89e51071ea60f1f7e29a
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2023-03-24 08:47:17 +00:00
Vijayanand Jitta
a7bb928033 ANDROID: mm: add get_page_owner_handle function
Add and export get_page_owner_handle function which returns
the handle for the corresponding page_ext, this will be used
by the minidump module to get page_owner info.

Bug: 199236943
Change-Id: I7b3641f7c6ad918f4111c98d715904477f92185b
Signed-off-by: Vijayanand Jitta <vjitta@codeaurora.org>
Signed-off-by: Jaskaran Singh <quic_jasksing@quicinc.com>
2023-03-23 18:21:23 +00:00
Vijayanand Jitta
97b7d85866 ANDROID: mm: add get_each_object_track function
Add and export get_each_object_track which helps in
looping through all the slab objects of a page
and gets the track structure of each object, also
make track_item and track structure public, these
will be used by the minidump module to get slab
owner info. Includes commit 0e00d7c46b36 ("ANDROID:
mm/slub: Fix Kasan issue with for_each_object_track")
from android13-5.15 as a bug fix.

Bug: 199236943
Change-Id: Id9922b57053be277f8042ad8199fbbf9faa984ef
Signed-off-by: Vijayanand Jitta <vjitta@codeaurora.org>
Signed-off-by: Jaskaran Singh <quic_jasksing@quicinc.com>
2023-03-23 18:21:15 +00:00
Vijayanand Jitta
173c09996a ANDROID: mm: Export get_slabinfo
Export get_slabinfo symbol for minidump module.

Bug: 199236943
Change-Id: I01870a370da9bf5db842ff14801d94ef79350560
Signed-off-by: Vijayanand Jitta <vjitta@codeaurora.org>
Signed-off-by: Jaskaran Singh <quic_jasksing@quicinc.com>
2023-03-23 18:21:07 +00:00
Jaskaran Singh
a9104d3210 ANDROID: mm: Export page_ext_[get|put]
Export page_ext_get and page_ext_put for minidump.

Bug: 199236943
Change-Id: I63a9562ef2ea0ee4c2e7d6497b1424ceba9267eb
Signed-off-by: Jaskaran Singh <quic_jasksing@quicinc.com>
2023-03-23 18:20:59 +00:00
Vijayanand Jitta
a47a1cfd59 ANDROID: mm: Export si_swapinfo
Export si_swapinfo symbol which is used as part
of meminfo collection from minidump module.

Bug: 199236943
Change-Id: I5dc1672ce649c22dc33d4a544ee5a38f8376becf
Signed-off-by: Vijayanand Jitta <vjitta@codeaurora.org>
Signed-off-by: Jaskaran Singh <quic_jasksing@quicinc.com>
2023-03-23 18:20:34 +00:00
Vijayanand Jitta
43aae34811 ANDROID: mm: Export vmalloc_nr_pages
Export vmalloc_nr_pages which is used as part
of meminfo collection from minidump module.

Bug: 199236943
Change-Id: I4c80fe2a0712658ec46b49064fda670da84b3732
Signed-off-by: Vijayanand Jitta <quic_vjitta@quicinc.com>
Signed-off-by: Jaskaran Singh <quic_jasksing@quicinc.com>
2023-03-23 18:20:34 +00:00
Vijayanand Jitta
acea5c5e2f ANDROID: mm: Export pcpu_nr_pages
Export pcpu_nr_pages symbol which is used as part
of meminfo collection from minidump module.

Bug: 199236943
Change-Id: I08262ec95a3f1be8322b9b8d2d9c4098518fc408
Signed-off-by: Vijayanand Jitta <quic_vjitta@quicinc.com>
Signed-off-by: Jaskaran Singh <quic_jasksing@quicinc.com>
2023-03-23 18:20:34 +00:00
Vijayanand Jitta
358f859c30 ANDROID: dma-buf: add dma_buf_get_each function
Add and export dma_buf_get_each function which helps in
traversing the db_list, this will be used by the minidump
module to get dmabuf info.

Bug: 267250898
Change-Id: Ie24788fcf9cf0a49316cb871dcb9191e8084ccde
Signed-off-by: Vijayanand Jitta <vjitta@codeaurora.org>
(cherry picked from commit 602e4e28d89ca9c8295a904b16f4f3caeda80b7e)
[Yunfei: Change namespace get_each_dmabuf to dma_buf_get_each]
Signed-off-by: Yunfei Wang <yf.wang@mediatek.com>
Signed-off-by: Jaskaran Singh <quic_jasksing@quicinc.com>
2023-03-23 18:20:34 +00:00
Guru Das Srinagesh
0522dbb348 ANDROID: abi_gki_aarch64_qcom: Update symbol list
Add the following symbols:

Symbols added:
   _find_first_and_bit
   __traceiter_irq_handler_entry
   __tracepoint_irq_handler_entry

Bug: 274750323
Change-Id: If9730ee77104c53fbc35dfda2fda6f7eab275da0
Signed-off-by: Guru Das Srinagesh <quic_gurus@quicinc.com>
2023-03-23 15:40:44 +00:00
Greg Kroah-Hartman
a46427da95 Revert "HID: core: Provide new max_buffer_size attribute to over-ride the default"
This reverts commit 5a144cfe35 which is
commit b1a37ed00d7908a991c1d0f18a8cba3c2aa99bdc upstream.

It breaks the Android KABI and if needed, should come back in an
abi-safe way.

Bug: 161946584
Cc: Lee Jones <joneslee@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I1f160797720e8bdf4960542e711fd17940a975d9
2023-03-23 08:26:38 +00:00
Greg Kroah-Hartman
204ba8dd68 Revert "HID: uhid: Over-ride the default maximum data buffer value with our own"
This reverts commit 4cd8ffa488 which is
commit 1c5d4221240a233df2440fe75c881465cdf8da07 upstream.

It breaks the Android KABI and if needed, should come back in an
abi-safe way.

Bug: 161946584
Cc: Lee Jones <joneslee@google.com>
Change-Id: I9a460d9dbc41512ee71ff607e875f2da9be7f9f6
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2023-03-23 08:25:22 +00:00
Greg Kroah-Hartman
a22c3a8790 Merge 6.1.20 into android14-6.1
Changes in 6.1.20
	fs: prevent out-of-bounds array speculation when closing a file descriptor
	btrfs: fix unnecessary increment of read error stat on write error
	btrfs: fix percent calculation for bg reclaim message
	io_uring/uring_cmd: ensure that device supports IOPOLL
	erofs: fix wrong kunmap when using LZMA on HIGHMEM platforms
	perf inject: Fix --buildid-all not to eat up MMAP2
	fork: allow CLONE_NEWTIME in clone3 flags
	RISC-V: Stop emitting attributes
	x86/CPU/AMD: Disable XSAVES on AMD family 0x17
	drm/amdgpu: fix error checking in amdgpu_read_mm_registers for soc15
	drm/amdgpu: fix error checking in amdgpu_read_mm_registers for soc21
	drm/amdgpu: fix error checking in amdgpu_read_mm_registers for nv
	drm/display: Don't block HDR_OUTPUT_METADATA on unknown EOTF
	drm/connector: print max_requested_bpc in state debugfs
	staging: rtl8723bs: Fix key-store index handling
	staging: rtl8723bs: Pass correct parameters to cfg80211_get_bss()
	ext4: fix cgroup writeback accounting with fs-layer encryption
	ext4: fix RENAME_WHITEOUT handling for inline directories
	ext4: fix another off-by-one fsmap error on 1k block filesystems
	ext4: move where set the MAY_INLINE_DATA flag is set
	ext4: fix WARNING in ext4_update_inline_data
	ext4: zero i_disksize when initializing the bootloader inode
	HID: core: Provide new max_buffer_size attribute to over-ride the default
	HID: uhid: Over-ride the default maximum data buffer value with our own
	nfc: change order inside nfc_se_io error path
	KVM: VMX: Reset eVMCS controls in VP assist page during hardware disabling
	KVM: VMX: Don't bother disabling eVMCS static key on module exit
	KVM: x86: Move guts of kvm_arch_init() to standalone helper
	KVM: VMX: Do _all_ initialization before exposing /dev/kvm to userspace
	fs: dlm: fix log of lowcomms vs midcomms
	fs: dlm: add midcomms init/start functions
	fs: dlm: start midcomms before scand
	fs: dlm: remove send repeat remove handling
	fs: dlm: use packet in dlm_mhandle
	fd: dlm: trace send/recv of dlm message and rcom
	fs: dlm: fix use after free in midcomms commit
	fs: dlm: use WARN_ON_ONCE() instead of WARN_ON()
	fs: dlm: be sure to call dlm_send_queue_flush()
	fs: dlm: fix race setting stop tx flag
	udf: Fix off-by-one error when discarding preallocation
	bus: mhi: ep: Power up/down MHI stack during MHI RESET
	bus: mhi: ep: Change state_lock to mutex
	Input: exc3000 - properly stop timer on shutdown
	ipmi:ssif: Remove rtc_us_timer
	ipmi:ssif: Increase the message retry time
	ipmi:ssif: Add a timer between request retries
	spi: intel: Check number of chip selects after reading the descriptor
	drm/i915: Introduce intel_panel_init_alloc()
	drm/i915: Do panel VBT init early if the VBT declares an explicit panel type
	drm/i915: Populate encoder->devdata for DSI on icl+
	block: Revert "block: Do not reread partition table on exclusively open device"
	block: fix scan partition for exclusively open device again
	riscv: Add header include guards to insn.h
	scsi: core: Remove the /proc/scsi/${proc_name} directory earlier
	ext4: Fix possible corruption when moving a directory
	cifs: improve checking of DFS links over STATUS_OBJECT_NAME_INVALID
	drm/nouveau/kms/nv50: fix nv50_wndw_new_ prototype
	drm/msm: Fix potential invalid ptr free
	drm/msm/a5xx: fix setting of the CP_PREEMPT_ENABLE_LOCAL register
	drm/msm/a5xx: fix highest bank bit for a530
	drm/msm/a5xx: fix the emptyness check in the preempt code
	drm/msm/a5xx: fix context faults during ring switch
	bgmac: fix *initial* chip reset to support BCM5358
	nfc: fdp: add null check of devm_kmalloc_array in fdp_nci_i2c_read_device_properties
	powerpc: dts: t1040rdb: fix compatible string for Rev A boards
	tls: rx: fix return value for async crypto
	drm/msm/dpu: disable features unsupported by QCM2290
	ila: do not generate empty messages in ila_xlat_nl_cmd_get_mapping()
	net: lan966x: Fix port police support using tc-matchall
	selftests: nft_nat: ensuring the listening side is up before starting the client
	netfilter: nft_last: copy content when cloning expression
	netfilter: nft_quota: copy content when cloning expression
	net: tls: fix possible race condition between do_tls_getsockopt_conf() and do_tls_setsockopt_conf()
	net: use indirect calls helpers for sk_exit_memory_pressure()
	perf stat: Fix counting when initial delay configured
	net: lan78xx: fix accessing the LAN7800's internal phy specific registers from the MAC driver
	net: caif: Fix use-after-free in cfusbl_device_notify()
	ice: copy last block omitted in ice_get_module_eeprom()
	bpf, sockmap: Fix an infinite loop error when len is 0 in tcp_bpf_recvmsg_parser()
	drm/msm/dpu: fix len of sc7180 ctl blocks
	drm/msm/dpu: drop DPU_DIM_LAYER from MIXER_MSM8998_MASK
	drm/msm/dpu: fix clocks settings for msm8998 SSPP blocks
	drm/msm/dpu: clear DSPP reservations in rm release
	net: stmmac: add to set device wake up flag when stmmac init phy
	net: phylib: get rid of unnecessary locking
	bnxt_en: Avoid order-5 memory allocation for TPA data
	netfilter: ctnetlink: revert to dumping mark regardless of event type
	netfilter: tproxy: fix deadlock due to missing BH disable
	m68k: mm: Move initrd phys_to_virt handling after paging_init()
	btrfs: fix extent map logging bit not cleared for split maps after dropping range
	bpf, test_run: fix &xdp_frame misplacement for LIVE_FRAMES
	btf: fix resolving BTF_KIND_VAR after ARRAY, STRUCT, UNION, PTR
	net: phy: smsc: fix link up detection in forced irq mode
	net: ethernet: mtk_eth_soc: fix RX data corruption issue
	net: tls: fix device-offloaded sendpage straddling records
	scsi: megaraid_sas: Update max supported LD IDs to 240
	scsi: sd: Fix wrong zone_write_granularity value during revalidate
	netfilter: conntrack: adopt safer max chain length
	platform: mellanox: select REGMAP instead of depending on it
	platform: x86: MLX_PLATFORM: select REGMAP instead of depending on it
	block: fix wrong mode for blkdev_put() from disk_scan_partitions()
	NFSD: Protect against filesystem freezing
	ice: Fix DSCP PFC TLV creation
	ethernet: ice: avoid gcc-9 integer overflow warning
	net/smc: fix fallback failed while sendmsg with fastopen
	octeontx2-af: Unlock contexts in the queue context cache in case of fault detection
	SUNRPC: Fix a server shutdown leak
	net: dsa: mt7530: permit port 5 to work without port 6 on MT7621 SoC
	af_unix: fix struct pid leaks in OOB support
	erofs: Revert "erofs: fix kvcalloc() misuse with __GFP_NOFAIL"
	riscv: Use READ_ONCE_NOCHECK in imprecise unwinding stack mode
	RISC-V: Don't check text_mutex during stop_machine
	drm/amdgpu: fix return value check in kfd
	ext4: Fix deadlock during directory rename
	drm/amdgpu/soc21: don't expose AV1 if VCN0 is harvested
	drm/amdgpu/soc21: Add video cap query support for VCN_4_0_4
	adreno: Shutdown the GPU properly
	drm/msm/adreno: fix runtime PM imbalance at unbind
	watch_queue: fix IOC_WATCH_QUEUE_SET_SIZE alloc error paths
	tpm/eventlog: Don't abort tpm_read_log on faulty ACPI address
	MIPS: Fix a compilation issue
	powerpc/64: Don't recurse irq replay
	powerpc/iommu: fix memory leak with using debugfs_lookup()
	clk: renesas: rcar-gen3: Disable R-Car H3 ES1.*
	powerpc/bpf/32: Only set a stack frame when necessary
	powerpc/64: Fix task_cpu in early boot when booting non-zero cpuid
	powerpc/64: Move paca allocation to early_setup()
	powerpc/kcsan: Exclude udelay to prevent recursive instrumentation
	alpha: fix R_ALPHA_LITERAL reloc for large modules
	macintosh: windfarm: Use unsigned type for 1-bit bitfields
	PCI: Add SolidRun vendor ID
	scripts: handle BrokenPipeError for python scripts
	media: ov5640: Fix analogue gain control
	media: rc: gpio-ir-recv: add remove function
	drm/amd/display: Allow subvp on vactive pipes that are 2560x1440@60
	drm/amd/display: adjust MALL size available for DCN32 and DCN321
	filelocks: use mount idmapping for setlease permission check
	Revert "bpf, test_run: fix &xdp_frame misplacement for LIVE_FRAMES"
	UML: define RUNTIME_DISCARD_EXIT
	Linux 6.1.20

Change-Id: I2f92629ce02bc07295fea17b16f9bb567916a285
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2023-03-23 08:23:43 +00:00
Guru Das Srinagesh
b1add0ad90 ANDROID: abi_gki_aarch64_qcom: Sort list
Sort the list correctly.

Symbols sorted:
   bpf_trace_run1
   ieee80211_tx_status
   memset
   nla_put
   nla_reserve

Bug: 274758523
Change-Id: I95191d6113fcb75b27c83764ba3eda72f5866c72
Signed-off-by: Guru Das Srinagesh <quic_gurus@quicinc.com>
2023-03-22 11:15:03 -07:00
Patrick Daly
6bf3324ebd ANDROID: of: of_reserved_mem: Increase limit for reserved_mem regions
The reserved_mem array must be statically allocated because it is used
prior to memblock being aware of all "no-map" or otherwise reserved
regions which have fixed physical addresses. Due to this limitation,
if one architecture/board has a large number of reserved_mem regions,
this limit must be raised for all.

In particular, certain new qcom boards currently have 63 reserved memory
regions, which when new features are added, pushes them over the existing
limit of 64.

A generalized breakdown by region type:
13 for linux-loaded device firmware
9 for guest-vms or inter-vm communication
15 cma heaps/dma-buf heaps
24 for bootloaders/hypervisor/secure-world devices or software
2 misc

Although this number could be reduced by a minor amount by combining
physically adjacent regions, this comes at the cost of losing
documention on what/who the regions are used by. In addition, combining
adjacent regions is not possible if there are phandles in devicetree
refering to the regions in question, such as "memory-region".

Vmlinux size before:
text      data      bss     dec       hex      filename
31030829  15807732  588524  47427085  2d3ae0d  dist/vmlinux

text      data      bss     dec       hex      filename
31030877  15807668  592108  47430653  2d3bbfd  dist/vmlinux

Bug: 229767760
Link: https://lore.kernel.org/linux-devicetree/1650488954-26662-1-git-send-email-quic_pdaly@quicinc.com/T/#u
Change-Id: I2bdc6ad1ecfe273aad3c72390283b6d1247b18c3
Signed-off-by: Patrick Daly <quic_pdaly@quicinc.com>
Signed-off-by: Sukadev Bhattiprolu <quic_sukadev@quicinc.com>
(cherry picked from commit 63d1aaef5982744d17575435381e96795f806b0f)
2023-03-22 14:27:16 +00:00
Treehugger Robot
efa2b2fcf5 Merge "Merge 6.1.19 into android14-6.1" into android14-6.1 2023-03-22 13:16:37 +00:00
Greg Kroah-Hartman
e3a87a10f2 Linux 6.1.21
Link: https://lore.kernel.org/r/20230320145507.420176832@linuxfoundation.org
Tested-by: Chris Paterson (CIP) <chris.paterson2@renesas.com>
Tested-by: Florian Fainelli <f.fainelli@gmail.com>
Tested-by: Shuah Khan <skhan@linuxfoundation.org>
Tested-by: Bagas Sanjaya <bagasdotme@gmail.com>
Tested-by: Conor Dooley <conor.dooley@microchip.com>
Tested-by: Jon Hunter <jonathanh@nvidia.com>
Link: https://lore.kernel.org/r/20230321080705.245176209@linuxfoundation.org
Tested-by: Takeshi Ogasawara <takeshi.ogasawara@futuring-girl.com>
Tested-by: Rudi Heitbaum <rudi@heitbaum.com>
Tested-by: Markus Reichelt <lkt+2023@mareichelt.com>
Tested-by: Slade Watkins <srw@sladewatkins.net>
Link: https://lore.kernel.org/r/20230321180747.474321236@linuxfoundation.org
Tested-by: Florian Fainelli <f.fainelli@gmail.com>
Tested-by: Ron Economos <re@w6rz.net>
Tested-by: Takeshi Ogasawara <takeshi.ogasawara@futuring-girl.com>
Tested-by: Bagas Sanjaya <bagasdotme@gmail.com>
Tested-by: Chris Paterson (CIP) <chris.paterson2@renesas.com>
Tested-by: Linux Kernel Functional Testing <lkft@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-03-22 13:34:07 +01:00
Christophe Leroy
7f4da237af powerpc/64: Replace -mcpu=e500mc64 by -mcpu=e5500
commit 77e82fa1f9781a958a6ea4aed7aec41239a5a22f upstream.

E500MC64 is a processor pre-dating E5500 that has never been
commercialised. Use -mcpu=e5500 for E5500 core.

More details at https://gcc.gnu.org/PR108149

Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Acked-by: Pali Rohár <pali@kernel.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/fa71ed20d22c156225436374f0ab847daac893bc.1671475543.git.christophe.leroy@csgroup.eu
Cc: Naresh Kamboju <naresh.kamboju@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-03-22 13:34:07 +01:00
Christophe Leroy
6ec2eb9db3 powerpc: Disable CPU unknown by CLANG when CC_IS_CLANG
commit 4b10306e98456aed03cad75ce467e8b1efdccca0 upstream.

CLANG only knows the following CPUs:

generic, 440, 450, 601, 602, 603, 603e, 603ev, 604, 604e, 620, 630,
g3, 7400, g4, 7450, g4+, 750, 8548, 970, g5, a2, e500, e500mc, e5500,
power3, pwr3, power4, pwr4, power5, pwr5, power5x, pwr5x, power6,
pwr6, power6x, pwr6x, power7, pwr7, power8, pwr8, power9, pwr9,
power10, pwr10, powerpc, ppc, ppc32, powerpc64, ppc64, powerpc64le,
ppc64le, futur

Disable other ones when CC_IS_CLANG.

Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/e62892e32c14a7a5738c597e39e0082cb0abf21c.1675335659.git.christophe.leroy@csgroup.eu
Cc: Nick Desaulniers <ndesaulniers@google.com>
Cc: Naresh Kamboju <naresh.kamboju@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-03-22 13:34:06 +01:00
Budimir Markovic
529546ea28 perf: Fix check before add_event_to_groups() in perf_group_detach()
commit fd0815f632c24878e325821943edccc7fde947a2 upstream.

Events should only be added to a groups rb tree if they have not been
removed from their context by list_del_event(). Since remove_on_exec
made it possible to call list_del_event() on individual events before
they are detached from their group, perf_group_detach() should check each
sibling's attach_state before calling add_event_to_groups() on it.

Fixes: 2e498d0a74 ("perf: Add support for event removal on exec")
Signed-off-by: Budimir Markovic <markovicbudimir@gmail.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lkml.kernel.org/r/ZBFzvQV9tEqoHEtH@gentoo
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-03-22 13:34:06 +01:00
Pavel Begunkov
36773a78b0 io_uring/msg_ring: let target know allocated index
commit 5da28edd7bd5518f97175ecea77615bb729a7a28 upstream.

msg_ring requests transferring files support auto index selection via
IORING_FILE_INDEX_ALLOC, however they don't return the selected index
to the target ring and there is no other good way for the userspace to
know where is the receieved file.

Return the index for allocated slots and 0 otherwise, which is
consistent with other fixed file installing requests.

Cc: stable@vger.kernel.org # v6.0+
Fixes: e6130eba8a ("io_uring: add support for passing fixed file descriptors")
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Link: https://github.com/axboe/liburing/issues/809
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-03-22 13:34:06 +01:00
Dionna Glaze
ba4045cc7d virt/coco/sev-guest: Add throttling awareness
commit 72f7754dcf31c87c92c0c353dcf747814cc5ce10 upstream.

A potentially malicious SEV guest can constantly hammer the hypervisor
using this driver to send down requests and thus prevent or at least
considerably hinder other guests from issuing requests to the secure
processor which is a shared platform resource.

Therefore, the host is permitted and encouraged to throttle such guest
requests.

Add the capability to handle the case when the hypervisor throttles
excessive numbers of requests issued by the guest. Otherwise, the VM
platform communication key will be disabled, preventing the guest from
attesting itself.

Realistically speaking, a well-behaved guest should not even care about
throttling. During its lifetime, it would end up issuing a handful of
requests which the hardware can easily handle.

This is more to address the case of a malicious guest. Such guest should
get throttled and if its VMPCK gets disabled, then that's its own
wrongdoing and perhaps that guest even deserves it.

To the implementation: the hypervisor signals with SNP_GUEST_REQ_ERR_BUSY
that the guest requests should be throttled. That error code is returned
in the upper 32-bit half of exitinfo2 and this is part of the GHCB spec
v2.

So the guest is given a throttling period of 1 minute in which it
retries the request every 2 seconds. This is a good default but if it
turns out to not pan out in practice, it can be tweaked later.

For safety, since the encryption algorithm in GHCBv2 is AES_GCM, control
must remain in the kernel to complete the request with the current
sequence number. Returning without finishing the request allows the
guest to make another request but with different message contents. This
is IV reuse, and breaks cryptographic protections.

  [ bp:
    - Rewrite commit message and do a simplified version.
    - The stable tags are supposed to denote that a cleanup should go
      upfront before backporting this so that any future fixes to this
      can preserve the sanity of the backporter(s). ]

Fixes: d5af44dde5 ("x86/sev: Provide support for SNP guest request NAEs")
Signed-off-by: Dionna Glaze <dionnaglaze@google.com>
Co-developed-by: Borislav Petkov (AMD) <bp@alien8.de>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Reviewed-by: Tom Lendacky <thomas.lendacky@amd.com>
Cc: <stable@kernel.org> # d6fd48eff750 ("virt/coco/sev-guest: Check SEV_SNP attribute at probe time")
Cc: <stable@kernel.org> # 970ab823743f (" virt/coco/sev-guest: Simplify extended guest request handling")
Cc: <stable@kernel.org> # c5a338274bdb ("virt/coco/sev-guest: Remove the disable_vmpck label in handle_guest_request()")
Cc: <stable@kernel.org> # 0fdb6cc7c89c ("virt/coco/sev-guest: Carve out the request issuing logic into a helper")
Cc: <stable@kernel.org> # d25bae7dc7b0 ("virt/coco/sev-guest: Do some code style cleanups")
Cc: <stable@kernel.org> # fa4ae42cc60a ("virt/coco/sev-guest: Convert the sw_exit_info_2 checking to a switch-case")
Link: https://lore.kernel.org/r/20230214164638.1189804-2-dionnaglaze@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-03-22 13:34:06 +01:00
Borislav Petkov (AMD)
917f217254 virt/coco/sev-guest: Convert the sw_exit_info_2 checking to a switch-case
commit fa4ae42cc60a7dea30e8f2db444b808d80862345 upstream.

snp_issue_guest_request() checks the value returned by the hypervisor in
sw_exit_info_2 and returns a different error depending on it.

Convert those checks into a switch-case to make it more readable when
more error values are going to be checked in the future.

No functional changes.

Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Reviewed-by: Tom Lendacky <thomas.lendacky@amd.com>
Link: https://lore.kernel.org/r/20230307192449.24732-8-bp@alien8.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-03-22 13:34:06 +01:00