Commit Graph

982479 Commits

Author SHA1 Message Date
Yang Yang
dd78ccadc4 ANDROID: GKI: Update symbol list for VIVO
Leaf changes summary: 6 artifacts changed
Changed leaf types summary: 0 leaf type changed
Removed/Changed/Added functions summary: 0 Removed, 0 Changed, 3 Added functions
Removed/Changed/Added variables summary: 0 Removed, 0 Changed, 3 Added variables

3 Added functions:

  [A] 'function int __traceiter_android_vh_blk_alloc_rqs(void*, size_t*, blk_mq_tag_set*, blk_mq_tags*)'
  [A] 'function int __traceiter_android_vh_blk_rq_ctx_init(void*, request*, blk_mq_tags*, blk_mq_alloc_data*, u64)'
  [A] 'function int __traceiter_android_vh_mm_dirty_limits(void*, dirty_throttle_control* const, bool, unsigned long int, unsigned long int, unsigned long int, unsigned long int)'

3 Added variables:

  [A] 'tracepoint __tracepoint_android_vh_blk_alloc_rqs'
  [A] 'tracepoint __tracepoint_android_vh_blk_rq_ctx_init'
  [A] 'tracepoint __tracepoint_android_vh_mm_dirty_limits'

Bug: 205166460
Change-Id: Iec948f354fe142576525a2f35769077d8c63788d
Signed-off-by: Yang Yang <yang.yang@vivo.com>
2021-11-05 07:28:04 +00:00
Wesley Cheng
8c9d9d8e44 FROMGIT: usb: gadget: f_mass_storage: Disable eps during disconnect
When receiving a disconnect event from the UDC, the mass storage
function driver currently runs the handle_exception() routine
asynchronously.  For UDCs that support runtime PM, there is a
possibility the UDC is already suspended by the time the
do_set_interface() is executed.  This can lead to HW register access
while the UDC is already suspended.

Signed-off-by: Wesley Cheng <quic_wcheng@quicinc.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>

Bug: 204343836
(cherry picked from commit 9fff139aeb11186fd8e75860c959c86cb43ab2f6
 https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing)
Change-Id: I6c8011baddf02d6b0eadb5934416bc24b8a93f4a
Signed-off-by: Wesley Cheng <quic_wcheng@quicinc.com>
2021-11-04 22:42:04 +00:00
Wesley Cheng
cde1d53cc9 FROMGIT: usb: gadget: udc: core: Revise comments for USB ep enable/disable
The usb_ep_disable() and usb_ep_enable() routines are being widely
used in atomic/interrupt context by function drivers.  Hence, the
statement about it being able to only run in process context may
not be true.  Add an explicit comment mentioning that it can be used
in atomic context.

Signed-off-by: Wesley Cheng <quic_wcheng@quicinc.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>

Bug: 204343836
(cherry picked from commit b0d5d2a71641bb50cada708cc8fdca946a837e9a
 https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing)
Change-Id: I1adb5d074fe2f9e33ebfdb30d335283c56bc7b39
Signed-off-by: Wesley Cheng <quic_wcheng@quicinc.com>
2021-11-04 22:41:52 +00:00
Kalesh Singh
e35a305d19 UPSTREAM: tracing/cfi: Fix cmp_entries_* functions signature mismatch
If CONFIG_CFI_CLANG=y, attempting to read an event histogram will cause
the kernel to panic due to failed CFI check.

    1. echo 'hist:keys=common_pid' >> events/sched/sched_switch/trigger
    2. cat events/sched/sched_switch/hist
    3. kernel panics on attempting to read hist

This happens because the sort() function expects a generic
int (*)(const void *, const void *) pointer for the compare function.
To prevent this CFI failure, change tracing map cmp_entries_* function
signatures to match this.

Also, fix the build error reported by the kernel test robot [1].

[1] https://lore.kernel.org/r/202110141140.zzi4dRh4-lkp@intel.com/

Link: https://lkml.kernel.org/r/20211014045217.3265162-1-kaleshsingh@google.com

Signed-off-by: Kalesh Singh <kaleshsingh@google.com>
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>

Bug: 204946901
(cherry picked from commit 7ce1bb83a14019f8c396d57ec704d19478747716)
Signed-off-by: Elliot Berman <quic_eberman@quicinc.com>
Change-Id: I4a1a39b086b5e306ddecabd9a6076e2fb14c3f70
2021-11-04 21:10:25 +00:00
Avri Altman
335046583c FROMGIT: scsi: ufshpb: Do not report victim error in HCM
In host control mode, eviction is precieved as an extreme measure.
There are several conditions that both the entering and exiting regions
should meet, so that eviction will take place.

The common case however, is that those conditions are rarely met, so it
is normal that the act of eviction fails.  Therefore, Do not report an
error in host control mode if eviction fails.

Link: https://lore.kernel.org/r/20210808090024.21721-5-avri.altman@wdc.com
Fixes: 6c59cb501b86 (scsi: ufs: ufshpb: Make eviction depend on region's reads)
(cherry picked from commit 10163cee1f06fc2e17bcf7bbc2982337202d1d5c
git: //git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git for-next)
Signed-off-by: Avri Altman <avri.altman@wdc.com>
Change-Id: Id6aa444ea5e2efd15c507bbd586c421018c75998
2021-11-04 20:28:57 +00:00
Avri Altman
e2766208d7 FROMGIT: scsi: ufshpb: Verify that num_inflight_map_req is non-negative
num_inflight_map_req should not be negative.  It is incremented and
decremented without any protection, allowing it theoretically to be
negative, should some weird unbalanced count occur.

Verify that the those calls are properly serielized.

Link: https://lore.kernel.org/r/20210808090024.21721-4-avri.altman@wdc.com
Fixes: 33845a2d844b (scsi: ufs: ufshpb: Limit the number of in-flight map requests)
(cherry picked from commit 22aede9f48b6766fb67441610120db9b04adf109
git: //git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git for-next)
Signed-off-by: Avri Altman <avri.altman@wdc.com>
Change-Id: I8a8252c919e6678752b60bcd950cb08e765e6aed
2021-11-04 20:28:51 +00:00
Avri Altman
193f33d061 FROMGIT: scsi: ufshpb: Use a correct max multi chunk
In HPB2.0, if pre_req_min_tr_len < transfer_len < pre_req_max_tr_len
the driver is expected to send a HPB-WRITE-BUFFER companion to HPB-READ.

The upper bound should fit into a single byte, regardless of
bMAX_ DATA_SIZE_FOR_HPB_SINGLE_CMD which being an attribute (u32) can
be significantly larger.

To further illustrate the issue let us consider the following scenario:
 - SCSI_DEFAULT_MAX_SECTORS is 1024 limiting the IO chunks to 512KB
 - The OEM changes scsi_host_template .max_sectors to be 2048, which
   allows a 1M requests: transfer_len = 256
 - pre_req_max_tr_len = HPB_MULTI_CHUNK_HIGH = 256
 - ufshpb_is_supported_chunk returns true (256 <= 256)
 - WARN_ON_ONCE(transfer_len > HPB_MULTI_CHUNK_HIGH) doesn't warn
 - ufshpb_set_hpb_read_to_upiu cast transfer_len to u8: transfer_len = 0
 - the command is failing with illegal request

Link: https://lore.kernel.org/r/20210808090024.21721-3-avri.altman@wdc.com
Fixes: 41d8a9333cc9 (scsi: ufs: ufshpb: Add HPB 2.0 support)
(cherry picked from commit 07106f86ae13d9197bfd38c2d47743304b14099e
git: //git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git for-next)
Signed-off-by: Avri Altman <avri.altman@wdc.com>
Change-Id: I0dc568020a0fe6c4ddf6952f89ad5230770fd7f3
2021-11-04 20:28:46 +00:00
Avri Altman
d054108519 FROMGIT: scsi: ufshpb: rewind the read timeout on every read
The "cold"-timer purpose is not to hang-on to active regions with no
reads.  Therefore the read-timeout should be re-wind on every read, and
not just when the region is activated.

Link: https://lore.kernel.org/r/20210808090024.21721-2-avri.altman@wdc.com
Fixes: 13c044e91678 (scsi: ufs: ufshpb: Add "cold" regions timer)
(cherry picked from commit 283e61c5a9bed2c2acde3f50a3f76f09816c0aab
git: //git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git for-next)
Signed-off-by: Avri Altman <avri.altman@wdc.com>
Change-Id: If174a161028cf2382538d69e30181cda979a12de
2021-11-04 20:28:41 +00:00
JianMin Liu
8c2c4d12bb ANDROID: sched: Add vendor hooks for sync_entity_load_avg
Add vendor hooks to monitor more update load-avg point
where tasks on the run-queue will go through.

Bug: 204857484

Signed-off-by: JianMin Liu <jian-min.liu@mediatek.com>
Change-Id: I440d7b9686a37508bd7568454472ab014ba0d0c9
2021-11-04 18:49:18 +00:00
Liujie Xie
2cfefe22b9 ANDROID: GKI: Add symbols to abi_gki_aarch64_oplus
Add some file nodes to control and tune the memcg status in the memory
cgroup, need add some symbols to abi_gki_aarch64_oplus.

Leaf changes summary: 5 artifacts changed
Changed leaf types summary: 0 leaf type changed
Removed/Changed/Added functions summary: 0 Removed, 0 Changed, 3 Added functions
Removed/Changed/Added variables summary: 0 Removed, 0 Changed, 2 Added variables

3 Added functions:

  [A] 'function int cgroup_add_legacy_cftypes(cgroup_subsys*, cftype*)'
  [A] 'function mem_cgroup* mem_cgroup_from_id(unsigned short int)'
  [A] 'function void unregister_memory_notifier(notifier_block*)'

2 Added variables:

  [A] 'cgroup_subsys memory_cgrp_subsys'
  [A] 'static_key_true memory_cgrp_subsys_enabled_key'

Bug: 204860045
Signed-off-by: Liujie Xie <xieliujie@oppo.com>
Change-Id: I69805dcdfbe363c13031ae0a9556761b71a67428
2021-11-04 16:48:18 +00:00
xieliujie
29af14b086 ANDROID: GKI: Update symbols to symbol list
Update symbols to symbol list externed by oem modules.

Leaf changes summary: 4 artifacts changed
Changed leaf types summary: 0 leaf type changed
Removed/Changed/Added functions summary: 0 Removed, 0 Changed, 2 Added functions
Removed/Changed/Added variables summary: 0 Removed, 0 Changed, 2 Added variables

2 Added functions:

  [A] 'function int __traceiter_sched_stat_sleep(void*, task_struct*, u64)'
  [A] 'function int __traceiter_sched_waking(void*, task_struct*)'

2 Added variables:

  [A] 'tracepoint __tracepoint_sched_stat_sleep'
  [A] 'tracepoint __tracepoint_sched_waking'

Bug: 193384408
Change-Id: I9979f21fb3feec8dadc57ef515ab7697cc84e2ca
Signed-off-by: xieliujie <xieliujie@oppo.com>
2021-11-04 01:28:38 +00:00
Eric Biggers
8d7f609cda ANDROID: fips140: add name and version, and a function to retrieve them
This is needed to meet a FIPS 140-3 requirement that modules provide a
service that retrieves their name and versioning information.

Bug: 188620248
Change-Id: I36049c839c4217e3616daab52ec536b46479c12a
Signed-off-by: Eric Biggers <ebiggers@google.com>
(cherry picked from commit 2888f960d09f3af00d1e45f1facd311ccd5b778a)
2021-11-03 09:23:35 -07:00
Eric Biggers
64d769e53f ANDROID: fips140: add service indicators
To satisfy the FIPS 140-3 "service indicators" requirement, add a
function which checks whether the given algorithm is "approved" or not.

Note that this function is a bit different from the module's other APIs
in that it is an exported symbol rather than a registration-based API.
This avoids needing to make kernel/KMI changes, so I think we should do
it this way if possible, given that it's unlikely this function will be
used in practice outside of the lab test.  Built-in code can still call
this function via symbol_get() if it really wants to.

Bug: 188620248
Change-Id: I26c976258fa9446b34eb189bba7154142d85da16
Signed-off-by: Eric Biggers <ebiggers@google.com>
(cherry picked from commit fe4b8d3c687efcf27064e472730291edbd81dad6)
2021-11-03 09:23:35 -07:00
zhengding chen
b9066e59a5 ANDROID: GKI: Update symbols to symbol list
Update symbols to symbol list externed by oem modules.

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

1 Added function:

  [A] 'function int __traceiter_android_vh_cpufreq_acct_update_power(void*, u64, task_struct*, unsigned int)'

1 Added variable:

  [A] 'tracepoint __tracepoint_android_vh_cpufreq_acct_update_power'

Bug: 193384408
Signed-off-by: zhengding chen <chenzhengding@oppo.com>
Change-Id: Ia8b4c3bf3847dd3e61a82bd11c87039fcc2bfbf0
2021-11-03 11:50:19 +00:00
Wei Liu
1eae8229b7 ANDROID: GKI: Update symbols to symbol list
Update symbols to symbol list for OEM extern kernel modules

Leaf changes summary: 6 artifacts changed
Changed leaf types summary: 0 leaf type changed
Removed/Changed/Added functions summary: 0 Removed, 0 Changed, 6 Added functions
Removed/Changed/Added variables summary: 0 Removed, 0 Changed, 0 Added variable

6 Added functions:

  [A] 'function __sum16 __skb_checksum_complete(sk_buff*)'
  [A] 'function int ip6_local_out(net*, sock*, sk_buff*)'
  [A] 'function int ip6_route_me_harder(net*, sock*, sk_buff*)'
  [A] 'function int ip_local_out(net*, sock*, sk_buff*)'
  [A] 'function void nf_ct_attach(sk_buff*, const sk_buff*)'
  [A] 'function void skb_dump(const char*, const sk_buff*, bool)'

Bug: 193384408

Signed-off-by: Wei Liu <liuwei.a@oppo.com>
Change-Id: I054f8eb6214ae1618a987e101aa5ff36c70ccf0d
2021-11-02 17:18:18 +00:00
Lee Jones
aee113fcef ANDROID: Incremental fs: Fix dentry get/put imbalance on vfs_mkdir() failure
Syz{bot,kaller} reports[0]:

  BUG: Dentry ffff888119d8a000{i=0,n=.index}  still in use (1) [unmount of ramfs ramfs]
  ------------[ cut here ]------------
  WARNING: CPU: 0 PID: 367 at fs/dcache.c:1616 umount_check+0x18d/0x1d0 fs/dcache.c:1607
  Modules linked in:
  CPU: 0 PID: 367 Comm: syz-executor388 Not tainted 5.10.75-syzkaller-01082-g234d53d2bb60 #0
  Hardware name: Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
  RIP: 0010:umount_check+0x18d/0x1d0 fs/dcache.c:1607
  Code: 8b 0b 49 81 c6 f8 03 00 00 48 c7 c7 00 40 2e 85 4c 89 e6 48 8b 55 d0 4c 89 e1 45 89 f8 31 c0 41 56 e8 ae d9 9e ff 48 83 c4 08 <0f> 0b e9 f1 fe ff ff 89 d9 80 e1 07 80 c1 03 38 c1 0f 8c c9 fe ff
  RSP: 0018:ffffc9000096f770 EFLAGS: 00010292
  RAX: 0000000000000055 RBX: ffffffff866af200 RCX: 1ad6b89836e5b500
  RDX: 0000000000000000 RSI: 0000000000000002 RDI: 0000000000000000
  RBP: ffffc9000096f7a0 R08: ffffffff81545368 R09: 0000000000000003
  R10: fffff5200012de41 R11: 0000000000000004 R12: ffff888119d8a000
  R13: dffffc0000000000 R14: ffff88811d7373f8 R15: 0000000000000001
  FS:  0000000000000000(0000) GS:ffff8881f7000000(0000) knlGS:0000000000000000
  CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
  CR2: 00007f01b7bddb68 CR3: 000000010c4f0000 CR4: 00000000003506b0
  DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
  DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
  Call Trace:
   d_walk+0x309/0x540 fs/dcache.c:1326
   do_one_tree fs/dcache.c:1623 [inline]
   shrink_dcache_for_umount+0x8e/0x1b0 fs/dcache.c:1639
   generic_shutdown_super+0x66/0x2c0 fs/super.c:447
   kill_anon_super fs/super.c:1108 [inline]
   kill_litter_super+0x75/0xa0 fs/super.c:1117
   ramfs_kill_sb+0x44/0x50 fs/ramfs/inode.c:270
   deactivate_locked_super+0xb0/0x100 fs/super.c:335
   deactivate_super+0xa5/0xd0 fs/super.c:366
   cleanup_mnt+0x45f/0x510 fs/namespace.c:1118
   __cleanup_mnt+0x19/0x20 fs/namespace.c:1125
   task_work_run+0x147/0x1b0 kernel/task_work.c:154
   exit_task_work include/linux/task_work.h:30 [inline]
   do_exit+0x70e/0x23a0 kernel/exit.c:813
   do_group_exit+0x16a/0x2d0 kernel/exit.c:910
   get_signal+0x133e/0x1f80 kernel/signal.c:2790
   arch_do_signal+0x8d/0x620 arch/x86/kernel/signal.c:805
   exit_to_user_mode_loop kernel/entry/common.c:161 [inline]
   exit_to_user_mode_prepare+0xaa/0xe0 kernel/entry/common.c:191
   syscall_exit_to_user_mode+0x24/0x40 kernel/entry/common.c:266
   do_syscall_64+0x3d/0x70 arch/x86/entry/common.c:56
   entry_SYSCALL_64_after_hwframe+0x44/0xa9
  RIP: 0033:0x7f01b7b884f9
  Code: Unable to access opcode bytes at RIP 0x7f01b7b884cf.
  RSP: 002b:00007f01b7b19308 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca
  RAX: fffffffffffffe00 RBX: 00007f01b7c103f8 RCX: 00007f

Which was due to a missing dput() before returning from a vfs_mkdir() failure.

Bug: 203827798
Link: [0] https://syzkaller.appspot.com/bug?extid=81b5ca9b2848f4dad8fa
Reported-by: syzbot+81b5ca9b2848f4dad8fa@syzkaller.appspotmail.com
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Change-Id: Iaef9aa0aecc964645aaca5fe8d79388ae28527bd
2021-11-02 09:01:06 +00:00
Liujie Xie
9cafb6afaa ANDROID: GKI: Update symbols to symbol list
Update symbols to symbol list externed by oem modules.

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

1 Added function:

  [A] 'function int __traceiter_android_vh_cpu_up(void*, unsigned int)'

1 Added variable:

  [A] 'tracepoint __tracepoint_android_vh_cpu_up'

Bug: 193384408
Change-Id: I5c0f08e4a5b07c2277189aabdee1d49f2a690189
Signed-off-by: Liujie Xie <xieliujie@oppo.com>
2021-11-01 17:13:13 +00:00
Suren Baghdasaryan
6ad609468d ANDROID: Fix mmu_notifier imbalance
SPF patchset introduced an mmu_notifier imbalance by adding a new exit
path that skips mmu_notifier_invalidate_range_only_end after calling
mmu_notifier_invalidate_range_start. This triggers a BUG in KVM driver
checking for mmu_notifier_count to remain balanced

Fixes: afeec97a8d ("FROMLIST: mm: prepare for FAULT_FLAG_SPECULATIVE")
Bug: 161210518
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Change-Id: Ibe9d1f0903a23b48c9d733b81249b190e5321c2f
2021-11-01 16:47:30 +00:00
Jindong Yue
62f22f5c05 ANDROID: ABI: Update symbol list for IMX
Add vb2_create_bufs symbol required by vsiv4l2.ko.

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

1 Added function:

  [A] 'function int vb2_create_bufs(vb2_queue*, v4l2_create_buffers*)'

Bug: 194108974
Signed-off-by: Jindong Yue <jindong.yue@nxp.com>
Change-Id: I7b52e5fafbe58889a4bd6cce4f9b3676471e28ce
2021-11-01 15:37:09 +00:00
Jiachiam Liu
f5284c5c9c ANDROID: Update symbol list for mtk
Leaf changes summary: 2 artifacts changed
Changed leaf types summary: 0 leaf type changed
Removed/Changed/Added functions summary: 0 Removed, 0 Changed, 1 Added function
Removed/Changed/Added variables summary: 0 Removed, 0 Changed, 1 Added variable

1 Added function:

  [A] 'function int __traceiter_android_vh_scmi_timeout_sync(void*, int*)'

1 Added variable:

  [A] 'tracepoint __tracepoint_android_vh_scmi_timeout_sync'

Bug: 204502634
Signed-off-by: Jiachiam Liu <jiachiam.liu@mediatek.com>
Change-Id: I3820936488980ba11e581c14424252d35cced7f3
2021-11-01 18:18:23 +08:00
Steve Muckle
8a30a2cadd ANDROID: GKI: update virtual device symbol list
No ABI changes expected.

Bug: 202405948
Signed-off-by: Steve Muckle <smuckle@google.com>
Change-Id: I26010314259d1325999fbe9a640532031a44a6cc
2021-10-30 00:17:37 +00:00
Eric Biggers
cf721d6c46 ANDROID: ABI: add new symbols required by fips140.ko
Add KMI_SYMBOL_LIST_ADD_ONLY=1 to build.config.gki.aarch64.fips140, then
regenerate the fips140 symbol list and ABI XML as follows:

    BUILD_CONFIG=common/build.config.gki.aarch64.fips140 build/build_abi.sh --update-symbol-list
    BUILD_CONFIG=common/build.config.gki.aarch64 build/build_abi.sh --update --print-report

Leaf changes summary: 7 artifacts changed
Changed leaf types summary: 0 leaf type changed
Removed/Changed/Added functions summary: 0 Removed, 0 Changed, 7 Added functions
Removed/Changed/Added variables summary: 0 Removed, 0 Changed, 0 Added variable

7 Added functions:

  [A] 'function int ahash_register_instance(crypto_template*, ahash_instance*)'
  [A] 'function int crypto_grab_spawn(crypto_spawn*, crypto_instance*, const char*, u32, u32)'
  [A] 'function int crypto_register_aeads(aead_alg*, int)'
  [A] 'function int crypto_register_ahashes(ahash_alg*, int)'
  [A] 'function int crypto_register_rng(rng_alg*)'
  [A] 'function crypto_tfm* crypto_spawn_tfm(crypto_spawn*, u32, u32)'
  [A] 'function void crypto_unregister_rng(rng_alg*)'

Bug: 188620248
Change-Id: Ibc066a431decc123f428ecf5ae0b51b1ad838a8a
Signed-off-by: Eric Biggers <ebiggers@google.com>
2021-10-29 14:32:49 -07:00
Eric Biggers
482b0323cf ANDROID: fips140: zeroize temporary values from integrity check
FIPS 140-3 requires this for some reason.

Bug: 188620248
Change-Id: I7c286532097e1d8971faf4d8be31b801f9007e3b
Signed-off-by: Eric Biggers <ebiggers@google.com>
(cherry picked from commit c14d52059bd86d27ce3c8e581196b011d0cc4d32)
2021-10-29 13:32:14 -07:00
Eric Biggers
ecf9341134 ANDROID: fips140: remove in-place updating of live algorithms
The lab has confirmed that it is actually fine for users to keep using
non-FIPS code after the module has loaded if they were already using it
beforehand.  So remove the code that tried to prevent this by updating
live algorithms in-place.  Similarly, remove the call to
synchronize_rcu_tasks() which no longer has any purpose.

We still need to move the live algorithms to a private list, so keep
doing that.  Keep appending "+orig" to cra_name as well, and start doing
the same for cra_driver_name too.

Bug: 188620248
Change-Id: I29c9faec7d7314484a03f9729924b2f892552c7c
Signed-off-by: Eric Biggers <ebiggers@google.com>
(cherry picked from commit 54aecb72dba94d1bb68844af6e4790b5823fb6ce)
2021-10-29 13:32:14 -07:00
Eric Biggers
e45108ecff ANDROID: fips140: block crypto operations until tests complete
As per the new guidance from the lab, the module must block crypto
operations until the tests have completed.  It's unclear what this means
exactly (given that technically this is impossible), but let's make some
changes that should be enough to comply with the requirement's intent.

First, register the library functions and update the live algorithms
after the tests rather than before the tests.  This is a trivial change.

Much more problematic is the fact that the algorithms are registered
with the kernel's crypto framework before the tests run, as the tests
depend on the framework.  Unfortunately, the lab believes that the
kernel isn't allowed to enforce the ordering here; the module itself
must.  Moreover, trying to solve this by copying the crypto API
framework into the module proved to be heavily problematic.

Thus, implement an alternate solution: make the module override the tfm
initialization function of every algorithm it registers, so that it can
wait for the tests to complete before allowing the use of any algorithm.
This is sufficient if the user makes a supported sequence of API calls.

Bug: 153614920
Bug: 188620248
Change-Id: I11ffba90c08114dda4e91c4be7ce8b608c4e14c1
Signed-off-by: Eric Biggers <ebiggers@google.com>
(cherry picked from commit 02e48f383b2acb42c85028563cc75453842f11ce)
2021-10-29 13:32:14 -07:00
Ard Biesheuvel
6b995f5a54 ANDROID: fips140: preserve RELA sections without relying on the module loader
Instead of having a special case in the core kernel's module loader that
treats a module called 'fips140.ko' in a special way, use a host tool to
tweak the ELF metadata of this module so that the RELA data is preserved
and accessible to the module init code.

This is done in the following way:
- each RELA section that we care about (the ones for .text and .rodata
  at the moment) is copied into a new section called .init.rela.<name>
  with the SHF_ALLOC attribute, so that the module loader will copy it
  into __init memory at load time;
- for each such section, an offset/count tuple is added as a global
  variable to the module;
- the count field of those tuples is populated directly by the host tool
  based on the actual size of the RELA section in question;
- the offset field is decorated with a place-relative relocation against
  the start of the copied RELA section via a weak symbol reference,
  which causes an entry to be emitted into the ELF symbol table;
- these ELF symbol table entries are updated by the host tool and turned
  into STT_SECTION type symbols with STB_GLOBAL linkage, carrying the
  correct section index.

With these changes in place, the unmodified module loader will load all
required information into memory in a way that permits the module init
code to locate the relocations, and apply them in reverse.

Bug: 153614920
Bug: 188620248
Change-Id: I07d9704febdf913834502dd09c19aa4a04d983b1
Signed-off-by: Ard Biesheuvel <ardb@google.com>
(cherry picked from commit 502af6e3490d3ed51cf2131306303445b0d56579)
2021-10-29 13:32:14 -07:00
Ard Biesheuvel
e8d56bd78b ANDROID: module: apply special LTO treatment to .text even if CFI is disabled
We currently only emit directives for handling the .text section into
the module linker script if both LTO and CFI are enabled, while for
other sections, we do this even if CFI is not enabled. This is
inconsistent at best, but as it also interferes with the assumption in
the fips140.ko module that the .text._start and .text._end input
sections are placed at the very start and end of the .text section,
which currently can only be relied upon if CFI is enabled.

So rearrange the #ifdef so that it only covers the .text.__cfi_check
input section. Note that aligning to page size is likely to be redundant
in any case, given that the .text section is laid out first, and module
allocations are page aligned to begin with, so making that part
unconditional is unlikely to make an observeable difference in the
output.

Bug: 153614920
Bug: 188620248
Fixes: 6be141eb36 ("ANDROID: crypto: fips140 - perform load time integrity check")
Change-Id: I3f9ed0ae8fa8fe5693c8d2964566cbb42c101aa7
Signed-off-by: Ard Biesheuvel <ardb@google.com>
(cherry picked from commit 6ae8277450ae86113cf7eea8b8348e509e2cc72d)
2021-10-29 13:32:13 -07:00
Eric Biggers
52b70d491b ANDROID: fips140: use FIPS140_CFLAGS when compiling fips140-selftests.c
These flags are supposed to be used when building all source files for
the module.

Bug: 188620248
Fixes: b7397e89db ("ANDROID: fips140: add power-up cryptographic self-tests")
Change-Id: I41cacff040c8a8a0065dd3cfc537303f1ff18335
Signed-off-by: Eric Biggers <ebiggers@google.com>
(cherry picked from commit 422bc2feb7e3e800a6c75a25795c7786794b7f2d)
2021-10-29 13:32:13 -07:00
Eric Biggers
e5b14396f9 ANDROID: fips140: take into account AES-GCM not being approvable
Unfortunately, the AES-GCM implementations won't actually be able to be
FIPS-approved.  One consequence of this is that the "cmac" template will
need to be tested with all underlying "aes" implementations, as the
equivalent test with "gcm" won't count as fulfilling the requirement to
test all AES implementations in an authenticated mode when supported.
Update the self-tests and comments accordingly.

Bug: 153614920
Bug: 188620248
Change-Id: I874b0718a5ff9d4e2dea2353448266e87f3f0d0b
Signed-off-by: Eric Biggers <ebiggers@google.com>
(cherry picked from commit a9765fb6dc441dff749b1120ce13180c5561f69e)
2021-10-29 13:32:13 -07:00
Eric Biggers
960ebb2b56 ANDROID: fips140: add jitterentropy to fips140 module
Although jitterentropy doesn't necessarily need to be part of
fips140.ko, it does need to have the SP800-90B health tests enabled, and
that requires that it be compiled with the fips_enabled flag set.  The
easiest way to do this is just to include a copy of it in fips140.ko.

Bug: 153614920
Bug: 188620248
Change-Id: I9dc0281e07e08e0650e3d340897c697722ad3b1a
Signed-off-by: Eric Biggers <ebiggers@google.com>
(cherry picked from commit cae242110570eb204b1a332b717aaa35eb16647d)
2021-10-29 13:32:13 -07:00
Eric Biggers
2ee56aad31 ANDROID: fips140: add AES-CMAC
AES-CMAC is a FIPS allowed algorithm, and fips140.ko already has
arm64 implementations of it.  Meanwhile, GKI includes both these arm64
implementations as well as the "cmac" template.  Add the "cmac" template
to fips140.ko too and add a self-test for AES-CMAC, so that we can
include AES-CMAC in the set of algorithms which will be certified.

As with a number of the other algorithms, the criteria for which
algorithms need to be in the certified set are still not particularly
clear, but the latest guidance we've received is to error on the side of
including algorithms.

Bug: 153614920
Bug: 188620248
Change-Id: I6c1d9281fe848a7101d5ef94ab48e5a41bbcc6f8
Signed-off-by: Eric Biggers <ebiggers@google.com>
(cherry picked from commit 038dc9f2cc956cab561bd9d50120920010867b75)
2021-10-29 13:32:13 -07:00
Eric Biggers
2b5843ae2d ANDROID: fips140: add AES-CBC-CTS
AES-CBC-CTS is a FIPS allowed algorithm, and fips140.ko already has
arm64 implementations of it.  Meanwhile, GKI includes both these arm64
implementations as well as the "cts" template.  Add the "cts" template
to fips140.ko too and add a self-test for AES-CBC-CTS, so that we can
include AES-CBC-CTS in the set of algorithms which will be certified.

There appears to be no support for CBC-CTS mode in pycryptodome or
python-cryptography, so I manually added the test vector.

As with a number of the other algorithms, the criteria for which
algorithms need to be in the certified set are still not particularly
clear, but the latest guidance we've received is to error on the side of
including algorithms.  Android uses AES-CBC-CTS for filenames
encryption, which may be relevant (though arguably this use case doesn't
actually require a FIPS approved algorithm).

Bug: 153614920
Bug: 188620248
Change-Id: I53ffbd1d38493592eeaf471bc0007978ec400878
Signed-off-by: Eric Biggers <ebiggers@google.com>
(cherry picked from commit e2cfdfbc51b442a9ca96d5fad8060fb02a364eb4)
2021-10-29 13:32:13 -07:00
Eric Biggers
1be58af077 ANDROID: fips140: remove non-prediction-resistant DRBG test
The lab has confirmed that this test is not required.

Bug: 153614920
Bug: 188620248
Change-Id: Ie55031beacd00f093db3a7ba30fe0844a2ce363b
Signed-off-by: Eric Biggers <ebiggers@google.com>
(cherry picked from commit ea902862eaeb9b84a94652656b95bf5ac4287a73)
2021-10-29 13:32:13 -07:00
Eric Biggers
17ccefe140 ANDROID: fips140: use full 16-byte IV
By using the initial_value parameter when creating the pycryptodome
AES-CTR instance, we can use any 16-byte IV, like the other AES modes.
Therefore, there's no need for the last 4 bytes of the IV to be 0.
This doesn't really matter, but it seems nice to avoid this quirk.

Bug: 153614920
Bug: 188620248
Change-Id: If33de260b1119f2b3e004164199b08364781ab23
Signed-off-by: Eric Biggers <ebiggers@google.com>
(cherry picked from commit fa5a44b364374dd3ed53215b9edf47ffee8a1a82)
2021-10-29 13:32:13 -07:00
Eric Biggers
b397a0387c ANDROID: fips140: test all implementations
Test all implementations of each algorithm rather than just the highest
priority implementation.  This aligns with the revised guidance we have
received from the lab.

We can still skip some tests in some cases, as per the FIPS 140-2
Implementation Guidance document.  See the comments for details.

To align with the new scope of the tests, the fips140.broken_alg module
parameter now must specify an implementation (e.g. "sha256-ce") rather
than an algorithm (e.g. "sha256").

No change to the DRBG tests is required, as it turns out the module only
includes HMAC_DRBG.  However, clarify the comment about the DRBG tests.

On a Pixel device, this increases the running time of the fips140 tests
from 0.5ms to 3.1 ms (very roughly; there's a lot of variation).  This
is still very fast, so it isn't expected to be a problem.

Bug: 153614920
Bug: 173104584
Bug: 188620248
Change-Id: I555b535dd45f0164b7744a2c9338c501bb88de86
Signed-off-by: Eric Biggers <ebiggers@google.com>
(cherry picked from commit abe07806964be48e8d0005e26f33632ace5e4152)
2021-10-29 13:32:12 -07:00
Bicycle Tsai
82c940e0e1 ANDROID: Update symbol list for mtk
Generated with:
BUILD_CONFIG=common/build.config.gki.aarch64 build/build_abi.sh --update

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

1 Added function:

  [A] 'function int
__traceiter_android_vh_snd_soc_card_get_comp_chain(void*, bool*)'

1 Added variable:

  [A] 'tracepoint __tracepoint_android_vh_snd_soc_card_get_comp_chain'

Bug: 198732156
Signed-off-by: Bicycle Tsai <bicycle.tsai@mediatek.com>
Change-Id: I1327ec4b1ba8df264007ebdeab86c15785d5a46a
2021-10-29 23:37:17 +08:00
Bicycle Tsai
8d68a30fe1 ANDROID: ASoC: soc-pcm: Get all BEs along DAPM path
dpcm_end_walk_at_be() stops the graph walk when first BE is found for
the given FE component. In a component model we may want to connect
multiple DAIs from different components.

android_vh_snd_soc_card_get_comp_chain can be registered here
to allows DAI/component chaining.

Later PCM operations can be called for all these listed components for a
valid DAPM path.

ALSA machine driver can setup component_chaining like below code slice.

static void my_board_component_chaining_hook(void *data, bool *ret)
{
        *ret = true;
}

static int my_board_dev_probe(struct platform_device *pdev)
{

        register_trace_android_vh_snd_soc_card_get_comp_chain(
                my_board_component_chaining_hook, NULL);

        return 0;
}

static int my_board_dev_remove(struct platform_device *pdev)
{
        unregister_trace_android_vh_snd_soc_card_get_comp_chain(
                my_board_component_chaining_hook, NULL);

        return 0;
}

static struct platform_driver my_board_driver = {
        ...
        .probe = my_board_dev_probe,
        .remove = my_board_dev_remove,
        ...
};

Bug: 198732156
Signed-off-by: Bicycle Tsai <bicycle.tsai@mediatek.com>
Change-Id: Ife5df291d40af9ec83d57462b6a08aba95d9119d
2021-10-29 22:04:59 +08:00
Giuliano Procida
ea440234c7 ANDROID: GKI: refresh XML following ANDROID_KABI_USE change
The ABI diff is essentially bogus, but included here for completeness.

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

'struct xhci_hcd at xhci.h:1756:1' changed:
  type size hasn't changed
  1 data member deletion:
    'union {xhci_vendor_ops* vendor_ops; struct {u64 android_kabi_reserved1;} __UNIQUE_ID_android_kabi_hide322; union {};}', at offset 59392 (in bits) at xhci.h:1935:1
  18 impacted interfaces

Bug: 210255585
Change-Id: Ic646e0edd2ab19fcd9b7b88b6e6a604299fc4824
Signed-off-by: Giuliano Procida <gprocida@google.com>
2021-10-29 11:11:40 +01:00
Greg Kroah-Hartman
f8b361d17d ANDROID: GKI: rework the ANDROID_KABI_USE() macro to not use __UNIQUE()
The __UNIQUE_ID() macro causes problems as it turns out to not be
deterministic across different compiler runs as it relies on the
__COUNTER__ macro which could have been used on other .h files previous
to this .h file being included.

This shows up specifically when building with "LTO=thin" vs. "LTO=full"
as different build paths seem to be triggered.

As the structure name isn't really needed at all here, we were just
including it for older compilers that could not handle anonymous
structures in a union, just drop the whole thing which resolves the abi
naming issue.

Bug: 210255585
Reported-by: Giuliano Procida <gprocida@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I6b9449fa9d26ffc5d66b2f0f3b41e2d5f3003f68
2021-10-29 10:57:02 +01:00
Woody Lin
ad8da78c87 UPSTREAM: sched/scs: Reset the shadow stack when idle_task_exit
Commit f1a0a376ca0c ("sched/core: Initialize the idle task with
preemption disabled") removed the init_idle() call from
idle_thread_get(). This was the sole call-path on hotplug that resets
the Shadow Call Stack (scs) Stack Pointer (sp).

Not resetting the scs-sp leads to scs overflow after enough hotplug
cycles. Therefore add an explicit scs_task_reset() to the hotplug code
to make sure the scs-sp does get reset on hotplug.

Fixes: f1a0a376ca0c ("sched/core: Initialize the idle task with preemption disabled")
Signed-off-by: Woody Lin <woodylin@google.com>
[peterz: Changelog]
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Valentin Schneider <valentin.schneider@arm.com>
Link: https://lore.kernel.org/r/20211012083521.973587-1-woodylin@google.com
(cherry picked from commit 63acd42c0d4942f74710b11c38602fb14dea7320)
Bug: 201047587
Bug: 201771367
Change-Id: I9e48270f8d4c698c140cc3f427cadae636acb6d7
2021-10-29 01:25:30 +00:00
Tengfei Fan
74782dd0ce ANDROID: cpuhp/pause: add function define if not define CONFIG_CPUSETS
Add define of cpuset_update_active_cpus_affine() for fix compile error
when not define CONFIG_CPUSETS.

Bug: 204347727
Fixes: 09bd9e940e ("ANDROID: cpuhp/pause: schedule cpu_hotplug_work on
resume cpu")
Change-Id: Icf79df5e22233d15e4e8257a5f54176efbcd975b
Signed-off-by: Tengfei Fan <quic_tengfan@quicinc.com>
Signed-off-by: Maria Yu <quic_aiquny@quicinc.com>
2021-10-28 15:12:01 +00:00
Liangliang Li
75a5637ccf ANDROID: GKI: Add a symbol to vendor symbol list
Functions changes summary: 0 Removed, 0 Changed (2375 filtered out), 2 Added functions
Variables changes summary: 0 Removed, 0 Changed (24 filtered out), 2 Added variables

2 Added functions:

  [A] 'function int __traceiter_android_vh_filemap_fault_cache_page(void*, vm_fault*, page*)'
  [A] 'function int __traceiter_android_vh_filemap_fault_get_page(void*, vm_fault*, page**, bool*)'

2 Added variables:

  [A] 'tracepoint __tracepoint_android_vh_filemap_fault_cache_page'
  [A] 'tracepoint __tracepoint_android_vh_filemap_fault_get_page'

Bug: 204163778

Change-Id: I579eedf59470f5c806e28abe7148a99e52b1ff90
Signed-off-by: Liangliang Li <liliangliang@vivo.com>
2021-10-28 02:01:57 +00:00
Jaegeuk Kim
1c0e68339c ANDROID: f2fs: fix potential deadlock by android ftrace
sb_internal#2 --> &s->s_dquot.dqio_sem --> fs_reclaim

  Possible unsafe locking scenario:

        CPU0                    CPU1
        ----                    ----
   lock(fs_reclaim);
                                lock(&s->s_dquot.dqio_sem);
                                lock(fs_reclaim);
   lock(sb_internal#2);

 *** DEADLOCK ***

 3 locks held by kswapd0/133:
  #0: ffffffda597c93a8 (fs_reclaim){+.+.}-{0:0}, at: __fs_reclaim_acquire+0x4/0x50
  #1: ffffffda597bc890 (shrinker_rwsem){++++}-{3:3}, at: shrink_slab+0xa0/0x19c
  #2: ffffff80d5fb90e0 (&type->s_umount_key#50){.+.+}-{3:3}, at: super_cache_scan+0x40/0x1dc

stack backtrace:
 CPU: 7 PID: 133 Comm: kswapd0 Tainted: G        W  O      5.10.43-android12-9-g4665ec64f3df #1
 Hardware name: MT6879(ENG) (DT)
 Call trace:
  dump_backtrace.cfi_jt+0x0/0x8
  show_stack+0x1c/0x2c
  dump_stack_lvl+0xd8/0x16c
  print_circular_bug+0x2d4/0x2d8
  check_noncircular+0x190/0x1a4
  validate_chain+0xc54/0x2d34
  __lock_acquire+0x7e4/0xed4
  lock_acquire+0x114/0x394
  f2fs_evict_inode+0x1a0/0x8b8
  evict+0xd4/0x2f8
  iput+0x1c0/0x258
  dentry_unlink_inode+0x16c/0x1dc
  __dentry_kill+0x128/0x280
  shrink_dentry_list+0x6c/0x420
  prune_dcache_sb+0x5c/0x90
  super_cache_scan+0x13c/0x1dc
  do_shrink_slab+0x1e0/0x388
  shrink_slab+0xf4/0x19c
  shrink_node_memcgs+0x80/0x25c
  shrink_node+0x324/0x710
  balance_pgdat+0x3a8/0x6a8
  kswapd+0x484/0x594
  kthread+0x15c/0x1ac
  ret_from_fork+0x10/0x30

Bug: 201025620
Signed-off-by: Jaegeuk Kim <jaegeuk@google.com>
Change-Id: Idaa303eb7c681a56ad5d4e1f6dddbda71f7fece4
2021-10-27 18:37:38 +00:00
Dan Vacura
8d5dd0a5a4 ANDROID: gki_defconfig: enable CONFIG_USB_CONFIGFS_F_UVC
Enable the UVC function driver to allow USB gadgets
to connect as a standard video device to a host.

Bug: 200712777
Signed-off-by: Dan Vacura <w36195@motorola.com>
Change-Id: Ia037f8560664f9e98f28f3fede609764d5d5699d
2021-10-27 12:55:32 +00:00
Jiewen Wang
d4091df63c ANDROID: GKI: Update symbols list for vivo
Add symbol to symbol list for oem module.

Functions changes summary: 0 Removed, 0 Changed (2375 filtered out), 1
Added functions
Variables changes summary: 0 Removed, 0 Changed (24 filtered out), 1
Added variables

1 Added function:

  [A] 'function int __traceiter_android_vh_shrink_slab_bypass(void*,
gfp_t, int, mem_cgroup*, int, bool*)'

1 Added variable:

  [A] 'tracepoint __tracepoint_android_vh_shrink_slab_bypass'

Bug: 204278767
Change-Id: I075f034ddad2657435429a9f712322a3a207caa6
Signed-off-by: Jiewen Wang <jiewen.wang@vivo.com>
2021-10-27 17:37:32 +08:00
Giuliano Procida
a451a6c447 ANDROID: GKI: Add missing symbol list whitespace
The missing leading whitespace in android/abi_gki_aarch64_galaxy
caused its symbols to be dropped from the distribution
abi_symbollist file and the distribution vmlinux binary.

Bug: 203852249
Change-Id: I7854401e0a55ad89beacde588c24f1d1698e9e17
Signed-off-by: Giuliano Procida <gprocida@google.com>
2021-10-27 07:45:39 +00:00
Greg Kroah-Hartman
a32d8ee384 Revert "ANDROID: mpam: add vendor hook to record MPAM"
This reverts commit 1aa1f6a7cf.

The hook android_vh_mpam_set is not used by any vendor, so remove
it to help with merge issues with future LTS releases.

If this is needed by any real user, it can easily be reverted to add it
back and then the symbol should be added to the abi list at the same
time to prevent it from being removed again later.

Bug: 203756332
Bug: 165333282
Cc: C-J.Chen <C-J.Chen@mediatek.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I18356743538df7d41a00f54479bf2a0bc3a62e06
2021-10-27 08:05:03 +02:00
Aaron Ding
2ccbb92f7f ANDROID: userfaultfd: Fix merge resolution: validate_range()
On the android12-5.10 branch, commit 4a5cf92412 ("BACKPORT: FROMGIT:
userfaultfd: add UFFDIO_CONTINUE ioctl") added a new call site for the
function validate_range(). Meanwhile, on the 5.10 stable branch, commit
0b591c020d ("userfaultfd: do not untag user pointers") changed the
function signature of validate_range() and updated all call sites
accordingly. However, since these two commits happened on different
branches, the new call site in userfaultfd_continue() has not been
updated accordingly. This has arguably been missed in the merge commit
66379c1ee5 ("Merge tag 'android12-5.10.66_r00' into
android12-5.10").

This patch fixes the following build breakage

./common/fs/userfaultfd.c:1875:32: error: incompatible pointer to integer conversion passing '__u64 *' (aka 'unsigned long long *') to parameter of type '__u64' (aka 'unsigned long long'); remove & [-Werror,-Wint-conversion]

        ret = validate_range(ctx->mm, &uffdio_continue.range.start,
                                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
./common/fs/userfaultfd.c:1245:14: note: passing argument to parameter 'start' here
                                          __u64 start, __u64 len)
                                                ^
1 error generated.

Fixes: 66379c1ee5 ("Merge tag 'android12-5.10.66_r00' into android12-5.10")
Signed-off-by: Aaron Ding <aaronding@google.com>
Signed-off-by: Daniel Mentz <danielmentz@google.com>
Signed-off-by: Elliot Berman <quic_eberman@quicinc.com>
Change-Id: I7ad40df213897314c439480f22a2ef4712e84025
(cherry picked from commit 5ec931a85350cd1914f53949d32214583421e155)
2021-10-26 21:43:22 +00:00
Tengfei Fan
09bd9e940e ANDROID: cpuhp/pause: schedule cpu_hotplug_work on resume cpu
Resume cpu need to run cpuset_hotplug_workfn which need take
about several milliseconds, and even more if the system have
more tasks.
This isn't suitable to run in the main task context of resume
cpu.
Due to the cpu which is resuming only have active mask,
but still not rebuild sched domain, make this slow
work run on resuming cpu can not take extra overload to
previous active cpus.

Bug: 203839955
Fixes: 1d3a64fbd2 ("ANDROID: cpu/hotplug: rebuild sched
domains immediately")
Change-Id: Ia7bdd077f982950c02696c3598a41b2482046220
Signed-off-by: Tengfei Fan <quic_tengfan@quicinc.com>
Signed-off-by: Maria Yu <quic_aiquny@quicinc.com>
2021-10-26 19:57:45 +00:00
Liujie Xie
2a813b466b ANDROID: GKI: Update symbols to abi_gki_aarch64_oplus
Update symbols to symbol list externed by oem modules.

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

5 Added functions:

  [A] 'function int __traceiter_android_vh_mem_cgroup_alloc(void*, mem_cgroup*)'
  [A] 'function int __traceiter_android_vh_mem_cgroup_css_offline(void*, cgroup_subsys_state*, mem_cgroup*)'
  [A] 'function int __traceiter_android_vh_mem_cgroup_css_online(void*, cgroup_subsys_state*, mem_cgroup*)'
  [A] 'function int __traceiter_android_vh_mem_cgroup_free(void*, mem_cgroup*)'
  [A] 'function int __traceiter_android_vh_mem_cgroup_id_remove(void*, mem_cgroup*)'

5 Added variables:

  [A] 'tracepoint __tracepoint_android_vh_mem_cgroup_alloc'
  [A] 'tracepoint __tracepoint_android_vh_mem_cgroup_css_offline'
  [A] 'tracepoint __tracepoint_android_vh_mem_cgroup_css_online'
  [A] 'tracepoint __tracepoint_android_vh_mem_cgroup_free'
  [A] 'tracepoint __tracepoint_android_vh_mem_cgroup_id_remove'

Bug: 193384408
Change-Id: Ia5112f375626f04481b0042ec808c67f78891086
Signed-off-by: Liujie Xie <xieliujie@oppo.com>
2021-10-26 23:54:35 +08:00