Commit Graph

1068142 Commits

Author SHA1 Message Date
Zheng Liang
5925446e48 UPSTREAM: block, bfq: fix UAF problem in bfqg_stats_init()
In bfq_pd_alloc(), the function bfqg_stats_init() init bfqg. If
blkg_rwstat_init() init bfqg_stats->bytes successful and init
bfqg_stats->ios failed, bfqg_stats_init() return failed, bfqg will
be freed. But blkg_rwstat->cpu_cnt is not deleted from the list of
percpu_counters. If we traverse the list of percpu_counters, It will
have UAF problem.

we should use blkg_rwstat_exit() to cleanup bfqg_stats bytes in the
above scenario.

Fixes: commit fd41e60331 ("bfq-iosched: stop using blkg->stat_bytes and ->stat_ios")
Change-Id: I133bae6a318a8ddc4f10a8ee8e63595a1219ea1e
Signed-off-by: Zheng Liang <zhengliang6@huawei.com>
Acked-by: Tejun Heo <tj@kernel.org>
Link: https://lore.kernel.org/r/20211018024225.1493938-1-zhengliang6@huawei.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
(cherry picked from commit 2fc428f6b7)
Signed-off-by: Bart Van Assche <bvanassche@google.com>
2023-05-19 23:13:26 +00:00
Varad Gokhale
87c5ca81c3 ANDROID: Update the ABI symbol list
Adding the following symbols:
 - i3c_driver_unregister
 - i3c_driver_register_with_owner
 - i3c_device_do_priv_xfers

Bug: 283490069

Change-Id: I5e000dcbadfd23e69f07e189556576bd2cf08e4f
Signed-off-by: Varad Gokhale <gokv@google.com>
2023-05-19 19:53:18 +00:00
Thierry Strudel
7c5cae80c9 ANDROID: power: wakeup_reason: change abort log
Logging callback symbolic name is generating too many different
messages making Abort analysis miss big trends.
Stick to console reported message providing sufficient information.

Bug: 280678242
Signed-off-by: Thierry Strudel <tstrudel@google.com>
(cherry picked from https://android-review.googlesource.com/q/commit:9f8f2ea03ede21d8928793c4be87eeb76d81bc7f)
Merged-In: Ic0ea662a60919454060e3a085aeabd8a4099e0b4
Change-Id: Ic0ea662a60919454060e3a085aeabd8a4099e0b4
2023-05-19 06:56:57 +00:00
Mark Brown
d3197e212f UPSTREAM: regmap: Don't warn about cache only mode for devices with no cache
For devices with no cache it can make sense to use cache only mode as a
mechanism for trapping writes to hardware which is inaccessible but since
no cache is equivalent to cache bypass we force such devices into bypass
mode. This means that our check that bypass and cache only mode aren't both
enabled simultanously is less sensible for devices without a cache so relax
it.

Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20220622171723.1235749-1-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>

Bug: 274730214
Change-Id: I85f9ba5343f28b24c2b0588e8a1487d31b654283
(cherry picked from commit 3d0afe9cf1)
Signed-off-by: Chunyan Zhang <chunyan.zhang@unisoc.com>
(cherry picked from commit b099f1eb0b330487fcc77e8a991919608fd07189)
2023-05-18 22:41:13 +00:00
Chris Lu
f0371f5dad ANDROID: Update the ABI symbol list
Adding the following symbols:
  - thermal_zone_get_zone_by_name

Bug: 269389888
Change-Id: I5f06af2b802f36369f2392320a7fe17e16fc406c
Signed-off-by: Chris Lu <luchris@google.com>
2023-05-18 21:54:18 +00:00
Theodore Ts'o
aa0deedfe1 UPSTREAM: ext4: fix invalid free tracking in ext4_xattr_move_to_block()
commit b87c7cdf2b upstream.

In ext4_xattr_move_to_block(), the value of the extended attribute
which we need to move to an external block may be allocated by
kvmalloc() if the value is stored in an external inode.  So at the end
of the function the code tried to check if this was the case by
testing entry->e_value_inum.

However, at this point, the pointer to the xattr entry is no longer
valid, because it was removed from the original location where it had
been stored.  So we could end up calling kvfree() on a pointer which
was not allocated by kvmalloc(); or we could also potentially leak
memory by not freeing the buffer when it should be freed.  Fix this by
storing whether it should be freed in a separate variable.

Cc: stable@kernel.org
Link: https://lore.kernel.org/r/20230430160426.581366-1-tytso@mit.edu
Link: https://syzkaller.appspot.com/bug?id=5c2aee8256e30b55ccf57312c16d88417adbd5e1
Link: https://syzkaller.appspot.com/bug?id=41a6b5d4917c0412eb3b3c3c604965bed7d7420b
Reported-by: syzbot+64b645917ce07d89bde5@syzkaller.appspotmail.com
Reported-by: syzbot+0d042627c4f2ad332195@syzkaller.appspotmail.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Bug: 281332515
Bug: 281333738
Change-Id: Id1fbcc337821d66df53c2826bf3158963f8b0673
Signed-off-by: Tudor Ambarus <tudor.ambarus@linaro.org>
2023-05-18 21:47:21 +00:00
wang qiankun
fb96bf701a ANDROID: GKI: add ABI symbol list for xiaomi
INFO: ABI DIFFERENCES HAVE BEEN DETECTED!
INFO: 19 function symbol(s) added
  'int __traceiter_android_rvh_after_dequeue_task(void*, struct rq*, struct task_struct*, int)'
  'int __traceiter_android_rvh_after_enqueue_task(void*, struct rq*, struct task_struct*, int)'
  'int __traceiter_android_rvh_cpuset_fork(void*, struct task_struct*, bool*)'
  'int __traceiter_android_rvh_entity_tick(void*, struct cfs_rq*, struct sched_entity*)'
  'int __traceiter_android_rvh_refrigerator(void*, bool)'
  'int __traceiter_android_rvh_set_cpus_allowed_comm(void*, struct task_struct*, const struct cpumask*)'
  'int __traceiter_android_vh_binder_alloc_new_buf_locked(void*, size_t, size_t*, int)'
  'int __traceiter_android_vh_binder_reply(void*, struct binder_proc*, struct binder_proc*, struct binder_thread*, str
uct binder_transaction_data*)'
  'int __traceiter_android_vh_binder_trans(void*, struct binder_proc*, struct binder_proc*, struct binder_thread*, str
uct binder_transaction_data*)'
  'int __traceiter_android_vh_freq_qos_add_request(void*, struct freq_constraints*, struct freq_qos_request*, enum fre
q_qos_req_type, int, int)'
  'int __traceiter_android_vh_freq_qos_remove_request(void*, struct freq_qos_request*)'
  'int __traceiter_android_vh_freq_qos_update_request(void*, struct freq_qos_request*, int)'
  'int __traceiter_android_vh_map_util_freq(void*, unsigned long, unsigned long, unsigned long, unsigned long*)'
  'int __traceiter_android_vh_rwsem_read_wait_start(void*, struct rw_semaphore*)'
  'int __traceiter_android_vh_rwsem_write_wait_start(void*, struct rw_semaphore*)'
  'int __traceiter_android_vh_sched_setaffinity_early(void*, struct task_struct*, const struct cpumask*, bool*)'
  'void cpuset_cpus_allowed(struct task_struct*, struct cpumask*)'
  'struct user_struct* find_user(kuid_t)'
  'void free_uid(struct user_struct*)'

17 variable symbol(s) added
  'struct tracepoint __tracepoint_android_rvh_after_dequeue_task'
  'struct tracepoint __tracepoint_android_rvh_after_enqueue_task'
  'struct tracepoint __tracepoint_android_rvh_cpuset_fork'
  'struct tracepoint __tracepoint_android_rvh_entity_tick'
  'struct tracepoint __tracepoint_android_rvh_refrigerator'
  'struct tracepoint __tracepoint_android_rvh_set_cpus_allowed_comm'
  'struct tracepoint __tracepoint_android_vh_binder_alloc_new_buf_locked'
  'struct tracepoint __tracepoint_android_vh_binder_reply'
  'struct tracepoint __tracepoint_android_vh_binder_trans'
  'struct tracepoint __tracepoint_android_vh_freq_qos_add_request'
  'struct tracepoint __tracepoint_android_vh_freq_qos_remove_request'
  'struct tracepoint __tracepoint_android_vh_freq_qos_update_request'
  'struct tracepoint __tracepoint_android_vh_map_util_freq'
  'struct tracepoint __tracepoint_android_vh_rwsem_read_wait_start'
  'struct tracepoint __tracepoint_android_vh_rwsem_write_wait_start'
  'struct tracepoint __tracepoint_android_vh_sched_setaffinity_early'
  'struct cgroup_subsys freezer_cgrp_subsys'

function symbol 'struct block_device* I_BDEV(struct inode*)' changed
  CRC changed from 0x5b8d1e5 to 0x5c732fed

function symbol 'void* PDE_DATA(const struct inode*)' changed
  CRC changed from 0x3c36f860 to 0x782fda7f

function symbol 'void __ClearPageMovable(struct page*)' changed
  CRC changed from 0x12b3b0b6 to 0xdf0d01db

... 3467 omitted; 3470 symbols have only CRC changes

type 'struct user_struct' changed
  byte size changed from 152 to 168
  member 'u64 android_oem_data1[2]' was added

Bug: 283222331

Change-Id: Iaefe36e430f2829fbc26e26cf93f621fd49e9b24
Signed-off-by: wang qiankun <wangqiankun3@xiaomi.com>
2023-05-18 17:58:04 +00:00
lijianzhong
0f5abf2375 ANDROID: sched: Add ANDROID_OEM_DATA_ARRAY in user_struct.
Add ANDROID_OEM_DATA_ARRAY to the struct user so that we can record the necessary data to implement the OEM's scheduling policy.

Bug: 183674818
Bug: 283222331

Signed-off-by: lijianzhong <lijianzhong@xiaomi.com>
Change-Id: I418293391bc62a68207eae51a79bd45a7f6cd2ed
(cherry picked from commit 77e791866b)
2023-05-18 13:30:37 +00:00
heshuai1
ca57d52a21 ANDROID: user: Add vendor hook to user for GKI purpose
In order to implement our scheduling tuning policy in certain cases, we need to initialize the variables that we have defined in the user_struct. To achieve this, we will add a vendor hook to user.c at alloc_uid, which will ensure that our own logic is executed during the initialization of the user_struct.

Bug: 187458531
Bug: 283222331

Signed-off-by: heshuai1 <heshuai1@xiaomi.com>
Change-Id: I078484aac2c3d396aba5971d6d0f491652f3781c
(cherry picked from commit c9b8fa644f)
(cherry picked from commit 9ac0923ef565e4de4e1f35edcba6fcb7e45948c9)
2023-05-18 13:30:37 +00:00
lijianzhong
dc3f95c564 ANDROID: export find_user() & free_uid()for GKI purpose.
Exporting the symbols find_user() & free_uid() to access user task information in ko module for monitoring and optimization purposes. This is a necessary component of our scheduling policy.

Bug: 183674818
Bug: 283222331

Signed-off-by: lijianzhong <lijianzhong@xiaomi.com>
Change-Id: I12135c0af312904dd21b6f074beda086ad5ece98
(cherry picked from commit 16350016d8)
(cherry picked from commit eec2cd3df3aa2d92136658d3619dc5142155c7d4)
2023-05-18 13:30:37 +00:00
lijianzhong
555f3fe563 ANDROID: sched: Add vendor hooks for cpu affinity.
Add vendor hooks for CPU affinity to support OEM's tuning policy, where
we can block or unblock a certain type of application's CPU affinity.

Bug: 183674818
Bug: 283222331

Signed-off-by: lijianzhong <lijianzhong@xiaomi.com>
Change-Id: I3402abec4d9faa08f564409bfb8db8d7902f3aa2
(cherry picked from commit 7cf9646c245fdc63e2a3c9fad457c11fabdd2dfc)
2023-05-18 13:30:37 +00:00
lijianzhong
53a5908faa ANDROID: cgroup: Add vendor hook for cpuset.
This hook allows us to capture information when a process is forked so
that we can stat and set some key task's CPU affinity in the ko module
later. This patch, along with aosp/2565450, is necessary for our
affinity settings.

Bug: 183674818
Bug: 283222331

Signed-off-by: lijianzhong <lijianzhong@xiaomi.com>
Change-Id: Ib93e05e5f6c338c5f7ada56bfebdd705f87f1f66
(cherry picked from commit a188361628461c58a4dfc72869d9acb1dfa2542f)
(cherry picked from commit 8947e06ff7)
2023-05-18 13:30:37 +00:00
lijianzhong
7d9c8f70d7 ANDROID: export cpuset_cpus_allowed()for GKI purpose.
Exporting the symbol cpuset_cpus_allowed() so that we can adjust a
certain type of application's CPU affinity in vendor hooks according
to our tuning policy.
Related commit: aosp/2565450

Bug: 189725786
Bug: 283222331

Signed-off-by: lijianzhong <lijianzhong@xiaomi.com>
Change-Id: I7919a893ab64bb441ab43cbb0b16825ed76d802d
(cherry picked from commit 5a7d01ed73e4fc812fda1d7288086dc73a283405)
2023-05-18 13:30:37 +00:00
Zhuguangqing
1174e45a7d ANDROID: Add vendor hooks for binder perf tuning
Add some hooks in the binder module so that we can do task dependency analysis and statistical work in OEM's module for further optimization.

Bug: 235925535
Bug: 283222331

Signed-off-by: Zhuguangqing <zhuguangqing@xiaomi.com>
Change-Id: Id47e59c4e3ccd07b26eef758ada147b98cd1964e
Signed-off-by: heshuai1 <heshuai1@xiaomi.com>
Signed-off-by: Carlos Llamas <cmllamas@google.com>
[ cmllamas: don't export complete private definition struct binder_alloc
  in vendor hooks, instead just pass member alloc->free_async_space as
  implemented by heshuai1 and squashed here ]
(cherry picked from commit 254fb1f4034fde523378ee58a501d212a59047b7)
2023-05-18 13:30:37 +00:00
heshuai1
e47455c5dd ANDROID: freezer: Add vendor hook to freezer for GKI purpose.
Add the vendor hook to freezer.c so that OEM's logic can be executed
when the process is about to be frozen. We need to clear the flag for
some tasks and rebind task dependencies for optimization purposes.

Bug: 187458531
Bug: 283222331

Signed-off-by: heshuai1 <heshuai1@xiaomi.com>
Change-Id: Iea42fd9604d6b33ccd6502425416f0dd28eecebb
(cherry picked from commit a1580311c3)
2023-05-18 13:30:37 +00:00
Zhuguangqing
4219a3afd4 ANDROID: freezer: export the freezer_cgrp_subsys for GKI purpose.
Exporting the symbol freezer_cgrp_subsys, in that vendor module can
add can_attach & cancel_attach member function. It is vendor-specific
tuning.

Bug: 182496370
Bug: 283222331

Signed-off-by: Zhuguangqing <zhuguangqing@xiaomi.com>
Change-Id: I153682b9d1015eed3f048b45ea6495ebb8f3c261
(cherry picked from commit 8a90e4d4e555dd5484213c6fec5061958016a194)
2023-05-18 13:30:37 +00:00
heshuai1
2d3899353a ANDROID: power: Add vendor hook to qos for GKI purpose.
Add vendor hooks in add/update/remove frequency QoS request process to
ensure that we can access the OEM's "frequency watchdog" logic for
abnormal frequency monitoring. This is necessary for our power tuning
policy.

Bug: 187458531
Bug: 283222331

Signed-off-by: heshuai1 <heshuai1@xiaomi.com>
Change-Id: I1fb8fd6134432ecfb44ad242c66ccd8280ab9b43
(cherry picked from commit c445fe4dc67ad74dacfa548bc78876a7ce057086)
(cherry picked from commit 0ea0d6a7a2)
2023-05-18 13:30:37 +00:00
Quentin Perret
7590636e68 ANDROID: arm64: Check FGT cap before touching HFGWTR_EL2
Writing to HFGWTR_EL2 is undefined on CPUs without the capability,
so make sure not to touch the register when that is the case.

Bug: 282917063
Bug: 282993310
Change-Id: I85211105d6b1fbee854b4f13f037b8573c5a211c
Signed-off-by: Quentin Perret <qperret@google.com>
2023-05-18 09:10:19 +00:00
Quentin Perret
71b068b4bb Revert "ANDROID: Partially Revert "ANDROID: KVM: arm64: Allow tweaking HFGWTR_EL2 from modules""
This reverts commit 6cf9fb4579. It was a
temporary workaround which will be replaced a proper fix shortly.

Bug: 282917063
Bug: 282993310
Change-Id: I0caec4a63aabaecbf3fa7ec5d5b4c6930ea6efcd
Signed-off-by: Quentin Perret <qperret@google.com>
2023-05-18 09:10:19 +00:00
Jaegeuk Kim
42f3bd5050 FROMGIT: f2fs: fix the wrong condition to determine atomic context
Should use !in_task for irq context.

Bug: 281085599
Cc: stable@vger.kernel.org
Fixes: 1aa161e431 ("f2fs: fix scheduling while atomic in decompression path")
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
(cherry picked from commit f063fa43995667dbdf5b46406774a0ad58310dae
 https://git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs.git dev)
Change-Id: I5ce9286cc380309ee5e294f54ec357a4bfa47d6f
2023-05-17 19:17:33 -07:00
Giuliano Procida
2afee88822 ANDROID: GKI: refresh STG ABI to new version
prebuilts/kernel-build-tools/linux-x86/bin/stg \
  --stg common/android/abi_gki_aarch64.stg \
  --output common/android/abi_gki_aarch64.stg

Bug: 274744378
Change-Id: Id62cb08cdb66474a54dc249d1634e08563232fca
Signed-off-by: Giuliano Procida <gprocida@google.com>
2023-05-17 10:43:46 +00:00
xieliujie
bea77f23e7 ANDROID: ABI: Update oplus symbol list
1 function symbol(s) added
  'int __traceiter_task_rename(void*, struct task_struct*, const char*)'

1 variable symbol(s) added
  'struct tracepoint __tracepoint_task_rename'

Bug: 193384408
Change-Id: Id308aa1182ee597754ce78e0587a02b6820c8f39
Signed-off-by: xieliujie <xieliujie@oppo.com>
2023-05-17 10:10:35 +00:00
Liujie Xie
2b153a2359 ANDROID: vendor_hooks: Export the tracepoints task_rename
Export the tracepoint task_rename to identify specific new task,
to customize task's util for power and performance, or optimize
task schedule parameters.

Bug: 189985971

Change-Id: I3bb71eae316e3096d361e7b47012ba46ea4be509
Signed-off-by: Liujie Xie <xieliujie@oppo.com>
(cherry picked from commit 016d3f7b69)
(cherry picked from commit cfc14a391adb4d44d8186694b4884815bd85be6c)
2023-05-17 10:10:35 +00:00
Pierre-Louis Bossart
c0fd3ab764 UPSTREAM: ASoC: soc-pcm: fix BE handling of PAUSE_RELEASE
[ Upstream commit 3aa1e96a2b ]

A BE connected to more than one FE, e.g. in a mixer case, can go
through the following transitions.

play FE1    -> BE state is START
pause FE1   -> BE state is PAUSED
play FE2    -> BE state is START
stop FE2    -> BE state is STOP (see note [1] below)
release FE1 -> BE state is START
stop FE1    -> BE state is STOP

play FE1    -> BE state is START
pause FE1   -> BE state is PAUSED
play FE2    -> BE state is START
release FE1 -> BE state is START
stop FE2    -> BE state is START
stop FE1    -> BE state is STOP

play FE1    -> BE state is START
play FE2    -> BE state is START (no change)
pause FE1   -> BE state is START (no change)
pause FE2   -> BE state is PAUSED
release FE1 -> BE state is START
release FE2 -> BE state is START (no change)
stop FE1    -> BE state is START (no change)
stop FE2    -> BE state is STOP

The existing code for PAUSE_RELEASE only allows for the case where the
BE is paused, which clearly would not work in the sequences above.

Extend the allowed states to restart the BE when PAUSE_RELEASE is
received, and increase the refcount if the BE is already in START.

[1] the existing logic does not move the BE state back to PAUSED when
the FE2 is stopped. This patch does not change the logic; it would be
painful to keep a history of changes on the FE side, the state machine
is already rather complicated with transitions based on the last BE
state and the trigger type.

Reported-by: Bard Liao <bard.liao@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/20211207173745.15850-7-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Fixes: aa9ff6a495 ("ASoC: soc-compress: Reposition and add pcm_mutex")
Signed-off-by: Yixuan Jiang <yixuanjiang@google.com>
Cc: stable@vger.kernel.org # 5.15+

Bug: 277241308
Link: https://lore.kernel.org/all/20230511120841.2096524-7-yixuanjiang@google.com
Change-Id: I2b5af9448df27082b75365c45357235d2887f33c
Signed-off-by: Yixuan Jiang <yixuanjiang@google.com>
2023-05-17 10:08:04 +00:00
Pierre-Louis Bossart
b944772c3c UPSTREAM: ASoC: soc-pcm: test refcount before triggering
[ Upstream commit 848aedfdc6 ]

On start/pause_release/resume, when more than one FE is connected to
the same BE, it's possible that the trigger is sent more than
once. This is not desirable, we only want to trigger a BE once, which
is straightforward to implement with a refcount.

For stop/pause/suspend, the problem is more complicated: the check
implemented in snd_soc_dpcm_can_be_free_stop() may fail due to a
conceptual deadlock when we trigger the BE before the FE. In this
case, the FE states have not yet changed, so there are corner cases
where the TRIGGER_STOP is never sent - the dual case of start where
multiple triggers might be sent.

This patch suggests an unconditional trigger in all cases, without
checking the FE states, using a refcount protected by the BE PCM
stream lock.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/20211207173745.15850-6-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Fixes: aa9ff6a495 ("ASoC: soc-compress: Reposition and add pcm_mutex")
Signed-off-by: Yixuan Jiang <yixuanjiang@google.com>
Cc: stable@vger.kernel.org # 5.15+

Bug: 277241308
Link: https://lore.kernel.org/all/20230511120841.2096524-6-yixuanjiang@google.com
Change-Id: I294e1f1b55cb1819e0510bff67db41b01c809210
Signed-off-by: Yixuan Jiang <yixuanjiang@google.com>
2023-05-17 10:08:04 +00:00
Takashi Iwai
9702a90b36 UPSTREAM: ASoC: soc-pcm: serialize BE triggers
[ Upstream commit b2ae806630 ]

When more than one FE is connected to a BE, e.g. in a mixing use case,
the BE can be triggered multiple times when the FE are opened/started
concurrently. This race condition is problematic in the case of
SoundWire BE dailinks, and this is not desirable in a general
case.

This patch relies on the existing BE PCM lock, which takes atomicity into
account. The locking model assumes that all interactions start with
the FE, so that there is no deadlock between FE and BE locks.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
[test, checkpatch fix and clarification of commit message by plbossart]
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/20211207173745.15850-5-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Fixes: aa9ff6a495 ("ASoC: soc-compress: Reposition and add pcm_mutex")
Signed-off-by: Yixuan Jiang <yixuanjiang@google.com>
Cc: stable@vger.kernel.org # 5.15+

Bug: 277241308
Link: https://lore.kernel.org/all/20230511120841.2096524-5-yixuanjiang@google.com
Change-Id: I8581d910436c9e8f93ee8ef2d0c19d3e2d23dc09
Signed-off-by: Yixuan Jiang <yixuanjiang@google.com>
2023-05-17 10:08:04 +00:00
Takashi Iwai
ec8eab1e7c UPSTREAM: ASoC: soc-pcm: Fix and cleanup DPCM locking
[ Upstream commit b7898396f4 ]

The existing locking for DPCM has several issues
a) a confusing mix of card->mutex and card->pcm_mutex.
b) a dpcm_lock spinlock added inconsistently and on paths that could
be recursively taken. The use of irqsave/irqrestore was also overkill.

The suggested model is:

1) The pcm_mutex is the top-most protection of BE links in the FE. The
pcm_mutex is applied always on either the top PCM callbacks or the
external call from DAPM, not taken in the internal functions.

2) the FE stream lock is taken in higher levels before invoking
dpcm_be_dai_trigger()

3) when adding and deleting a BE, both the pcm_mutex and FE stream
lock are taken.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
[clarification of commit message by plbossart]
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/20211207173745.15850-4-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Fixes: aa9ff6a495 ("ASoC: soc-compress: Reposition and add pcm_mutex")
Signed-off-by: Yixuan Jiang <yixuanjiang@google.com>
Cc: stable@vger.kernel.org # 5.15+

Bug: 277241308
Link: https://lore.kernel.org/all/20230511120841.2096524-4-yixuanjiang@google.com
Change-Id: Iae88cee86073874889591ea0619609d6d4103645
Signed-off-by: Yixuan Jiang <yixuanjiang@google.com>
2023-05-17 10:08:04 +00:00
Pierre-Louis Bossart
06e574fc9a UPSTREAM: ASoC: soc-pcm: align BE 'atomicity' with that of the FE
[ Upstream commit bbf7d3b1c4 ]

Since the flow for DPCM is based on taking a lock for the FE first, we
need to make sure during the connection between a BE and an FE that
they both use the same 'atomicity', otherwise we may sleep in atomic
context.

If the FE is nonatomic, this patch forces the BE to be nonatomic as
well. That should have no negative impact since the BE 'inherits' the
FE properties.

However, if the FE is atomic and the BE is not, then the configuration
is flagged as invalid.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
[ removed FE stream lock by tiwai ]
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/20211207173745.15850-3-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Fixes: aa9ff6a495 ("ASoC: soc-compress: Reposition and add pcm_mutex")
Signed-off-by: Yixuan Jiang <yixuanjiang@google.com>
Cc: stable@vger.kernel.org # 5.15+

Bug: 277241308
Link: https://lore.kernel.org/all/20230511120841.2096524-3-yixuanjiang@google.com
Change-Id: I91c5894d2a22b86c2d8af2d19d9f4364210abd36
Signed-off-by: Yixuan Jiang <yixuanjiang@google.com>
2023-05-17 10:08:04 +00:00
Pierre-Louis Bossart
13344864f0 UPSTREAM: ASoC: soc-pcm: use GFP_ATOMIC for dpcm structure
[ Upstream commit d8a9c6e1f6 ]

We allocate a structure in dpcm_be_connect(), which may be called in
atomic context. Using GFP_KERNEL is not quite right, we have to use
GFP_ATOMIC to prevent the allocator from sleeping.

Suggested-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/20211207173745.15850-2-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Fixes: aa9ff6a495 ("ASoC: soc-compress: Reposition and add pcm_mutex")
Signed-off-by: Yixuan Jiang <yixuanjiang@google.com>
Cc: stable@vger.kernel.org # 5.15+

Bug: 277241308
Link: https://lore.kernel.org/all/20230511120841.2096524-2-yixuanjiang@google.com
Change-Id: Id20dc271a73e1fc40d95bc39c367f9476b72c6f9
Signed-off-by: Yixuan Jiang <yixuanjiang@google.com>
2023-05-17 10:08:04 +00:00
Will McVicker
6cf9fb4579 ANDROID: Partially Revert "ANDROID: KVM: arm64: Allow tweaking HFGWTR_EL2 from modules"
This is a partial revert of commit 085255b984 in order to fix booting
this kernel on devices that don't support FEAT_FGT due to direct
accesses of HFGWTR_EL2 being UNDEFINED. We are retaining the KMI part of
the commit until the next KMI breakage window.

Bug: 282917063
Change-Id: I6c156ef40a5584dc41e4d9d09c80736e30348802
Signed-off-by: Will McVicker <willmcvicker@google.com>
2023-05-17 06:53:32 +00:00
Ray Chi
278999b347 UPSTREAM: usb: core: stop USB enumeration if too many retries
When a broken USB accessory connects to a USB host, usbcore might
keep doing enumeration retries. If the host has a watchdog mechanism,
the kernel panic will happen on the host.

This patch provides an attribute early_stop to limit the numbers of retries
for each port of a hub. If a port was marked with early_stop attribute,
unsuccessful connection attempts will fail quickly. In addition, if an
early_stop port has failed to initialize, it will ignore all future
connection events until early_stop attribute is clear.

Signed-off-by: Ray Chi <raychi@google.com>
Reviewed-by: Alan Stern <stern@rowland.harvard.edu>
Link: https://lore.kernel.org/r/20221107072754.3336357-1-raychi@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

Bug: 282876796
Change-Id: I48eff1dbbc341ef893c8abc20953b7e9a62244da
(cherry picked from commit 430d57f53e)
Signed-off-by: Ray Chi <raychi@google.com>
2023-05-17 02:17:35 +00:00
Wanwei Jiang
d42d7aa8eb ANDROID: GKI: Update symbol list for Amlogic
1 function symbol(s) added
  'int __traceiter_android_vh_ftrace_format_check(void*, bool*)'

1 variable symbol(s) added
  'struct tracepoint __tracepoint_android_vh_ftrace_format_check'

Bug: 282937935
Change-Id: I01faf716cef7ab9663d0a82d7da2e3b8bad029bf
Signed-off-by: Wanwei Jiang <wanwei.jiang@amlogic.com>
2023-05-17 00:37:07 +08:00
Edmond Chung
0e234fce30 ANDROID: Update the ABI symbol list
Adding the following symbols:
  - dma_buf_set_name

Bug: 258524438
Change-Id: I430eb773f216a0844864a3eb1393efe5a44651bd
Signed-off-by: Edmond Chung <edmondchung@google.com>
2023-05-16 15:12:15 +00:00
Pablo Neira Ayuso
7352c1ffe2 UPSTREAM: netfilter: nf_tables: deactivate anonymous set from preparation phase
commit c1592a8994 upstream.

Toggle deleted anonymous sets as inactive in the next generation, so
users cannot perform any update on it. Clear the generation bitmask
in case the transaction is aborted.

The following KASAN splat shows a set element deletion for a bound
anonymous set that has been already removed in the same transaction.

[   64.921510] ==================================================================
[   64.923123] BUG: KASAN: wild-memory-access in nf_tables_commit+0xa24/0x1490 [nf_tables]
[   64.924745] Write of size 8 at addr dead000000000122 by task test/890
[   64.927903] CPU: 3 PID: 890 Comm: test Not tainted 6.3.0+ #253
[   64.931120] Call Trace:
[   64.932699]  <TASK>
[   64.934292]  dump_stack_lvl+0x33/0x50
[   64.935908]  ? nf_tables_commit+0xa24/0x1490 [nf_tables]
[   64.937551]  kasan_report+0xda/0x120
[   64.939186]  ? nf_tables_commit+0xa24/0x1490 [nf_tables]
[   64.940814]  nf_tables_commit+0xa24/0x1490 [nf_tables]
[   64.942452]  ? __kasan_slab_alloc+0x2d/0x60
[   64.944070]  ? nf_tables_setelem_notify+0x190/0x190 [nf_tables]
[   64.945710]  ? kasan_set_track+0x21/0x30
[   64.947323]  nfnetlink_rcv_batch+0x709/0xd90 [nfnetlink]
[   64.948898]  ? nfnetlink_rcv_msg+0x480/0x480 [nfnetlink]

Bug: 282877000
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Lee Jones <joneslee@google.com>
Change-Id: I536b7fbec55a5b37a57546023891a3dcfeb2c24b
2023-05-16 08:38:15 +01:00
Yi Kong
fc89803eb3 ANDROID: clang: update to 17.0.2
Change-Id: Iac98d18aa284b05267d47a08b30102103e71d293
Test: presubmit
Bug: 277565884
Bug: 279955553
Signed-off-by: Yi Kong <yikong@google.com>
2023-05-15 17:01:01 +00:00
Ulises Mendez Martinez
36756472dc ANDROID: db845c: Remove MAKE_GOALS from build.config
* Instead use the equivalent kernel_build attribute.
* This migrates rockpi4 `MAKE_GOALS` too.

Bug: 236012223
Change-Id: Icf47eb42795100b4955f02170a002689c7566194
Signed-off-by: Ulises Mendez Martinez <umendez@google.com>
2023-05-15 07:01:39 +00:00
Benedict Wong
57ae54b088 FROMGIT: xfrm: Check if_id in inbound policy/secpath match
This change ensures that if configured in the policy, the if_id set in
the policy and secpath states match during the inbound policy check.
Without this, there is potential for ambiguity where entries in the
secpath differing by only the if_id could be mismatched.

Notably, this is checked in the outbound direction when resolving
templates to SAs, but not on the inbound path when matching SAs and
policies.

Test: Tested against Android kernel unit tests & CTS
Signed-off-by: Benedict Wong <benedictwong@google.com>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>

Bug: 279217934
(cherry picked from commit 8680407b6f
 https://git.kernel.org/pub/scm/linux/kernel/git/klassert/ipsec.git master)
Change-Id: Ibb97561eaf1a99b7ad239d4d4860bfe5b0ac20ea
Signed-off-by: Carlos Llamas <cmllamas@google.com>
2023-05-12 20:04:23 +00:00
Ramji Jiyani
f3147526a0 ANDROID: GKI: gen_gki_modules_headers update preprocessing
Since we do not enforce symbol lists to be generated using
the ABI tooling; it is possible to have the symbol list
updates with CRLF characters at the end of a line, leading
and trailining white spaces based on how they are manually
edited. The header generation script fails in this case when
it parses these symbols with CRLF or sorting order may not
be correct for symbols with trailing white spaces.

Update the preprocessing of the symbol list to remove any
carriage returns, strip any leading and trailing white spaces
in addition to the other preprocessing.

Bug: 280837072
Test: TH, manual verification
Change-Id: I4b832c28b42f196056c38fc3e2ccd517a03e13fa
Signed-off-by: Ramji Jiyani <ramjiyani@google.com>
(cherry picked from commit 6b893a535cfa8a5e9a6cd792e0437fe66cb2296b)
2023-05-12 19:20:07 +00:00
John Stultz
9bb6bf15fc FROMGIT: locking/rwsem: Add __always_inline annotation to __down_read_common() and inlined callers
Apparently despite it being marked inline, the compiler
may not inline __down_read_common() which makes it difficult
to identify the cause of lock contention, as the blocked
function in traceevents will always be listed as
__down_read_common().

So this patch adds __always_inline annotation to the common
function (as well as the inlined helper callers) to force it to
be inlined so the blocking function will be listed (via Wchan)
in traceevents.

Fixes: c995e638cc ("locking/rwsem: Fold __down_{read,write}*()")
Reported-by: Tim Murray <timmurray@google.com>
Signed-off-by: John Stultz <jstultz@google.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Waiman Long <longman@redhat.com>
Cc: stable@vger.kernel.org
Link: https://lkml.kernel.org/r/20230503023351.2832796-1-jstultz@google.com
Bug: 277817995
(cherry picked from commit 92cc5d00a4
https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git locking/urgent)
Signed-off-by: John Stultz <jstultz@google.com>
(cherry picked from https://android-review.googlesource.com/q/commit:a6c75b2e64573cb9f49f6b89808207856fc0309b)
Merged-In: Ifad7ed7fe9f2d5a9eb0cfe7c35e45c0e86bc3ad4
Change-Id: Ifad7ed7fe9f2d5a9eb0cfe7c35e45c0e86bc3ad4
2023-05-12 16:47:54 +00:00
Dan Carpenter
01df29b641 UPSTREAM: KVM: arm64: Fix buffer overflow in kvm_arm_set_fw_reg()
The KVM_REG_SIZE() comes from the ioctl and it can be a power of two
between 0-32768 but if it is more than sizeof(long) this will corrupt
memory.

Fixes: 99adb56763 ("KVM: arm/arm64: Add save/restore support for firmware workaround state")
Change-Id: Ia01204a3f63bcfc8ac3959c2ac7bbccb2ba64c61
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: Steven Price <steven.price@arm.com>
Reviewed-by: Eric Auger <eric.auger@redhat.com>
Reviewed-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/4efbab8c-640f-43b2-8ac6-6d68e08280fe@kili.mountain
Signed-off-by: Oliver Upton <oliver.upton@linux.dev>
(cherry picked from commit a25bc8486f)
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2023-05-12 08:56:28 +00:00
Treehugger Robot
444e7e1227 Merge "Merge 5.15.110 into android14-5.15" into android14-5.15 2023-05-12 08:55:54 +00:00
Will Deacon
de68c74304 ANDROID: KVM: arm64: Always unmap protected regions from the host
As part of the host deprivilege process, memory regions advertised in
the "pkvm,protected-region" devicetree nodes are unmapped from the
host stage-2 page-table and annotated specially so that the memory can
be used exclusively by hypervisor modules.

Since the state of this memory in the host stage-2 may not be in the
"owned" state (for example, if it corresponds to a "no-map" region),
remove the initial check of the page state and allow unmapping of any
pages from the trusted host.

Bug: 280380533
Cc: Quentin Perret <qperret@google.com>
Fixes: e8cf4c06e1 ("ANDROID: KVM: arm64: Move addr_is_allowed_memory() check into host callback")
Signed-off-by: Will Deacon <willdeacon@google.com>
Change-Id: Ic28a2557d6d515b356645228fd41d3c921826489
2023-05-11 22:31:32 +00:00
Bart Van Assche
a349adda90 ANDROID: block: Improve shared tag set performance
Remove the code for fair tag sharing because it significantly hurts
performance for UFS devices. Removing this code is safe because the
legacy block layer worked fine without any equivalent fairness
algorithm.

This algorithm hurts performance for UFS devices because UFS devices
have multiple logical units. One of these logical units (WLUN) is used
to submit control commands, e.g. START STOP UNIT. If any request is
submitted to the WLUN, the queue depth is reduced from 31 to 15 or
lower for data LUNs.

See also https://lore.kernel.org/linux-scsi/20221229030645.11558-1-ed.tsai@mediatek.com/

Cc: Christoph Hellwig <hch@lst.de>
Cc: Martin K. Petersen <martin.petersen@oracle.com>
Cc: Ming Lei <ming.lei@redhat.com>
Cc: Keith Busch <kbusch@kernel.org>
Cc: Damien Le Moal <damien.lemoal@opensource.wdc.com>
Cc: Ed Tsai <ed.tsai@mediatek.com>
Change-Id: Ia6d75917d533f32fffc68348b52fd3d972c9074c
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Bug: 281845090
Link: https://lore.kernel.org/linux-block/20230103195337.158625-1-bvanassche@acm.org/
Signed-off-by: Bart Van Assche <bvanassche@google.com>
2023-05-11 16:03:53 +00:00
Ramji Jiyani
0b5545b549 ANDROID: GKI: Update owners for GKI modules lists
Add ramjiyani@ as per-file owner for list of protected
modules for all current & future architectures.

android/gki_*_protected_modules

Bug: 151893768
Test: TH
Change-Id: I0048c99a28cfe24e1ba7c7d6189fd8c7dfdf6f0d
Signed-off-by: Ramji Jiyani <ramjiyani@google.com>
2023-05-11 12:27:24 +00:00
Badhri Jagan Sridharan
9919aa7367 FROMLIST: usb: typec: altmodes/displayport: fix pin_assignment_show
This patch fixes negative indexing of buf array in pin_assignment_show
when get_current_pin_assignments returns 0 i.e. no compatible pin
assignments.

BUG: KASAN: use-after-free in pin_assignment_show+0x26c/0x33c
...
Call trace:
dump_backtrace+0x110/0x204
dump_stack_lvl+0x84/0xbc
print_report+0x358/0x974
kasan_report+0x9c/0xfc
__do_kernel_fault+0xd4/0x2d4
do_bad_area+0x48/0x168
do_tag_check_fault+0x24/0x38
do_mem_abort+0x6c/0x14c
el1_abort+0x44/0x68
el1h_64_sync_handler+0x64/0xa4
el1h_64_sync+0x78/0x7c
pin_assignment_show+0x26c/0x33c
dev_attr_show+0x50/0xc0

Bug: 281126270
Change-Id: I117ec48a09df969029dc1b2f6cb0baea13200ff0
Link: https://lore.kernel.org/lkml/20230508214443.893436-1-badhri@google.com/T/
Signed-off-by: Badhri Jagan Sridharan <badhri@google.com>
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
2023-05-11 07:27:30 +00:00
vincenttew
0b015de44e ANDROID: Update the ABI symbol list
Adding the following symbols:
  - __traceiter_android_rvh_audio_usb_offload_disconnect
  - __traceiter_android_vh_audio_usb_offload_connect
  - __tracepoint_android_rvh_audio_usb_offload_disconnect
  - __tracepoint_android_vh_audio_usb_offload_connect

Bug: 279824172
Change-Id: I65d8fbff12a6cc97fcf3c784f138779210b1b2b3
Signed-off-by: vincenttew <vincenttew@google.com>
2023-05-11 06:18:58 +00:00
Greg Kroah-Hartman
a083039e30 Merge 5.15.110 into android14-5.15
Changes in 5.15.110
	PCI/ASPM: Remove pcie_aspm_pm_state_change()
	selftests/kselftest/runner/run_one(): allow running non-executable files
	KVM: arm64: Retry fault if vma_lookup() results become invalid
	KVM: arm64: Fix buffer overflow in kvm_arm_set_fw_reg()
	wifi: brcmfmac: slab-out-of-bounds read in brcmf_get_assoc_ies()
	drm/fb-helper: set x/yres_virtual in drm_fb_helper_check_var
	bluetooth: Perform careful capability checks in hci_sock_ioctl()
	USB: serial: option: add UNISOC vendor and TOZED LT70C product
	driver core: Don't require dynamic_debug for initcall_debug probe timing
	selftests: mptcp: join: fix "invalid address, ADD_ADDR timeout"
	riscv: Move early dtb mapping into the fixmap region
	riscv: Do not set initial_boot_params to the linear address of the dtb
	riscv: No need to relocate the dtb as it lies in the fixmap region
	Linux 5.15.110

Change-Id: I1a4dab8ca13c176a9eda494532a8134a7ed15883
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2023-05-11 05:41:52 +00:00
Carlos Llamas
22ec5ade86 ANDROID: 5/10/2023 KMI update
Set KMI_GENERATION=6 for 5/10 KMI update

122 function symbol(s) removed
  'struct sk_buff* __cfg80211_alloc_event_skb(struct wiphy*, struct wireless_dev*, enum nl80211_commands, enum nl80211_attrs, unsigned int, int, int, gfp_t)'
  'struct sk_buff* __cfg80211_alloc_reply_skb(struct wiphy*, enum nl80211_commands, enum nl80211_attrs, int)'
  'void __cfg80211_send_event_skb(struct sk_buff*, gfp_t)'
  'void cfg80211_assoc_failure(struct net_device*, struct cfg80211_assoc_failure*)'
  'u32 cfg80211_calculate_bitrate(struct rate_info*)'
  'void cfg80211_ch_switch_notify(struct net_device*, struct cfg80211_chan_def*, unsigned int)'
  'void cfg80211_ch_switch_started_notify(struct net_device*, struct cfg80211_chan_def*, unsigned int, u8, bool)'
  'void cfg80211_chandef_create(struct cfg80211_chan_def*, struct ieee80211_channel*, enum nl80211_channel_type)'
  'void cfg80211_connect_done(struct net_device*, struct cfg80211_connect_resp_params*, gfp_t)'
  'void cfg80211_del_sta_sinfo(struct net_device*, const u8*, struct station_info*, gfp_t)'
  'void cfg80211_disconnected(struct net_device*, u16, const u8*, size_t, bool, gfp_t)'
  'int cfg80211_external_auth_request(struct net_device*, struct cfg80211_external_auth_params*, gfp_t)'
  'const struct element* cfg80211_find_elem_match(u8, const u8*, unsigned int, const u8*, unsigned int, unsigned int)'
  'const struct element* cfg80211_find_vendor_elem(unsigned int, int, const u8*, unsigned int)'
  'void cfg80211_ft_event(struct net_device*, struct cfg80211_ft_event_params*)'
  'struct cfg80211_bss* cfg80211_get_bss(struct wiphy*, struct ieee80211_channel*, const u8*, const u8*, size_t, enum ieee80211_bss_type, enum ieee80211_privacy)'
  'void cfg80211_gtk_rekey_notify(struct net_device*, const u8*, const u8*, gfp_t)'
  'void cfg80211_ibss_joined(struct net_device*, const u8*, struct ieee80211_channel*, gfp_t)'
  'struct cfg80211_bss* cfg80211_inform_bss_data(struct wiphy*, struct cfg80211_inform_bss*, enum cfg80211_bss_frame_type, const u8*, u64, u16, u16, const u8*, size_t, gfp_t)'
  'struct cfg80211_bss* cfg80211_inform_bss_frame_data(struct wiphy*, struct cfg80211_inform_bss*, struct ieee80211_mgmt*, size_t, gfp_t)'
  'void cfg80211_mgmt_tx_status_ext(struct wireless_dev*, struct cfg80211_tx_status*, gfp_t)'
  'void cfg80211_michael_mic_failure(struct net_device*, const u8*, enum nl80211_key_type, int, const u8*, gfp_t)'
  'void cfg80211_new_sta(struct net_device*, const u8*, struct station_info*, gfp_t)'
  'void cfg80211_pmksa_candidate_notify(struct net_device*, int, const u8*, bool, gfp_t)'
  'void cfg80211_port_authorized(struct net_device*, const u8*, const u8*, u8, gfp_t)'
  'void cfg80211_put_bss(struct wiphy*, struct cfg80211_bss*)'
  'void cfg80211_ready_on_channel(struct wireless_dev*, u64, struct ieee80211_channel*, unsigned int, gfp_t)'
  'int cfg80211_register_netdevice(struct net_device*)'
  'void cfg80211_remain_on_channel_expired(struct wireless_dev*, u64, struct ieee80211_channel*, gfp_t)'
  'void cfg80211_roamed(struct net_device*, struct cfg80211_roam_info*, gfp_t)'
  'bool cfg80211_rx_mgmt_ext(struct wireless_dev*, struct cfg80211_rx_info*)'
  'void cfg80211_rx_unprot_mlme_mgmt(struct net_device*, const u8*, size_t)'
  'void cfg80211_scan_done(struct cfg80211_scan_request*, struct cfg80211_scan_info*)'
  'void cfg80211_sched_scan_results(struct wiphy*, u64)'
  'void cfg80211_sched_scan_stopped_locked(struct wiphy*, u64)'
  'void cfg80211_tdls_oper_request(struct net_device*, const u8*, enum nl80211_tdls_operation, u16, gfp_t)'
  'void cfg80211_unlink_bss(struct wiphy*, struct cfg80211_bss*)'
  'void cfg80211_unregister_wdev(struct wireless_dev*)'
  'void cfg80211_update_owe_info_event(struct net_device*, struct cfg80211_update_owe_info*, gfp_t)'
  'int cfg80211_vendor_cmd_reply(struct sk_buff*)'
  'const struct ieee80211_reg_rule* freq_reg_info(struct wiphy*, u32)'
  'struct ieee80211_hw* ieee80211_alloc_hw_nm(size_t, const struct ieee80211_ops*, const char*)'
  'bool ieee80211_beacon_cntdwn_is_complete(struct ieee80211_vif*)'
  'struct sk_buff* ieee80211_beacon_get_template(struct ieee80211_hw*, struct ieee80211_vif*, struct ieee80211_mutable_offsets*)'
  'struct sk_buff* ieee80211_beacon_get_tim(struct ieee80211_hw*, struct ieee80211_vif*, u16*, u16*)'
  'void ieee80211_beacon_loss(struct ieee80211_vif*)'
  'u8 ieee80211_beacon_update_cntdwn(struct ieee80211_vif*)'
  'const struct element* ieee80211_bss_get_elem(struct cfg80211_bss*, u8)'
  'u32 ieee80211_calc_rx_airtime(struct ieee80211_hw*, struct ieee80211_rx_status*, int)'
  'u32 ieee80211_calc_tx_airtime(struct ieee80211_hw*, struct ieee80211_tx_info*, int)'
  'u32 ieee80211_channel_to_freq_khz(int, enum nl80211_band)'
  'void ieee80211_connection_loss(struct ieee80211_vif*)'
  'void ieee80211_csa_finish(struct ieee80211_vif*)'
  'struct ieee80211_sta* ieee80211_find_sta(struct ieee80211_vif*, const u8*)'
  'struct ieee80211_sta* ieee80211_find_sta_by_ifaddr(struct ieee80211_hw*, const u8*, const u8*)'
  'void ieee80211_free_hw(struct ieee80211_hw*)'
  'void ieee80211_free_txskb(struct ieee80211_hw*, struct sk_buff*)'
  'int ieee80211_freq_khz_to_channel(u32)'
  'struct sk_buff* ieee80211_get_buffered_bc(struct ieee80211_hw*, struct ieee80211_vif*)'
  'struct ieee80211_channel* ieee80211_get_channel_khz(struct wiphy*, u32)'
  'struct sk_buff* ieee80211_get_fils_discovery_tmpl(struct ieee80211_hw*, struct ieee80211_vif*)'
  'unsigned int ieee80211_get_hdrlen_from_skb(const struct sk_buff*)'
  'void ieee80211_get_key_rx_seq(struct ieee80211_key_conf*, int, struct ieee80211_key_seq*)'
  'void ieee80211_get_tx_rates(struct ieee80211_vif*, struct ieee80211_sta*, struct sk_buff*, struct ieee80211_tx_rate*, int)'
  'struct sk_buff* ieee80211_get_unsol_bcast_probe_resp_tmpl(struct ieee80211_hw*, struct ieee80211_vif*)'
  'unsigned int ieee80211_hdrlen(__le16)'
  'void ieee80211_iter_chan_contexts_atomic(struct ieee80211_hw*, void(*)(struct ieee80211_hw*, struct ieee80211_chanctx_conf*, void*), void*)'
  'void ieee80211_iter_keys_rcu(struct ieee80211_hw*, struct ieee80211_vif*, void(*)(struct ieee80211_hw*, struct ieee80211_vif*, struct ieee80211_sta*, struct ieee80211_key_conf*, void*), void*)'
  'void ieee80211_iterate_active_interfaces_atomic(struct ieee80211_hw*, u32, void(*)(void*, u8*, struct ieee80211_vif*), void*)'
  'void ieee80211_iterate_interfaces(struct ieee80211_hw*, u32, void(*)(void*, u8*, struct ieee80211_vif*), void*)'
  'void ieee80211_iterate_stations_atomic(struct ieee80211_hw*, void(*)(void*, struct ieee80211_sta*), void*)'
  'void ieee80211_manage_rx_ba_offl(struct ieee80211_vif*, const u8*, unsigned int)'
  'struct ieee80211_txq* ieee80211_next_txq(struct ieee80211_hw*, u8)'
  'struct sk_buff* ieee80211_probereq_get(struct ieee80211_hw*, const u8*, const u8*, size_t, size_t)'
  'struct sk_buff* ieee80211_proberesp_get(struct ieee80211_hw*, struct ieee80211_vif*)'
  'void ieee80211_queue_delayed_work(struct ieee80211_hw*, struct delayed_work*, unsigned long)'
  'void ieee80211_queue_work(struct ieee80211_hw*, struct work_struct*)'
  'void ieee80211_radar_detected(struct ieee80211_hw*)'
  'void ieee80211_ready_on_channel(struct ieee80211_hw*)'
  'int ieee80211_register_hw(struct ieee80211_hw*)'
  'void ieee80211_remain_on_channel_expired(struct ieee80211_hw*)'
  'void ieee80211_report_low_ack(struct ieee80211_sta*, u32)'
  'void ieee80211_restart_hw(struct ieee80211_hw*)'
  'void ieee80211_return_txq(struct ieee80211_hw*, struct ieee80211_txq*, bool)'
  'void ieee80211_rx_irqsafe(struct ieee80211_hw*, struct sk_buff*)'
  'void ieee80211_rx_list(struct ieee80211_hw*, struct ieee80211_sta*, struct sk_buff*, struct list_head*)'
  'void ieee80211_rx_napi(struct ieee80211_hw*, struct ieee80211_sta*, struct sk_buff*, struct napi_struct*)'
  'void ieee80211_scan_completed(struct ieee80211_hw*, struct cfg80211_scan_info*)'
  'void ieee80211_send_bar(struct ieee80211_vif*, u8*, u16, u16)'
  'void ieee80211_sta_eosp(struct ieee80211_sta*)'
  'int ieee80211_sta_ps_transition(struct ieee80211_sta*, bool)'
  'void ieee80211_sta_pspoll(struct ieee80211_sta*)'
  'void ieee80211_sta_register_airtime(struct ieee80211_sta*, u8, u32, u32)'
  'void ieee80211_sta_uapsd_trigger(struct ieee80211_sta*, u8)'
  'void ieee80211_stop_queue(struct ieee80211_hw*, int)'
  'void ieee80211_stop_queues(struct ieee80211_hw*)'
  'void ieee80211_stop_tx_ba_cb_irqsafe(struct ieee80211_vif*, const u8*, u16)'
  'void ieee80211_tdls_oper_request(struct ieee80211_vif*, const u8*, enum nl80211_tdls_operation, u16, gfp_t)'
  'struct sk_buff* ieee80211_tx_dequeue(struct ieee80211_hw*, struct ieee80211_txq*)'
  'bool ieee80211_tx_prepare_skb(struct ieee80211_hw*, struct ieee80211_vif*, struct sk_buff*, int, struct ieee80211_sta**)'
  'void ieee80211_tx_rate_update(struct ieee80211_hw*, struct ieee80211_sta*, struct ieee80211_tx_info*)'
  'void ieee80211_tx_status(struct ieee80211_hw*, struct sk_buff*)'
  'void ieee80211_tx_status_ext(struct ieee80211_hw*, struct ieee80211_tx_status*)'
  'void ieee80211_tx_status_irqsafe(struct ieee80211_hw*, struct sk_buff*)'
  'void ieee80211_txq_get_depth(struct ieee80211_txq*, unsigned long*, unsigned long*)'
  'bool ieee80211_txq_may_transmit(struct ieee80211_hw*, struct ieee80211_txq*)'
  'void ieee80211_txq_schedule_start(struct ieee80211_hw*, u8)'
  'void ieee80211_unregister_hw(struct ieee80211_hw*)'
  'void ieee80211_wake_queue(struct ieee80211_hw*, int)'
  'void ieee80211_wake_queues(struct ieee80211_hw*)'
  'const char* reg_initiator_name(enum nl80211_reg_initiator)'
  'int regulatory_hint(struct wiphy*, const char*)'
  'int regulatory_set_wiphy_regd(struct wiphy*, struct ieee80211_regdomain*)'
  'int regulatory_set_wiphy_regd_sync(struct wiphy*, struct ieee80211_regdomain*)'
  'void wiphy_apply_custom_regulatory(struct wiphy*, const struct ieee80211_regdomain*)'
  'void wiphy_free(struct wiphy*)'
  'struct wiphy* wiphy_new_nm(const struct cfg80211_ops*, int, const char*)'
  'void wiphy_read_of_freq_limits(struct wiphy*)'
  'int wiphy_register(struct wiphy*)'
  'void wiphy_rfkill_set_hw_state_reason(struct wiphy*, bool, enum rfkill_hard_block_reasons)'
  'struct ieee80211_hw* wiphy_to_ieee80211_hw(struct wiphy*)'
  'void wiphy_unregister(struct wiphy*)'

1 variable symbol(s) removed
  'const unsigned char rfc1042_header[6]'

6 function symbol(s) added
  'int __traceiter_android_vh_do_futex(void*, int, unsigned int*, u32*)'
  'int __traceiter_android_vh_futex_wait_end(void*, unsigned int, u32)'
  'int __traceiter_android_vh_futex_wait_start(void*, unsigned int, u32)'
  'int __traceiter_android_vh_futex_wake_this(void*, int, int, int, struct task_struct*)'
  'int __traceiter_android_vh_futex_wake_traverse_plist(void*, struct plist_head*, int*, union futex_key, u32)'
  'int __traceiter_android_vh_futex_wake_up_q_finish(void*, int, int)'

6 variable symbol(s) added
  'struct tracepoint __tracepoint_android_vh_do_futex'
  'struct tracepoint __tracepoint_android_vh_futex_wait_end'
  'struct tracepoint __tracepoint_android_vh_futex_wait_start'
  'struct tracepoint __tracepoint_android_vh_futex_wake_this'
  'struct tracepoint __tracepoint_android_vh_futex_wake_traverse_plist'
  'struct tracepoint __tracepoint_android_vh_futex_wake_up_q_finish'

function symbol changed from 'unsigned long try_to_free_mem_cgroup_pages(struct mem_cgroup*, unsigned long, gfp_t, bool)' to 'unsigned long try_to_free_mem_cgroup_pages(struct mem_cgroup*, unsigned long, gfp_t, unsigned int)'
  CRC changed from 0x79f1d652 to 0x843f8baf
  type changed from 'unsigned long(struct mem_cgroup*, unsigned long, gfp_t, bool)' to 'unsigned long(struct mem_cgroup*, unsigned long, gfp_t, unsigned int)'
    parameter 4 type changed from 'bool' = '_Bool' to 'unsigned int'
      resolved type changed from '_Bool' to 'unsigned int'

function symbol 'struct block_device* I_BDEV(struct inode*)' changed
  CRC changed from 0xf2df037e to 0x5b8d1e5

function symbol 'void __ClearPageMovable(struct page*)' changed
  CRC changed from 0xafefd4e to 0x12b3b0b6

function symbol 'void __SetPageMovable(struct page*, struct address_space*)' changed
  CRC changed from 0x76517c1e to 0x2f7e012

... 1717 omitted; 1720 symbols have only CRC changes

type 'struct request' changed
  byte size changed from 304 to 328
  member 'struct { struct io_cq* icq; void* priv[2]; } elv' was added
  member 'struct { unsigned int seq; struct list_head list; rq_end_io_fn* saved_end_io; } flush' was added
  member 'union { struct { struct io_cq* icq; void* priv[2]; } elv; struct { unsigned int seq; struct list_head list; rq_end_io_fn* saved_end_io; } flush; }' was removed
  19 members ('struct gendisk* rq_disk' .. 'u64 android_kabi_reserved1') changed
    offset changed by 192

type 'struct rq' changed
  byte size changed from 4544 to 4608
  member 'unsigned long cpu_capacity_inverted' was added
  10 members ('struct callback_head* balance_callback' .. 'struct list_head cfs_tasks') changed
    offset changed by 64
  35 members ('struct sched_avg avg_rt' .. 'u64 android_kabi_reserved4') changed
    offset changed by 512

type 'struct cfg80211_conn' changed
  was fully defined, is now only declared

type 'struct cfg80211_cached_keys' changed
  was fully defined, is now only declared

type 'struct cfg80211_cqm_config' changed
  was fully defined, is now only declared

type 'struct cfg80211_internal_bss' changed
  was fully defined, is now only declared

type 'struct pkvm_module_ops' changed
  byte size changed from 496 to 512
  member 'void(* update_hcr_el2)(unsigned long, unsigned long)' was added
  member 'void(* update_hfgwtr_el2)(unsigned long, unsigned long)' was added
  51 members ('int(* register_host_perm_fault_handler)(int(*)(struct kvm_cpu_context*, u64, u64))' .. 'u64 android_kabi_reserved32') changed
    offset changed by 128

Bug: 280599882
Change-Id: I797a325acc9e73853da7cce6be591402303f0467
Signed-off-by: Carlos Llamas <cmllamas@google.com>
2023-05-11 03:39:34 +00:00
Quentin Perret
085255b984 ANDROID: KVM: arm64: Allow tweaking HFGWTR_EL2 from modules
pKVM modules may need to enable fine grain traps. To allow this
use-case, expose a function allowing to manipulate HFGWTR_EL2 on the
current CPU. This configuration will be persistent across power
management cycles and such as it is propagated all the way to the
init params per-cpu struct.

Bug: 245034629
Change-Id: If9c29849df50847d3a796345927bd51c37c358bc
Signed-off-by: Quentin Perret <qperret@google.com>
2023-05-11 03:05:59 +00:00
Quentin Perret
92c988d752 ANDROID: KVM: arm64: Allow tweaking HCR_EL2 from modules
pKVM modules may need to enable additional traps on top of what pKVM
already enables. To allow this use-case, expose a function allowing to
manipulate HCR_EL2 on the current CPU. This configuration will be
persistent across power management cycles and such as it is propagated
all the way to the init params per-cpu struct.

Bug: 245034629
Change-Id: I21d596bd1d01f4edc48a188cc3c2eb78dc9a4444
Signed-off-by: Quentin Perret <qperret@google.com>
2023-05-11 03:05:58 +00:00