From a1a4c802659b30cd49269156661268d4b6da0a49 Mon Sep 17 00:00:00 2001 From: Daeho Jeong Date: Sun, 25 Jul 2021 21:18:19 -0700 Subject: [PATCH 01/18] UPSTREAM: f2fs: change fiemap way in printing compression chunk When we print out a discontinuous compression chunk, it shows like a continuous chunk now. To show it more correctly, I've changed the way of printing fiemap info like below. Plus, eliminated NEW_ADDR(-1) in fiemap info, since it is not in fiemap user api manual. Let's assume 16KB compression cluster. Logical Physical Length Flags 0: 0000000000000000 00000002c091f000 0000000000004000 1008 1: 0000000000004000 00000002c0920000 0000000000004000 1008 ... 9: 0000000000034000 0000000f8c623000 0000000000004000 1008 10: 0000000000038000 000000101a6eb000 0000000000004000 1008 0: 0000000000000000 00000002c091f000 0000000000004000 1008 1: 0000000000004000 00000002c0920000 0000000000004000 1008 ... 9: 0000000000034000 0000000f8c623000 0000000000001000 1008 10: 0000000000035000 000000101a6ea000 0000000000003000 1008 11: 0000000000038000 000000101a6eb000 0000000000002000 1008 12: 000000000003a000 00000002c3544000 0000000000002000 1008 Flags 0x1000 => FIEMAP_EXTENT_MERGED 0x0008 => FIEMAP_EXTENT_ENCODED Signed-off-by: Daeho Jeong Tested-by: Eric Biggers Signed-off-by: Jaegeuk Kim Bug: 205123902 (cherry picked from commit 093f0bac32b617960899c7e00f4550373c383dd0) Change-Id: Id140cc153be1213c4823b24076a6da0684e195ba Signed-off-by: Daeho Jeong --- fs/f2fs/data.c | 75 ++++++++++++++++++++++++++++---------------------- 1 file changed, 42 insertions(+), 33 deletions(-) diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c index 4a986daad16b..9fb150cca9d7 100644 --- a/fs/f2fs/data.c +++ b/fs/f2fs/data.c @@ -1859,8 +1859,9 @@ int f2fs_fiemap(struct inode *inode, struct fiemap_extent_info *fieinfo, u64 logical = 0, phys = 0, size = 0; u32 flags = 0; int ret = 0; - bool compr_cluster = false; + bool compr_cluster = false, compr_appended; unsigned int cluster_size = F2FS_I(inode)->i_cluster_size; + unsigned int count_in_cluster = 0; loff_t maxbytes; if (fieinfo->fi_flags & FIEMAP_FLAG_CACHE) { @@ -1908,15 +1909,17 @@ next: map.m_next_pgofs = &next_pgofs; map.m_seg_type = NO_CHECK_TYPE; - if (compr_cluster) - map.m_len = cluster_size - 1; + if (compr_cluster) { + map.m_lblk += 1; + map.m_len = cluster_size - count_in_cluster; + } ret = f2fs_map_blocks(inode, &map, 0, F2FS_GET_BLOCK_FIEMAP); if (ret) goto out; /* HOLE */ - if (!(map.m_flags & F2FS_MAP_FLAGS)) { + if (!compr_cluster && !(map.m_flags & F2FS_MAP_FLAGS)) { start_blk = next_pgofs; if (blks_to_bytes(inode, start_blk) < blks_to_bytes(inode, @@ -1926,6 +1929,14 @@ next: flags |= FIEMAP_EXTENT_LAST; } + compr_appended = false; + /* In a case of compressed cluster, append this to the last extent */ + if (compr_cluster && ((map.m_flags & F2FS_MAP_UNWRITTEN) || + !(map.m_flags & F2FS_MAP_FLAGS))) { + compr_appended = true; + goto skip_fill; + } + if (size) { flags |= FIEMAP_EXTENT_MERGED; if (IS_ENCRYPTED(inode)) @@ -1942,39 +1953,37 @@ next: if (start_blk > last_blk) goto out; - if (compr_cluster) { - compr_cluster = false; - - - logical = blks_to_bytes(inode, start_blk - 1); - phys = blks_to_bytes(inode, map.m_pblk); - size = blks_to_bytes(inode, cluster_size); - - flags |= FIEMAP_EXTENT_ENCODED; - - start_blk += cluster_size - 1; - - if (start_blk > last_blk) - goto out; - - goto prep_next; - } - +skip_fill: if (map.m_pblk == COMPRESS_ADDR) { compr_cluster = true; - start_blk++; - goto prep_next; + count_in_cluster = 1; + } else if (compr_appended) { + unsigned int appended_blks = cluster_size - + count_in_cluster + 1; + size += blks_to_bytes(inode, appended_blks); + start_blk += appended_blks; + compr_cluster = false; + } else { + logical = blks_to_bytes(inode, start_blk); + phys = __is_valid_data_blkaddr(map.m_pblk) ? + blks_to_bytes(inode, map.m_pblk) : 0; + size = blks_to_bytes(inode, map.m_len); + flags = 0; + + if (compr_cluster) { + flags = FIEMAP_EXTENT_ENCODED; + count_in_cluster += map.m_len; + if (count_in_cluster == cluster_size) { + compr_cluster = false; + size += blks_to_bytes(inode, 1); + } + } else if (map.m_flags & F2FS_MAP_UNWRITTEN) { + flags = FIEMAP_EXTENT_UNWRITTEN; + } + + start_blk += bytes_to_blks(inode, size); } - logical = blks_to_bytes(inode, start_blk); - phys = blks_to_bytes(inode, map.m_pblk); - size = blks_to_bytes(inode, map.m_len); - flags = 0; - if (map.m_flags & F2FS_MAP_UNWRITTEN) - flags = FIEMAP_EXTENT_UNWRITTEN; - - start_blk += bytes_to_blks(inode, size); - prep_next: cond_resched(); if (fatal_signal_pending(current)) From 7a7b5f89d96f514a0754957debeca3c6936bc580 Mon Sep 17 00:00:00 2001 From: mazhenhua Date: Wed, 10 Nov 2021 11:16:06 +0800 Subject: [PATCH 02/18] ANDROID: locking/rwsem: only clean RWSEM_FLAG_HANDOFF when already set sem->count will be negative after writer is killed if flag RWSEM_FLAG_HANDOFF is not set, we shouldn't clean again CPU2 CPU4 task A[reader] task B[writer] down_read_killable[locked] sem->count=0x100 down_write_killable sem->count=0x102[wlist not empty] up_read count=0x2 sig kill received down_read_killable sem->count=0x102[wlist not empty] goto branch out_nolock: list_del(&waiter.list); wait list is empty sem->count-RWSEM_FLAG_HANDOFF sem->count=0xFE list_empty(&sem->wait_list) is TRUE sem->count andnot RWSEM_FLAG_WAITERS sem->count=0xFC up_read sem->count-=0x100 sem->count=0xFFFFFFFFFFFFFFFC DEBUG_RWSEMS_WARN_ON(tmp < 0, sem); Bug: 204595609 Link: https://lore.kernel.org/all/a630a9aa-8c66-31c9-21a0-3d30bde2c9df@redhat.com/T/ Signed-off-by: mazhenhua Change-Id: Ife64c179335d74768a3d68e402c72d10148f3e7e --- kernel/locking/rwsem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/locking/rwsem.c b/kernel/locking/rwsem.c index e0505b9b8a31..7b0d64f0d550 100644 --- a/kernel/locking/rwsem.c +++ b/kernel/locking/rwsem.c @@ -1287,7 +1287,7 @@ out_nolock: list_del(&waiter.list); if (unlikely(wstate == WRITER_HANDOFF)) - atomic_long_add(-RWSEM_FLAG_HANDOFF, &sem->count); + atomic_long_andnot(RWSEM_FLAG_HANDOFF, &sem->count); if (list_empty(&sem->wait_list)) atomic_long_andnot(RWSEM_FLAG_WAITERS, &sem->count); From 1b841d3a448dfcbf480b46ec136ba3769fb1ddef Mon Sep 17 00:00:00 2001 From: Pavankumar Kondeti Date: Tue, 9 Nov 2021 09:55:01 +0530 Subject: [PATCH 03/18] ANDROID: consolidate.fragment: Enable usbmon usbmon allows capturing the USB bus traffic and receive it via debugfs. This is really helpful in debugging USB host mode issues. Bug: 206600530 Change-Id: I9c16d5a73d43ec2b0efc1770dd049ffb7b8cc857 Signed-off-by: Pavankumar Kondeti --- arch/arm64/configs/consolidate.fragment | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/configs/consolidate.fragment b/arch/arm64/configs/consolidate.fragment index 02dd9b4843fc..6db8abeb7c18 100644 --- a/arch/arm64/configs/consolidate.fragment +++ b/arch/arm64/configs/consolidate.fragment @@ -95,3 +95,4 @@ CONFIG_TASKS_RUDE_RCU=y # CONFIG_TEST_VMALLOC is not set # CONFIG_TEST_XARRAY is not set CONFIG_TRACE_PREEMPT_TOGGLE=y +CONFIG_USB_MON=y From 8630facf34057a107e55b0e0138f7c5841908119 Mon Sep 17 00:00:00 2001 From: Rick Yiu Date: Tue, 16 Nov 2021 12:25:03 +0800 Subject: [PATCH 04/18] Revert "sched/fair: Ensure _sum and _avg values stay consistent" This reverts commit 20285dc2711c96a7fc1a72707823c580702edde6, which causes serious performance downgrade because the calculated cpu frequency will be much lower than before due to change of cpu util. Bug: 205915994 Test: build pass Change-Id: I68dced7a58547a3324fcfeebea6c02bb30c4182d Signed-off-by: Rick Yiu --- kernel/sched/fair.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index 8b45d14616ee..f9c570d86282 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -3682,15 +3682,15 @@ update_cfs_rq_load_avg(u64 now, struct cfs_rq *cfs_rq) r = removed_load; sub_positive(&sa->load_avg, r); - sa->load_sum = sa->load_avg * divider; + sub_positive(&sa->load_sum, r * divider); r = removed_util; sub_positive(&sa->util_avg, r); - sa->util_sum = sa->util_avg * divider; + sub_positive(&sa->util_sum, r * divider); r = removed_runnable; sub_positive(&sa->runnable_avg, r); - sa->runnable_sum = sa->runnable_avg * divider; + sub_positive(&sa->runnable_sum, r * divider); /* * removed_runnable is the unweighted version of removed_load so we From de0ba4ea3c417b3cac2f6cef6fcbae6bde36b88d Mon Sep 17 00:00:00 2001 From: Rick Yiu Date: Tue, 16 Nov 2021 12:33:07 +0800 Subject: [PATCH 05/18] Revert "sched/pelt: Ensure that *_sum is always synced with *_avg" This reverts commit 813ff24f1d08cb4b4605fe222bb104a8dbdfd7f5. Bug: 205915994 Test: build pass Signed-off-by: Rick Yiu Change-Id: I77d9a103d71da43ce2fe9b630c7a5e12b62e8e42 --- kernel/sched/fair.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index f9c570d86282..aa3d2291874d 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -3777,17 +3777,11 @@ static void attach_entity_load_avg(struct cfs_rq *cfs_rq, struct sched_entity *s */ static void detach_entity_load_avg(struct cfs_rq *cfs_rq, struct sched_entity *se) { - /* - * cfs_rq->avg.period_contrib can be used for both cfs_rq and se. - * See ___update_load_avg() for details. - */ - u32 divider = get_pelt_divider(&cfs_rq->avg); - dequeue_load_avg(cfs_rq, se); sub_positive(&cfs_rq->avg.util_avg, se->avg.util_avg); - cfs_rq->avg.util_sum = cfs_rq->avg.util_avg * divider; + sub_positive(&cfs_rq->avg.util_sum, se->avg.util_sum); sub_positive(&cfs_rq->avg.runnable_avg, se->avg.runnable_avg); - cfs_rq->avg.runnable_sum = cfs_rq->avg.runnable_avg * divider; + sub_positive(&cfs_rq->avg.runnable_sum, se->avg.runnable_sum); add_tg_cfs_propagate(cfs_rq, -se->avg.load_sum); From d736cbf8d9ac2f39a42a1b784c384b0ad12c28d9 Mon Sep 17 00:00:00 2001 From: Rick Yiu Date: Tue, 16 Nov 2021 12:34:15 +0800 Subject: [PATCH 06/18] Revert "sched/fair: Keep load_avg and load_sum synced" This reverts commit 4c37b062edae8ad3e1f279ecc084f254bc8161ae. Bug: 205915994 Test: build pass Signed-off-by: Rick Yiu Change-Id: Ifb4ca2d5beab425665b1cc047899e33ceb0ded23 --- kernel/sched/fair.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index aa3d2291874d..7d009aaccb72 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -3511,9 +3511,10 @@ update_tg_cfs_runnable(struct cfs_rq *cfs_rq, struct sched_entity *se, struct cf static inline void update_tg_cfs_load(struct cfs_rq *cfs_rq, struct sched_entity *se, struct cfs_rq *gcfs_rq) { - long delta, running_sum, runnable_sum = gcfs_rq->prop_runnable_sum; + long delta_avg, running_sum, runnable_sum = gcfs_rq->prop_runnable_sum; unsigned long load_avg; u64 load_sum = 0; + s64 delta_sum; u32 divider; if (!runnable_sum) @@ -3560,13 +3561,13 @@ update_tg_cfs_load(struct cfs_rq *cfs_rq, struct sched_entity *se, struct cfs_rq load_sum = (s64)se_weight(se) * runnable_sum; load_avg = div_s64(load_sum, divider); - delta = load_avg - se->avg.load_avg; + delta_sum = load_sum - (s64)se_weight(se) * se->avg.load_sum; + delta_avg = load_avg - se->avg.load_avg; se->avg.load_sum = runnable_sum; se->avg.load_avg = load_avg; - - add_positive(&cfs_rq->avg.load_avg, delta); - cfs_rq->avg.load_sum = cfs_rq->avg.load_avg * divider; + add_positive(&cfs_rq->avg.load_avg, delta_avg); + add_positive(&cfs_rq->avg.load_sum, delta_sum); } static inline void add_tg_cfs_propagate(struct cfs_rq *cfs_rq, long runnable_sum) From 775cd2119d2b8b69788028aeaa29e7d94f88017a Mon Sep 17 00:00:00 2001 From: Shaleen Agrawal Date: Tue, 16 Nov 2021 13:18:03 -0800 Subject: [PATCH 07/18] ANDROID: qcom: Add smp_call_function_single_async to ABI Need to add additional symbol in execution path to ABI list. Bug: 176077958 Change-Id: I676b4f9a016c825572d10de49b6062a90078f2f2 Signed-off-by: Shaleen Agrawal --- android/abi_gki_aarch64_qcom | 1 + 1 file changed, 1 insertion(+) diff --git a/android/abi_gki_aarch64_qcom b/android/abi_gki_aarch64_qcom index be9112998f23..c2a299356d27 100644 --- a/android/abi_gki_aarch64_qcom +++ b/android/abi_gki_aarch64_qcom @@ -2251,6 +2251,7 @@ smp_call_function smp_call_function_any smp_call_function_single + smp_call_function_single_async snd_card_free snd_card_new snd_card_register From 2f3f5731de0536a6a1048ae01e129cebec48e664 Mon Sep 17 00:00:00 2001 From: Liangliang Li Date: Wed, 10 Nov 2021 18:05:13 +0800 Subject: [PATCH 08/18] ANDROID: GKI: Add vendor hook to binder transaction We want to get binder free space information in the binder transaction, but this needs to hold the mutex lock. So we add this restrict hook to do this. Bug: 205648032 Change-Id: Ie1f377018da686bd62f5ac2d1e5421899741e6d5 Signed-off-by: Liangliang Li --- drivers/android/binder.c | 1 + drivers/android/vendor_hooks.c | 1 + include/trace/hooks/binder.h | 4 ++++ 3 files changed, 6 insertions(+) diff --git a/drivers/android/binder.c b/drivers/android/binder.c index b03bf4e11a08..c845c1f8a695 100644 --- a/drivers/android/binder.c +++ b/drivers/android/binder.c @@ -2797,6 +2797,7 @@ static void binder_transaction(struct binder_proc *proc, if (target_thread) e->to_thread = target_thread->pid; e->to_proc = target_proc->pid; + trace_android_rvh_binder_transaction(target_proc, proc, thread, tr); /* TODO: reuse incoming transaction for reply */ t = kzalloc(sizeof(*t), GFP_KERNEL); diff --git a/drivers/android/vendor_hooks.c b/drivers/android/vendor_hooks.c index 952053d4f5fa..9d2a765b164d 100644 --- a/drivers/android/vendor_hooks.c +++ b/drivers/android/vendor_hooks.c @@ -289,6 +289,7 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_timerfd_create); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_binder_alloc_new_buf_locked); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_binder_reply); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_binder_trans); +EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_binder_transaction); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_binder_preset); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_binder_proc_transaction); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_binder_new_ref); diff --git a/include/trace/hooks/binder.h b/include/trace/hooks/binder.h index ffba8746e58b..36a70248f5cf 100644 --- a/include/trace/hooks/binder.h +++ b/include/trace/hooks/binder.h @@ -52,6 +52,10 @@ DECLARE_HOOK(android_vh_binder_trans, TP_PROTO(struct binder_proc *target_proc, struct binder_proc *proc, struct binder_thread *thread, struct binder_transaction_data *tr), TP_ARGS(target_proc, proc, thread, tr)); +DECLARE_RESTRICTED_HOOK(android_rvh_binder_transaction, + TP_PROTO(struct binder_proc *target_proc, struct binder_proc *proc, + struct binder_thread *thread, struct binder_transaction_data *tr), + TP_ARGS(target_proc, proc, thread, tr), 1); DECLARE_HOOK(android_vh_binder_preset, TP_PROTO(struct hlist_head *hhead, struct mutex *lock), TP_ARGS(hhead, lock)); From 5dac28a174baa3d6a8f8b6dc71cde594efc30d8a Mon Sep 17 00:00:00 2001 From: Anton Yakovlev Date: Tue, 2 Mar 2021 17:47:01 +0100 Subject: [PATCH 09/18] BACKPORT: uapi: virtio_ids: add a sound device type ID from OASIS spec The OASIS virtio spec defines a sound device type ID that is not present in the header yet. Signed-off-by: Anton Yakovlev Link: https://lore.kernel.org/r/20210302164709.3142702-2-anton.yakovlev@opensynergy.com Signed-off-by: Takashi Iwai (cherry picked from commit 0ae0337f929a970ee8d83e0e95e6b8d05562ce3b https://github.com/torvalds/linux.git master) Change-Id: I486371e1ec8d25d42f85f710ce82e866367df4da Signed-off-by: Hao Chen --- include/uapi/linux/virtio_ids.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/uapi/linux/virtio_ids.h b/include/uapi/linux/virtio_ids.h index b052355ac7a3..bc740d6d2259 100644 --- a/include/uapi/linux/virtio_ids.h +++ b/include/uapi/linux/virtio_ids.h @@ -45,6 +45,7 @@ #define VIRTIO_ID_CRYPTO 20 /* virtio crypto */ #define VIRTIO_ID_IOMMU 23 /* virtio IOMMU */ #define VIRTIO_ID_MEM 24 /* virtio mem */ +#define VIRTIO_ID_SOUND 25 /* virtio sound */ #define VIRTIO_ID_FS 26 /* virtio filesystem */ #define VIRTIO_ID_PMEM 27 /* virtio pmem */ #define VIRTIO_ID_MAC80211_HWSIM 29 /* virtio mac80211-hwsim */ From e41b11646321b4c57c2599bc8666ad5b25e2cf38 Mon Sep 17 00:00:00 2001 From: Alistair Delva Date: Wed, 17 Nov 2021 09:58:10 -0800 Subject: [PATCH 10/18] ANDROID: setlocalversion: make KMI_GENERATION optional GKI required the KMI_GENERATION to be added to the kernel version string, but this only makes sense for GKI kernels, for non-GKI kernels we don't need it. Leave all the other stuff we added, though, as it seems useful. Bug: 205897686 Change-Id: I2e7b3cb7ed5529f1e5e7c9d79a1f7ce4a1b6ee1f Signed-off-by: Alistair Delva --- scripts/setlocalversion | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/setlocalversion b/scripts/setlocalversion index 3f8a8ee14b10..842936656b84 100755 --- a/scripts/setlocalversion +++ b/scripts/setlocalversion @@ -41,8 +41,6 @@ if test $# -gt 0; then kmi_generation=$1 [ $(expr $kmi_generation : '^[0-9]\+$') -eq 0 ] && usage shift - else - usage fi fi if test $# -gt 0 -o ! -d "$srctree"; then @@ -68,6 +66,8 @@ scm_version() if [ -n "$android_release" ] && [ -n "$kmi_generation" ]; then printf '%s' "-$android_release-$kmi_generation" + elif [ -n "$android_release" ]; then + printf '%s' "-$android_release" fi # If we are at a tagged commit (like "v2.6.30-rc6"), we ignore From 47458bf124aee3aa95449f2dbd1d59724618be9d Mon Sep 17 00:00:00 2001 From: Yang Yang Date: Tue, 9 Nov 2021 10:42:15 +0800 Subject: [PATCH 11/18] ANDROID: block: export tracepoints This patch will export some tracepoints so that vendor modules can use them. Export these tracepoint functions to track IO data flow for performance tuning. Bug: 205648026 Change-Id: Ia37b8f99b2d940cecce46c8bc24f724c14450517 Signed-off-by: Yang Yang --- block/blk-core.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/block/blk-core.c b/block/blk-core.c index 0e66579c299f..ac17d70157d6 100644 --- a/block/blk-core.c +++ b/block/blk-core.c @@ -58,6 +58,13 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(block_rq_remap); EXPORT_TRACEPOINT_SYMBOL_GPL(block_bio_complete); EXPORT_TRACEPOINT_SYMBOL_GPL(block_split); EXPORT_TRACEPOINT_SYMBOL_GPL(block_unplug); +EXPORT_TRACEPOINT_SYMBOL_GPL(block_bio_queue); +EXPORT_TRACEPOINT_SYMBOL_GPL(block_getrq); +EXPORT_TRACEPOINT_SYMBOL_GPL(block_rq_insert); +EXPORT_TRACEPOINT_SYMBOL_GPL(block_rq_issue); +EXPORT_TRACEPOINT_SYMBOL_GPL(block_rq_merge); +EXPORT_TRACEPOINT_SYMBOL_GPL(block_rq_requeue); +EXPORT_TRACEPOINT_SYMBOL_GPL(block_rq_complete); DEFINE_IDA(blk_queue_ida); From d30938528e5d46ba48795d446858d83ce8633286 Mon Sep 17 00:00:00 2001 From: Yang Yang Date: Tue, 16 Nov 2021 16:20:04 +0800 Subject: [PATCH 12/18] ANDROID: GKI: Update symbol list for VIVO Leaf changes summary: 18 artifacts changed Changed leaf types summary: 0 leaf type changed Removed/Changed/Added functions summary: 0 Removed, 0 Changed, 9 Added functions Removed/Changed/Added variables summary: 0 Removed, 0 Changed, 9 Added variables 9 Added functions: [A] 'function int __traceiter_block_bio_complete(void*, request_queue*, bio*)' [A] 'function int __traceiter_block_bio_queue(void*, request_queue*, bio*)' [A] 'function int __traceiter_block_getrq(void*, request_queue*, bio*, int)' [A] 'function int __traceiter_block_rq_complete(void*, request*, int, unsigned int)' [A] 'function int __traceiter_block_rq_insert(void*, request_queue*, request*)' [A] 'function int __traceiter_block_rq_issue(void*, request_queue*, request*)' [A] 'function int __traceiter_block_rq_merge(void*, request_queue*, request*)' [A] 'function int __traceiter_block_rq_requeue(void*, request_queue*, request*)' [A] 'function int __traceiter_block_split(void*, request_queue*, bio*, unsigned int)' 9 Added variables: [A] 'tracepoint __tracepoint_block_bio_complete' [A] 'tracepoint __tracepoint_block_bio_queue' [A] 'tracepoint __tracepoint_block_getrq' [A] 'tracepoint __tracepoint_block_rq_complete' [A] 'tracepoint __tracepoint_block_rq_insert' [A] 'tracepoint __tracepoint_block_rq_issue' [A] 'tracepoint __tracepoint_block_rq_merge' [A] 'tracepoint __tracepoint_block_rq_requeue' [A] 'tracepoint __tracepoint_block_split' Bug: 206557432 Change-Id: I0441bbc9f88dbccb410dfd6b21c7dfb3891e49c4 Signed-off-by: Yang Yang --- android/abi_gki_aarch64.xml | 214 ++++++++++++++++++++++++----------- android/abi_gki_aarch64_vivo | 18 +++ 2 files changed, 167 insertions(+), 65 deletions(-) diff --git a/android/abi_gki_aarch64.xml b/android/abi_gki_aarch64.xml index 07753e497e9d..bd43a42bb7b0 100644 --- a/android/abi_gki_aarch64.xml +++ b/android/abi_gki_aarch64.xml @@ -530,6 +530,15 @@ + + + + + + + + + @@ -5944,6 +5953,15 @@ + + + + + + + + + @@ -116311,6 +116329,63 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -116917,6 +116992,15 @@ + + + + + + + + + @@ -117994,8 +118078,8 @@ - - + + @@ -118005,8 +118089,8 @@ - - + + @@ -118036,15 +118120,15 @@ - - - - + + + + - - - + + + @@ -118251,12 +118335,12 @@ - - + + - - + + @@ -118289,14 +118373,14 @@ - - - + + + - - - + + + @@ -118422,8 +118506,8 @@ - - + + @@ -118442,8 +118526,8 @@ - - + + @@ -118451,10 +118535,10 @@ - - - - + + + + @@ -122379,16 +122463,16 @@ - - - - + + + + - - - - + + + + @@ -132222,16 +132306,16 @@ - - - - + + + + - - - - + + + + @@ -135508,8 +135592,8 @@ - - + + @@ -135746,38 +135830,38 @@ - - + + - - + + - - - - + + + + - - + + - - + + - - + + - - + + - - + + diff --git a/android/abi_gki_aarch64_vivo b/android/abi_gki_aarch64_vivo index f464cbad7f17..5ff5cad3dc1c 100644 --- a/android/abi_gki_aarch64_vivo +++ b/android/abi_gki_aarch64_vivo @@ -1749,6 +1749,15 @@ __traceiter_android_vh_ufs_send_command __traceiter_android_vh_ufs_update_sdev __traceiter_binder_transaction_received + __traceiter_block_bio_complete + __traceiter_block_bio_queue + __traceiter_block_getrq + __traceiter_block_rq_complete + __traceiter_block_rq_insert + __traceiter_block_rq_issue + __traceiter_block_rq_merge + __traceiter_block_rq_requeue + __traceiter_block_split __traceiter_cpu_frequency_limits __traceiter_cpu_idle __traceiter_dwc3_complete_trb @@ -1852,6 +1861,15 @@ __tracepoint_android_vh_ufs_update_sdev __tracepoint_android_vh_vmpressure __tracepoint_binder_transaction_received + __tracepoint_block_bio_complete + __tracepoint_block_bio_queue + __tracepoint_block_getrq + __tracepoint_block_rq_complete + __tracepoint_block_rq_insert + __tracepoint_block_rq_issue + __tracepoint_block_rq_merge + __tracepoint_block_rq_requeue + __tracepoint_block_split __tracepoint_cpu_frequency_limits __tracepoint_cpu_idle __tracepoint_dwc3_complete_trb From 7a069c607128b5634c5dfd290ed6b581a6a4a89c Mon Sep 17 00:00:00 2001 From: Pavankumar Kondeti Date: Fri, 12 Nov 2021 15:54:40 +0530 Subject: [PATCH 13/18] FROMGIT: usb: gadget: f_fs: Use stream_open() for endpoint files Function fs endpoint file operations are synchronized via an interruptible mutex wait. However we see threads that do ep file operations concurrently are getting blocked for the mutex lock in __fdget_pos(). This is an uninterruptible wait and we see hung task warnings and kernel panic if hung_task_panic systcl is enabled if host does not send/receive the data for long time. The reason for threads getting blocked in __fdget_pos() is due to the file position protection introduced by the commit 9c225f2655e3 ("vfs: atomic f_pos accesses as per POSIX"). Since function fs endpoint files does not have the notion of the file position, switch to the stream mode. This will bypass the file position mutex and threads will be blocked in interruptible state for the function fs mutex. It should not affects user space as we are only changing the task state changes the task state from UNINTERRUPTIBLE to INTERRUPTIBLE while waiting for the USB transfers to be finished. However there is a slight change to the O_NONBLOCK behavior. Earlier threads that are using O_NONBLOCK are also getting blocked inside fdget_pos(). Now they reach to function fs and error code is returned. The non blocking behavior is actually honoured now. Reviewed-by: John Keeping Signed-off-by: Pavankumar Kondeti Link: https://lore.kernel.org/r/1636712682-1226-1-git-send-email-quic_pkondeti@quicinc.com Signed-off-by: Greg Kroah-Hartman (cherry picked from commit c76ef96fc00eb398c8fc836b0eb2f82bcc619dc7 https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-next) Bug: 206906138 Change-Id: Ifb99336a4da7587c7e71a6c45999a36948194d7a Signed-off-by: Pavankumar Kondeti --- drivers/usb/gadget/function/f_fs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/usb/gadget/function/f_fs.c b/drivers/usb/gadget/function/f_fs.c index 725e35167837..2113e541457e 100644 --- a/drivers/usb/gadget/function/f_fs.c +++ b/drivers/usb/gadget/function/f_fs.c @@ -614,7 +614,7 @@ static int ffs_ep0_open(struct inode *inode, struct file *file) file->private_data = ffs; ffs_data_opened(ffs); - return 0; + return stream_open(inode, file); } static int ffs_ep0_release(struct inode *inode, struct file *file) @@ -1152,7 +1152,7 @@ ffs_epfile_open(struct inode *inode, struct file *file) file->private_data = epfile; ffs_data_opened(epfile->ffs); - return 0; + return stream_open(inode, file); } static int ffs_aio_cancel(struct kiocb *kiocb) From 00d29953bb7d0c30c38bf46c8491ce8cd8b50cee Mon Sep 17 00:00:00 2001 From: zhengding chen Date: Wed, 17 Nov 2021 14:26:01 +0800 Subject: [PATCH 14/18] ANDROID: GKI: Update symbols to symbol list Update symbols to symbol list externed by oem modules. 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_binder_del_ref(void*, task_struct*, uint32_t)' [A] 'function int __traceiter_android_vh_binder_new_ref(void*, task_struct*, uint32_t, int)' [A] 'function int __traceiter_android_vh_binder_proc_transaction(void*, task_struct*, task_struct*, task_struct*, int, unsigned int, bool)' 3 Added variables: [A] 'tracepoint __tracepoint_android_vh_binder_del_ref' [A] 'tracepoint __tracepoint_android_vh_binder_new_ref' [A] 'tracepoint __tracepoint_android_vh_binder_proc_transaction' Bug: 193384408 Signed-off-by: zhengding chen Change-Id: Ia8b4c3bf3847dd3e61a82bd11765439fcc2bfbf1 --- android/abi_gki_aarch64.xml | 10743 ++++++++++++++++---------------- android/abi_gki_aarch64_oplus | 6 + 2 files changed, 5305 insertions(+), 5444 deletions(-) diff --git a/android/abi_gki_aarch64.xml b/android/abi_gki_aarch64.xml index bd43a42bb7b0..dc0b6e34ebff 100644 --- a/android/abi_gki_aarch64.xml +++ b/android/abi_gki_aarch64.xml @@ -362,9 +362,12 @@ + + + @@ -5767,9 +5770,12 @@ + + + @@ -8634,9 +8640,9 @@ - - - + + + @@ -8649,7 +8655,6 @@ - @@ -8731,7 +8736,6 @@ - @@ -11593,6 +11597,7 @@ + @@ -11999,8 +12004,8 @@ - - + + @@ -12633,7 +12638,23 @@ - + + + + + + + + + + + + + + + + + @@ -13280,6 +13301,7 @@ + @@ -14829,12 +14851,6 @@ - - - - - - @@ -15329,6 +15345,9 @@ + + + @@ -15528,7 +15547,29 @@ - + + + + + + + + + + + + + + + + + + + + + + + @@ -16883,8 +16924,8 @@ - - + + @@ -18412,7 +18453,6 @@ - @@ -18786,11 +18826,7 @@ - - - - - + @@ -19745,7 +19781,6 @@ - @@ -19943,7 +19978,6 @@ - @@ -20381,14 +20415,6 @@ - - - - - - - - @@ -20739,7 +20765,7 @@ - + @@ -21453,6 +21479,7 @@ + @@ -22193,6 +22220,11 @@ + + + + + @@ -24362,7 +24394,7 @@ - + @@ -24587,6 +24619,7 @@ + @@ -24891,7 +24924,23 @@ - + + + + + + + + + + + + + + + + + @@ -25553,7 +25602,7 @@ - + @@ -25709,7 +25758,7 @@ - + @@ -25930,7 +25979,6 @@ - @@ -26008,7 +26056,7 @@ - + @@ -26065,6 +26113,7 @@ + @@ -26418,6 +26467,7 @@ + @@ -27048,7 +27098,7 @@ - + @@ -27983,7 +28033,6 @@ - @@ -31729,9 +31778,9 @@ - - - + + + @@ -32605,7 +32654,6 @@ - @@ -32860,7 +32908,68 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -33365,7 +33474,6 @@ - @@ -33780,6 +33888,7 @@ + @@ -33978,7 +34087,7 @@ - + @@ -37525,7 +37634,6 @@ - @@ -38315,8 +38423,8 @@ - - + + @@ -39288,17 +39396,6 @@ - - - - - - - - - - - @@ -39578,9 +39675,9 @@ - - - + + + @@ -40087,6 +40184,7 @@ + @@ -41044,7 +41142,6 @@ - @@ -43546,15 +43643,7 @@ - - - - - - - - @@ -43891,18 +43980,7 @@ - - - - - - - - - - - - + @@ -43998,12 +44076,12 @@ - - - - - - + + + + + + @@ -44108,7 +44186,6 @@ - @@ -44889,21 +44966,21 @@ - + - + - + - + - + - + @@ -45349,7 +45426,6 @@ - @@ -47000,8 +47076,8 @@ - - + + @@ -47347,7 +47423,35 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -47908,7 +48012,14 @@ - + + + + + + + + @@ -48554,11 +48665,6 @@ - - - - - @@ -48964,7 +49070,7 @@ - + @@ -49090,6 +49196,11 @@ + + + + + @@ -49543,56 +49654,7 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -49933,6 +49995,7 @@ + @@ -50868,7 +50931,7 @@ - + @@ -51713,26 +51776,8 @@ - - - - - - - - - - - - - - - - - - @@ -51991,26 +52036,6 @@ - - - - - - - - - - - - - - - - - - - - @@ -52148,7 +52173,6 @@ - @@ -52199,6 +52223,7 @@ + @@ -52788,7 +52813,23 @@ - + + + + + + + + + + + + + + + + + @@ -53150,7 +53191,6 @@ - @@ -54081,9 +54121,9 @@ - - - + + + @@ -54803,6 +54843,7 @@ + @@ -55387,7 +55428,7 @@ - + @@ -55852,7 +55893,7 @@ - + @@ -56718,26 +56759,6 @@ - - - - - - - - - - - - - - - - - - - - @@ -56946,6 +56967,7 @@ + @@ -58082,7 +58104,6 @@ - @@ -58545,11 +58566,6 @@ - - - - - @@ -59774,44 +59790,7 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -61001,65 +60980,7 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -61836,7 +61757,6 @@ - @@ -62786,7 +62706,17 @@ - + + + + + + + + + + + @@ -63852,7 +63782,7 @@ - + @@ -64346,10 +64276,10 @@ - - - - + + + + @@ -64399,6 +64329,12 @@ + + + + + + @@ -64658,6 +64594,7 @@ + @@ -64981,47 +64918,7 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -65616,11 +65513,6 @@ - - - - - @@ -66647,11 +66539,6 @@ - - - - - @@ -67112,7 +66999,7 @@ - + @@ -68976,7 +68863,6 @@ - @@ -69173,6 +69059,7 @@ + @@ -70781,14 +70668,7 @@ - - - - - - - - + @@ -70922,14 +70802,6 @@ - - - - - - - - @@ -71618,8 +71490,8 @@ - - + + @@ -71738,7 +71610,6 @@ - @@ -72425,8 +72296,8 @@ - - + + @@ -72498,6 +72369,7 @@ + @@ -72962,38 +72834,7 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -73104,7 +72945,7 @@ - + @@ -75792,7 +75633,6 @@ - @@ -77200,11 +77040,11 @@ - + - + @@ -78257,12 +78097,12 @@ - - - - - - + + + + + + @@ -79548,6 +79388,7 @@ + @@ -79787,7 +79628,6 @@ - @@ -80513,6 +80353,7 @@ + @@ -81100,6 +80941,7 @@ + @@ -81172,6 +81014,9 @@ + + + @@ -81188,11 +81033,6 @@ - - - - - @@ -81215,7 +81055,6 @@ - @@ -81676,7 +81515,7 @@ - + @@ -81752,14 +81591,6 @@ - - - - - - - - @@ -84838,6 +84669,7 @@ + @@ -85456,7 +85288,7 @@ - + @@ -86137,9 +85969,9 @@ - - - + + + @@ -86608,26 +86440,7 @@ - - - - - - - - - - - - - - - - - - - - + @@ -86652,7 +86465,7 @@ - + @@ -86677,6 +86490,7 @@ + @@ -86715,6 +86529,7 @@ + @@ -88127,7 +87942,7 @@ - + @@ -88758,8 +88573,8 @@ - - + + @@ -89828,7 +89643,6 @@ - @@ -89989,6 +89803,14 @@ + + + + + + + + @@ -90423,7 +90245,20 @@ - + + + + + + + + + + + + + + @@ -90980,7 +90815,7 @@ - + @@ -91155,7 +90990,7 @@ - + @@ -91450,6 +91285,7 @@ + @@ -91585,12 +91421,12 @@ - + - + @@ -93156,7 +92992,6 @@ - @@ -93669,17 +93504,6 @@ - - - - - - - - - - - @@ -94442,7 +94266,7 @@ - + @@ -94954,7 +94778,7 @@ - + @@ -95000,7 +94824,7 @@ - + @@ -95438,7 +95262,7 @@ - + @@ -96144,9 +95968,6 @@ - - - @@ -97386,6 +97207,7 @@ + @@ -97661,8 +97483,8 @@ - - + + @@ -97871,8 +97693,8 @@ - - + + @@ -99027,6 +98849,7 @@ + @@ -100002,7 +99825,14 @@ - + + + + + + + + @@ -101485,10 +101315,10 @@ - - - + + + @@ -101512,7 +101342,7 @@ - + @@ -101653,8 +101483,8 @@ - - + + @@ -102254,7 +102084,6 @@ - @@ -102523,6 +102352,7 @@ + @@ -103048,7 +102878,20 @@ - + + + + + + + + + + + + + + @@ -103107,6 +102950,9 @@ + + + @@ -106514,6 +106360,7 @@ + @@ -106528,20 +106375,6 @@ - - - - - - - - - - - - - - @@ -106876,6 +106709,7 @@ + @@ -110800,11 +110634,6 @@ - - - - - @@ -111131,6 +110960,7 @@ + @@ -112886,7 +112716,6 @@ - @@ -112971,7 +112800,6 @@ - @@ -113090,8 +112918,8 @@ - - + + @@ -113628,6 +113456,7 @@ + @@ -115273,6 +115102,19 @@ + + + + + + + + + + + + + @@ -115293,6 +115135,16 @@ + + + + + + + + + + @@ -116806,9 +116658,12 @@ + + + @@ -117237,9 +117092,9 @@ - - - + + + @@ -117250,33 +117105,33 @@ - - - - - + + + + + - - - - - + + + + + - - - - - + + + + + - - - + + + - - - + + + @@ -117286,27 +117141,27 @@ - - - + + + - - - + + + - - - + + + - - - + + + @@ -117316,8 +117171,8 @@ - - + + @@ -117336,8 +117191,8 @@ - - + + @@ -117353,57 +117208,57 @@ - - + + - - + + - - + + - - + + - - + + - - + + - - - + + + - - + + - - + + @@ -117414,16 +117269,16 @@ - - + + - - + + @@ -117447,12 +117302,12 @@ - - - - - - + + + + + + @@ -117469,9 +117324,9 @@ - - - + + + @@ -117487,33 +117342,33 @@ - - + + - - - + + + - - + + - - - + + + - - - + + + - - - + + + @@ -117526,22 +117381,22 @@ - - - - + + + + - - - - + + + + - - - - + + + + @@ -117620,13 +117475,13 @@ - - - - - - - + + + + + + + @@ -117635,29 +117490,29 @@ - - - + + + - - - - - - + + + + + + - - - - + + + + - - + + @@ -117699,11 +117554,11 @@ - - - - - + + + + + @@ -117723,14 +117578,14 @@ - - + + - - - - + + + + @@ -117753,15 +117608,15 @@ - - - - + + + + - - - + + + @@ -117769,11 +117624,11 @@ - - - - - + + + + + @@ -117824,21 +117679,21 @@ - - - - - + + + + + - - - - - - + + + + + + - - + + @@ -117879,18 +117734,18 @@ - - + + - - - + + + - - - + + + @@ -117923,17 +117778,17 @@ - - - - + + + + - - - - - + + + + + @@ -117944,53 +117799,53 @@ - - - - + + + + - - + + - - - + + + - - - + + + - - + + - - - - + + + + - - + + - - + + - - + + - - - - - + + + + + @@ -117998,9 +117853,9 @@ - - - + + + @@ -118009,49 +117864,49 @@ - - - - + + + + - - - - - - - + + + + + + + - - - - + + + + - - - - - + + + + + - - - - + + + + - - - - - + + + + + @@ -118061,10 +117916,10 @@ - - - - + + + + @@ -118108,17 +117963,17 @@ - - + + - - + + - - - + + + @@ -118153,10 +118008,10 @@ - - - - + + + + @@ -118188,13 +118043,13 @@ - - - + + + - - + + @@ -118225,8 +118080,8 @@ - - + + @@ -118235,8 +118090,8 @@ - - + + @@ -118258,8 +118113,8 @@ - - + + @@ -118306,8 +118161,8 @@ - - + + @@ -118329,10 +118184,10 @@ - - - - + + + + @@ -118368,9 +118223,9 @@ - - - + + + @@ -118514,16 +118369,16 @@ - - + + - - + + @@ -118572,26 +118427,26 @@ - - - - + + + + - - - - + + + + - - - + + + - - - + + + @@ -118600,31 +118455,31 @@ - - - - + + + + - - - + + + - - - + + + - - - + + + - - - - + + + + @@ -118642,9 +118497,9 @@ - - - + + + @@ -118692,67 +118547,67 @@ - - - - + + + + - - - - - + + + + + - - - - - - + + + + + + - - - - - - - + + + + + + + - - - - - - - - + + + + + + + + - - - - - - - - - + + + + + + + + + - - - - - - - - - - + + + + + + + + + + @@ -118768,16 +118623,16 @@ - - + + - - - - - - + + + + + + @@ -118798,22 +118653,22 @@ - - + + - - + + - - + + - - + + @@ -118830,23 +118685,23 @@ - - - + + + - - - - - + + + + + - - - - - + + + + + @@ -118856,8 +118711,8 @@ - - + + @@ -118870,8 +118725,8 @@ - - + + @@ -118941,9 +118796,9 @@ - - - + + + @@ -118982,11 +118837,11 @@ - - - - - + + + + + @@ -119002,19 +118857,19 @@ - - - + + + - - - + + + - - - + + + @@ -119046,9 +118901,9 @@ - - - + + + @@ -119137,14 +118992,14 @@ - - - + + + - - - + + + @@ -119153,65 +119008,65 @@ - - - + + + - - - - + + + + - - + + - - - - - + + + + + - - - - - + + + + + - - + + - - - - + + + + - - + + - - + + - - - + + + - - - + + + @@ -119220,48 +119075,48 @@ - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - + + - - + + - - - + + + @@ -119272,8 +119127,8 @@ - - + + @@ -119391,8 +119246,8 @@ - - + + @@ -119494,28 +119349,28 @@ - - - + + + - - + + - - - - - + + + + + @@ -119530,11 +119385,11 @@ - - - - - + + + + + @@ -119546,11 +119401,11 @@ - - - - - + + + + + @@ -119569,8 +119424,8 @@ - - + + @@ -119607,10 +119462,10 @@ - - - - + + + + @@ -119648,22 +119503,22 @@ - - + + - - - - + + + + - - + + - - + + @@ -119690,22 +119545,22 @@ - - + + - - - - + + + + - - - + + + @@ -119766,8 +119621,8 @@ - - + + @@ -119798,18 +119653,18 @@ - - + + - - - + + + - - - + + + @@ -119821,8 +119676,8 @@ - - + + @@ -119838,9 +119693,9 @@ - - - + + + @@ -119873,12 +119728,12 @@ - - + + - - + + @@ -119889,23 +119744,23 @@ - - + + - - - + + + - - - - + + + + @@ -119920,9 +119775,9 @@ - - - + + + @@ -119941,8 +119796,8 @@ - - + + @@ -119962,58 +119817,58 @@ - - - + + + - - - + + + - - - - + + + + - - - - - + + + + + - - - - - + + + + + - + - + - - - + + + - - - - - + + + + + - - - - - + + + + + @@ -120056,12 +119911,12 @@ - - + + - - + + @@ -120090,10 +119945,10 @@ - - - - + + + + @@ -120148,42 +120003,42 @@ - - - - - - + + + + + + - - - - - - + + + + + + - - + + - - - + + + - - - + + + - + @@ -120226,10 +120081,10 @@ - - - - + + + + @@ -120237,9 +120092,9 @@ - - - + + + @@ -120249,7 +120104,7 @@ - + @@ -120270,8 +120125,8 @@ - - + + @@ -120292,22 +120147,22 @@ - - + + - - - + + + - - - + + + @@ -120357,11 +120212,11 @@ - - - - - + + + + + @@ -120369,44 +120224,44 @@ - - - - - + + + + + - - - - + + + + - - - - - + + + + + - - - - + + + + - - + + - - + + - - - - + + + + @@ -120427,8 +120282,8 @@ - - + + @@ -120453,18 +120308,18 @@ - - - + + + - - - + + + @@ -120481,9 +120336,9 @@ - - - + + + @@ -120494,11 +120349,11 @@ - - - - - + + + + + @@ -120508,8 +120363,8 @@ - - + + @@ -120525,18 +120380,18 @@ - - + + - - + + - - - - + + + + @@ -120567,12 +120422,12 @@ - - + + - - + + @@ -120581,7 +120436,7 @@ - + @@ -120612,11 +120467,11 @@ - - - - - + + + + + @@ -120626,25 +120481,25 @@ - - - + + + - - - - - - + + + + + + - - - - - - + + + + + + @@ -120681,11 +120536,11 @@ - - - - - + + + + + @@ -120695,11 +120550,11 @@ - - - - - + + + + + @@ -120731,9 +120586,9 @@ - - - + + + @@ -120744,8 +120599,8 @@ - - + + @@ -120755,9 +120610,9 @@ - - - + + + @@ -120766,11 +120621,11 @@ - - - - - + + + + + @@ -120783,16 +120638,16 @@ - - + + - - + + - - + + @@ -120803,8 +120658,8 @@ - - + + @@ -120846,49 +120701,49 @@ - - + + - - - - + + + + - - - + + + - - + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + @@ -120910,9 +120765,9 @@ - - - + + + @@ -120925,9 +120780,9 @@ - - - + + + @@ -120949,10 +120804,10 @@ - - - - + + + + @@ -120983,15 +120838,15 @@ - - - - + + + + - - - + + + @@ -121011,8 +120866,8 @@ - - + + @@ -121028,8 +120883,8 @@ - - + + @@ -121037,13 +120892,13 @@ - - + + - - - + + + @@ -121054,9 +120909,9 @@ - - - + + + @@ -121073,16 +120928,16 @@ - - + + - - + + @@ -121107,9 +120962,9 @@ - - - + + + @@ -121199,9 +121054,9 @@ - - - + + + @@ -121214,17 +121069,17 @@ - - - - + + + + - - - - + + + + @@ -121232,10 +121087,10 @@ - - - - + + + + @@ -121243,9 +121098,9 @@ - - - + + + @@ -121266,11 +121121,11 @@ - - - - - + + + + + @@ -121342,20 +121197,20 @@ - - + + - - + + - - + + @@ -121368,8 +121223,8 @@ - - + + @@ -121391,12 +121246,12 @@ - - - - - - + + + + + + @@ -121405,40 +121260,40 @@ - - - + + + - - - - - - - + + + + + + + - - + + - - - + + + - - - - + + + + - - - - + + + + @@ -121473,28 +121328,28 @@ - - - + + + - - + + - - - - + + + + - - - + + + @@ -121516,10 +121371,10 @@ - - - - + + + + @@ -121541,11 +121396,11 @@ - - - - - + + + + + @@ -121568,15 +121423,15 @@ - - - + + + - - - - + + + + @@ -121593,14 +121448,14 @@ - - - + + + - - - + + + @@ -121629,22 +121484,22 @@ - - + + - - + + - - - - + + + + @@ -121667,10 +121522,10 @@ - - - - + + + + @@ -121678,15 +121533,15 @@ - - - - + + + + - - - + + + @@ -121793,11 +121648,11 @@ - - - - - + + + + + @@ -121995,29 +121850,29 @@ - - - - + + + + - - - + + + - - - - + + + + - - - - - + + + + + @@ -122027,10 +121882,10 @@ - - - - + + + + @@ -122069,14 +121924,14 @@ - - - - - - - - + + + + + + + + @@ -122089,9 +121944,9 @@ - - - + + + @@ -122124,8 +121979,8 @@ - - + + @@ -122192,14 +122047,14 @@ - - - + + + - - - + + + @@ -122207,10 +122062,10 @@ - - - - + + + + @@ -122255,15 +122110,15 @@ - - - - + + + + - - - + + + @@ -122362,16 +122217,16 @@ - - - + + + - - - - - + + + + + @@ -122421,46 +122276,46 @@ - - - + + + - - - - - + + + + + - - - - - + + + + + - - + + - - - - - + + + + + - - + + - - + + @@ -122555,9 +122410,9 @@ - - - + + + @@ -122579,17 +122434,17 @@ - - + + - - - + + + - - + + @@ -122597,15 +122452,15 @@ - - - + + + - - - - + + + + @@ -122616,34 +122471,34 @@ - - + + - - - - + + + + - - + + - - - + + + - - - - + + + + @@ -122655,9 +122510,9 @@ - - - + + + @@ -122665,8 +122520,8 @@ - - + + @@ -122677,15 +122532,15 @@ - + - - - - - - + + + + + + @@ -122697,13 +122552,13 @@ - - - - + + + + - - + + @@ -122723,10 +122578,10 @@ - - - - + + + + @@ -122876,46 +122731,46 @@ - - - + + + - - - + + + - - + + - - - - - + + + + + - - + + - - - + + + - - - - + + + + - - - - - + + + + + @@ -123048,8 +122903,8 @@ - - + + @@ -123082,16 +122937,16 @@ - - + + - - + + - - + + @@ -123103,8 +122958,8 @@ - - + + @@ -123115,8 +122970,8 @@ - - + + @@ -123136,9 +122991,9 @@ - - - + + + @@ -123148,62 +123003,62 @@ - - + + - - - + + + - - + + - - - + + + - - - - + + + + - - - + + + - - - + + + - - - + + + - - - + + + - - + + - - - + + + - - - + + + @@ -123221,14 +123076,14 @@ - - - + + + - - - + + + @@ -123263,13 +123118,13 @@ - - - - - - - + + + + + + + @@ -123493,62 +123348,62 @@ - - + + - - - + + + - - + + - - - - - + + + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - + + - - + + @@ -123564,15 +123419,15 @@ - - + + - - - - - + + + + + @@ -123583,10 +123438,10 @@ - - - - + + + + @@ -123615,8 +123470,8 @@ - - + + @@ -123624,9 +123479,9 @@ - - - + + + @@ -123663,9 +123518,9 @@ - - - + + + @@ -123674,8 +123529,8 @@ - - + + @@ -123683,19 +123538,19 @@ - - - - - + + + + + - - - - - - + + + + + + @@ -123703,20 +123558,20 @@ - - + + - - + + - - + + - - + + @@ -123729,17 +123584,17 @@ - - + + - - + + - - - + + + @@ -123786,19 +123641,19 @@ - - - - - - - + + + + + + + - - - + + + @@ -123806,17 +123661,17 @@ - - - + + + - - + + @@ -123834,20 +123689,20 @@ - - + + - - + + - - + + @@ -123860,11 +123715,11 @@ - - - - - + + + + + @@ -123875,33 +123730,33 @@ - - - + + + - - - - + + + + - - - - + + + + - - + + - - + + @@ -124185,23 +124040,23 @@ - - + + - - - - + + + + - - - + + + @@ -124217,12 +124072,12 @@ - - - - - - + + + + + + @@ -124274,20 +124129,20 @@ - - + + - - - - + + + + - - - - + + + + @@ -124442,10 +124297,10 @@ - - - - + + + + @@ -124495,9 +124350,9 @@ - - - + + + @@ -124626,19 +124481,19 @@ - - - + + + - - - + + + - - - + + + @@ -124739,8 +124594,8 @@ - - + + @@ -124762,9 +124617,9 @@ - - - + + + @@ -124792,8 +124647,8 @@ - - + + @@ -124808,24 +124663,24 @@ - - + + - - - + + + - - - - + + + + - - - + + + @@ -124844,9 +124699,9 @@ - - - + + + @@ -124860,18 +124715,18 @@ - - + + - - - + + + - - - + + + @@ -124892,9 +124747,9 @@ - - - + + + @@ -124925,28 +124780,28 @@ - - + + - - + + - - - + + + - - - - + + + + - - - + + + @@ -124957,83 +124812,83 @@ - - - + + + - - - - + + + + - - - + + + - - + + - - - + + + - - + + - - + + - - - + + + - - + + - - - + + + - - + + - - + + - - + + - - - - + + + + - - - - + + + + @@ -125089,17 +124944,17 @@ - - + + - - + + - - - + + + @@ -125113,20 +124968,20 @@ - - + + - - + + - - + + @@ -125195,9 +125050,9 @@ - - - + + + @@ -125205,44 +125060,44 @@ - - + + - - - - - + + + + + - - - - - - - + + + + + + + - - - - + + + + - - - - + + + + - - - - - - + + + + + + @@ -125252,12 +125107,12 @@ - - - - - - + + + + + + @@ -125268,9 +125123,9 @@ - - - + + + @@ -125278,18 +125133,18 @@ - - - - + + + + - - - - - - - + + + + + + + @@ -125304,30 +125159,30 @@ - - - - - + + + + + - - - - - + + + + + - - - - - + + + + + - - - - + + + + @@ -125363,8 +125218,8 @@ - - + + @@ -125440,20 +125295,20 @@ - - + + - - - - - - - - - - + + + + + + + + + + @@ -125462,19 +125317,19 @@ - - - + + + - - - - + + + + - - - + + + @@ -125501,36 +125356,36 @@ - - - - + + + + - - + + - - - + + + - - - - + + + + - - - - + + + + @@ -125769,8 +125624,8 @@ - - + + @@ -125784,13 +125639,13 @@ - - + + - - - + + + @@ -125829,14 +125684,14 @@ - - - + + + - - - + + + @@ -125844,17 +125699,17 @@ - - - - + + + + - - + + @@ -125869,9 +125724,9 @@ - - - + + + @@ -125885,50 +125740,50 @@ - - - - + + + + - - + + - - + + - - + + - - - - + + + + - - - - + + + + - - + + - - - + + + - - + + @@ -125938,15 +125793,15 @@ - - - + + + - - - - + + + + @@ -125979,27 +125834,27 @@ - - - - + + + + - - - - - + + + + + - - - + + + - - + + @@ -126013,9 +125868,9 @@ - - - + + + @@ -126024,30 +125879,30 @@ - - - + + + - - + + - - - + + + - - - - + + + + - - - - + + + + @@ -126063,26 +125918,26 @@ - - + + - - - + + + - - + + - - - + + + @@ -126099,8 +125954,8 @@ - - + + @@ -126115,8 +125970,8 @@ - - + + @@ -126164,18 +126019,18 @@ - - - + + + - - + + - - - + + + @@ -126183,13 +126038,13 @@ - - + + - - - + + + @@ -126197,9 +126052,9 @@ - - - + + + @@ -126257,8 +126112,8 @@ - - + + @@ -126267,9 +126122,9 @@ - - - + + + @@ -126282,8 +126137,8 @@ - - + + @@ -126326,12 +126181,12 @@ - - + + - - + + @@ -126368,35 +126223,35 @@ - - + + - - - + + + - - - - - - - + + + + + + + - - - - - - + + + + + + - - - + + + @@ -126408,13 +126263,13 @@ - - - + + + - - + + @@ -126457,33 +126312,33 @@ - - - - - + + + + + - - - - - + + + + + - - - - + + + + - - - + + + - - - - + + + + @@ -126504,8 +126359,8 @@ - - + + @@ -126530,10 +126385,10 @@ - - - - + + + + @@ -126543,12 +126398,12 @@ - - + + - - + + @@ -126559,17 +126414,17 @@ - - - - - - - + + + + + + + - - + + @@ -126586,8 +126441,8 @@ - - + + @@ -126613,15 +126468,15 @@ - - + + - - - - - + + + + + @@ -126633,8 +126488,8 @@ - - + + @@ -126660,8 +126515,8 @@ - - + + @@ -126671,20 +126526,20 @@ - - + + - + - - - + + + @@ -126698,41 +126553,41 @@ - - - - + + + + - - - + + + - - - + + + - - - + + + - - + + - - + + - - - + + + @@ -126742,13 +126597,13 @@ - - + + - - - + + + @@ -126762,41 +126617,41 @@ - - - - - - + + + + + + - - + + - - - - - - + + + + + + - - - - - + + + + + - - - - - - - - + + + + + + + + @@ -126810,8 +126665,8 @@ - - + + @@ -126823,18 +126678,18 @@ - - + + - - - - + + + + @@ -126858,23 +126713,23 @@ - - - + + + - - - + + + - - - + + + - - + + @@ -126887,9 +126742,9 @@ - - - + + + @@ -126897,29 +126752,29 @@ - - - - + + + + - - + + - - - - - + + + + + - - - - - - + + + + + + @@ -126952,9 +126807,9 @@ - - - + + + @@ -126963,13 +126818,13 @@ - - + + - - - + + + @@ -127066,8 +126921,8 @@ - - + + @@ -127092,13 +126947,13 @@ - - - + + + - - + + @@ -127143,10 +126998,10 @@ - - + + - + @@ -127161,22 +127016,22 @@ - - - + + + - - - + + + - - + + - - + + @@ -127227,38 +127082,38 @@ - - - - + + + + - - - - - - - - + + + + + + + + - - + + - - + + - + - - + + @@ -127269,9 +127124,9 @@ - - - + + + @@ -127286,26 +127141,26 @@ - - + + - - - - + + + + - - - - - - + + + + + + - - + + @@ -127320,28 +127175,28 @@ - - + + - - - + + + - - + + - - - - - + + + + + - - - - + + + + @@ -127356,28 +127211,28 @@ - - - - - + + + + + - - + + - - - - - + + + + + - - - - + + + + @@ -127399,18 +127254,18 @@ - - + + - - + + - - + + @@ -127433,12 +127288,12 @@ - - + + - - + + @@ -127475,9 +127330,9 @@ - - - + + + @@ -127512,81 +127367,81 @@ - - - + + + - - - + + + - - - - + + + + - - - - - - + + + + + + - - - - + + + + - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + @@ -127711,12 +127566,12 @@ - - + + - - + + @@ -127759,14 +127614,14 @@ - - + + - - - - + + + + @@ -127787,36 +127642,36 @@ - - - - - + + + + + - - + + - - - + + + - - - - - - + + + + + + - - - - - - + + + + + + @@ -127827,39 +127682,39 @@ - - + + - - - + + + - - - - + + + + - - - + + + - - + + - - - + + + - - - - + + + + @@ -127885,14 +127740,14 @@ - - + + - - - - + + + + @@ -127909,8 +127764,8 @@ - - + + @@ -128000,14 +127855,14 @@ - - - - - - - - + + + + + + + + @@ -128017,8 +127872,8 @@ - - + + @@ -128042,9 +127897,9 @@ - - - + + + @@ -128064,18 +127919,18 @@ - - - - + + + + - - - + + + @@ -128083,27 +127938,27 @@ - - - - - - + + + + + + - - - + + + - - - + + + - - - + + + @@ -128113,8 +127968,8 @@ - - + + @@ -128135,8 +127990,8 @@ - - + + @@ -128151,8 +128006,8 @@ - - + + @@ -128185,20 +128040,20 @@ - - + + - - + + - - + + @@ -128235,12 +128090,12 @@ - - + + - - + + @@ -128248,34 +128103,34 @@ - - + + - - - + + + - - - - + + + + - - - - + + + + - - - + + + - - + + @@ -128357,9 +128212,9 @@ - - - + + + @@ -128520,41 +128375,41 @@ - - - + + + - - + + - - - - - - + + + + + + - - - - - - + + + + + + - - - - + + + + - - - - + + + + @@ -128562,53 +128417,53 @@ - - - - + + + + - - - - - + + + + + - - - - + + + + - - + + - - + + - - - - - - + + + + + + - - - - - + + + + + @@ -128643,8 +128498,8 @@ - - + + @@ -128744,13 +128599,13 @@ - - - + + + - - + + @@ -128761,15 +128616,15 @@ - - - - - - - - - + + + + + + + + + @@ -128805,9 +128660,9 @@ - - - + + + @@ -128833,30 +128688,30 @@ - - - + + + - - - - + + + + - - - - + + + + - - - + + + @@ -128869,10 +128724,10 @@ - - - - + + + + @@ -128880,11 +128735,11 @@ - - - - - + + + + + @@ -128907,10 +128762,10 @@ - - - - + + + + @@ -128923,20 +128778,20 @@ - - - + + + - - - - + + + + - + - - + + @@ -128946,9 +128801,9 @@ - - - + + + @@ -129037,14 +128892,14 @@ - - - + + + - - + + @@ -129126,8 +128981,8 @@ - - + + @@ -129137,66 +128992,66 @@ - - + + - - - - - - - - - + + + + + + + + + - - + + - - - - - - - - - + + + + + + + + + - - + + - - + + - - + + - - + + - + - - - - + + + + @@ -129216,21 +129071,21 @@ - - - - + + + + - - - + + + - - - - + + + + @@ -129241,23 +129096,23 @@ - - - - - - - - + + + + + + + + - - + + - - - + + + @@ -129266,10 +129121,10 @@ - - - - + + + + @@ -129301,46 +129156,46 @@ - - - - + + + + - - - + + + - - + + - - + + - - - + + + - - - - - + + + + + - - + + - - - + + + @@ -129349,31 +129204,31 @@ - - - - + + + + - - - - + + + + - - - - + + + + - - - + + + - - + + @@ -129382,23 +129237,23 @@ - - - + + + - - - + + + - - - + + + @@ -129406,34 +129261,34 @@ - - - - + + + + - - - + + + - - - - + + + + - - - - + + + + - - - - - + + + + + @@ -129443,16 +129298,16 @@ - - - - + + + + - - - - + + + + @@ -129468,10 +129323,10 @@ - - - - + + + + @@ -129481,10 +129336,10 @@ - - - - + + + + @@ -129494,37 +129349,37 @@ - - - - + + + + - - - - - + + + + + - - - - - + + + + + - - - - + + + + - - - - - + + + + + @@ -129535,9 +129390,9 @@ - - - + + + @@ -129551,11 +129406,11 @@ - - - - - + + + + + @@ -129587,11 +129442,11 @@ - - + + - + @@ -129608,15 +129463,15 @@ - - + + - - + + - - + + @@ -129636,8 +129491,8 @@ - - + + @@ -129647,8 +129502,8 @@ - - + + @@ -129660,8 +129515,8 @@ - - + + @@ -129675,18 +129530,18 @@ - - - + + + - - - - + + + + - - + + @@ -129694,10 +129549,10 @@ - - - - + + + + @@ -129710,14 +129565,14 @@ - - - - + + + + - - + + @@ -129753,18 +129608,18 @@ - - - + + + - - - + + + @@ -129775,8 +129630,8 @@ - - + + @@ -129787,29 +129642,29 @@ - - - - + + + + - - - - - + + + + + - - + + - - - + + + - - + + @@ -129828,11 +129683,11 @@ - - - - - + + + + + @@ -129840,8 +129695,8 @@ - - + + @@ -129859,11 +129714,11 @@ - - - - - + + + + + @@ -129891,21 +129746,21 @@ - - - + + + - - - - + + + + - - - - + + + + @@ -129918,9 +129773,9 @@ - - - + + + @@ -129931,13 +129786,13 @@ - - + + - - - + + + @@ -129945,50 +129800,50 @@ - - - + + + - - + + - - + + - - - + + + - - - + + + - - - + + + - - - + + + - - + + - - + + - - - + + + @@ -130002,8 +129857,8 @@ - - + + @@ -130079,9 +129934,9 @@ - - - + + + @@ -130119,12 +129974,12 @@ - - + + - - - + + + @@ -130134,17 +129989,17 @@ - - - + + + - - - + + + - + @@ -130157,9 +130012,9 @@ - - - + + + @@ -130239,10 +130094,10 @@ - - - - + + + + @@ -130270,13 +130125,13 @@ - - - - - - - + + + + + + + @@ -130463,12 +130318,12 @@ - - + + - - + + @@ -130480,11 +130335,11 @@ - - - - - + + + + + @@ -130525,8 +130380,8 @@ - - + + @@ -130579,8 +130434,8 @@ - - + + @@ -130592,9 +130447,9 @@ - - - + + + @@ -130605,28 +130460,28 @@ - - - + + + - - - - - - + + + + + + - - + + - - - - - + + + + + @@ -130637,9 +130492,9 @@ - - - + + + @@ -130700,8 +130555,8 @@ - - + + @@ -130740,9 +130595,9 @@ - - - + + + @@ -130798,8 +130653,8 @@ - - + + @@ -130852,51 +130707,51 @@ - - + + - - + + - - - + + + - - + + - - + + - - + + - - + + - - + + - - - - - + + + + + @@ -130904,18 +130759,18 @@ - - - - + + + + - - + + @@ -130923,14 +130778,14 @@ - - - - + + + + - - - + + + @@ -130966,17 +130821,17 @@ - - + + - - - + + + @@ -130986,9 +130841,9 @@ - - - + + + @@ -131030,12 +130885,12 @@ - - + + - - + + @@ -131049,67 +130904,67 @@ - - - + + + - - + + - - + + - - + + - - + + - - - - - + + + + + - - + + - - + + - - + + - - + + - - + + - - - + + + - - - + + + @@ -131117,19 +130972,19 @@ - - + + - - + + - - - - - + + + + + @@ -131140,41 +130995,41 @@ - - - - + + + + - - - + + + - - + + - - - - - + + + + + - - + + - - + + @@ -131188,16 +131043,16 @@ - - - - + + + + - - - - + + + + @@ -131218,11 +131073,11 @@ - - - - - + + + + + @@ -131239,24 +131094,24 @@ - - - - + + + + - - - - - + + + + + - - - - - + + + + + @@ -131291,12 +131146,12 @@ - - + + - - + + @@ -131321,18 +131176,18 @@ - - - + + + - - + + - - - + + + @@ -131356,18 +131211,18 @@ - - - - - + + + + + - - - - - + + + + + @@ -131378,19 +131233,19 @@ - - - - + + + + - - + + - - - + + + @@ -131409,14 +131264,14 @@ - - - + + + - - - + + + @@ -131442,9 +131297,9 @@ - - - + + + @@ -131457,22 +131312,22 @@ - - - - + + + + - - + + - - + + @@ -131486,43 +131341,43 @@ - - + + - - - + + + - - - + + + - - - - - + + + + + - - - + + + - - - - - + + + + + @@ -131535,9 +131390,9 @@ - - - + + + @@ -131570,14 +131425,14 @@ - - - - + + + + - - + + @@ -131588,44 +131443,44 @@ - - - - + + + + - - - + + + - - + + - - - + + + - - - + + + - - - + + + - - - - + + + + @@ -131659,16 +131514,16 @@ - - - - - - + + + + + + - - - + + + @@ -131676,9 +131531,9 @@ - - - + + + @@ -131722,33 +131577,33 @@ - - - + + + - - - + + + - - + + - - + + - - - + + + - - - - + + + + @@ -131773,9 +131628,9 @@ - - - + + + @@ -131791,32 +131646,32 @@ - - - - + + + + - - + + - - + + - - - + + + - - - + + + - - - + + + @@ -131825,9 +131680,9 @@ - - - + + + @@ -131835,74 +131690,74 @@ - - - + + + - - + + - - - + + + - - - + + + - - - - + + + + - - - - + + + + - - + + - - - + + + - - - + + + - - - + + + - - - - + + + + - - + + - - + + - - - - + + + + @@ -131914,42 +131769,42 @@ - - - - + + + + - - - - - - + + + + + + - - - - - - + + + + + + - - - - - - + + + + + + - - + + @@ -131964,8 +131819,8 @@ - - + + @@ -131985,8 +131840,8 @@ - - + + @@ -132000,61 +131855,61 @@ - - - - - + + + + + - - - + + + - - - - - + + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - - - + + + + + + - - - - - + + + + + - - - - + + + + @@ -132072,12 +131927,12 @@ - - - - - - + + + + + + @@ -132088,12 +131943,12 @@ - - - - - - + + + + + + @@ -132108,9 +131963,9 @@ - - - + + + @@ -132123,15 +131978,15 @@ - - + + - - - - - + + + + + @@ -132148,10 +132003,10 @@ - - - - + + + + @@ -132171,10 +132026,10 @@ - - - - + + + + @@ -132208,8 +132063,8 @@ - - + + @@ -132220,8 +132075,8 @@ - - + + @@ -132324,33 +132179,33 @@ - - + + - - + + - - - - - - + + + + + + - - - + + + - - + + @@ -132376,8 +132231,8 @@ - - + + @@ -132392,16 +132247,16 @@ - - + + - - + + - - + + @@ -132486,19 +132341,19 @@ - - - + + + - - - + + + - - - + + + @@ -132513,8 +132368,8 @@ - - + + @@ -132545,9 +132400,9 @@ - - - + + + @@ -132577,14 +132432,14 @@ - - - + + + - - - + + + @@ -132597,9 +132452,9 @@ - - - + + + @@ -132607,10 +132462,10 @@ - - - - + + + + @@ -132624,12 +132479,12 @@ - - + + - - + + @@ -132650,9 +132505,9 @@ - - - + + + @@ -132664,9 +132519,9 @@ - - - + + + @@ -132714,8 +132569,8 @@ - - + + @@ -132761,9 +132616,9 @@ - - - + + + @@ -132779,10 +132634,10 @@ - - - - + + + + @@ -132803,10 +132658,10 @@ - - - - + + + + @@ -132839,17 +132694,17 @@ - - + + - - - + + + @@ -132863,40 +132718,40 @@ - - + + - - + + - - - - - + + + + + - - - + + + - - - + + + - - + + - - + + - - + + @@ -132918,20 +132773,20 @@ - - - - - - + + + + + + - - + + - - + + @@ -132939,21 +132794,21 @@ - - - - - + + + + + - - - - - + + + + + - - + + @@ -132964,7 +132819,7 @@ - + @@ -132983,21 +132838,21 @@ - - - - + + + + - - - - - - - - - + + + + + + + + + @@ -133031,8 +132886,8 @@ - - + + @@ -133052,9 +132907,9 @@ - - - + + + @@ -133062,23 +132917,23 @@ - - - + + + - - - + + + - - - + + + @@ -133099,37 +132954,37 @@ - - + + - - - - + + + + - - - + + + - - + + - - - - + + + + @@ -133143,11 +132998,11 @@ - - - - - + + + + + @@ -133198,10 +133053,10 @@ - - - - + + + + @@ -133260,24 +133115,24 @@ - - + + - - + + - - + + @@ -133287,11 +133142,11 @@ - - - - - + + + + + @@ -133336,14 +133191,14 @@ - - - - + + + + - - - + + + @@ -133575,8 +133430,8 @@ - - + + @@ -133596,29 +133451,29 @@ - - - + + + - - + + - - + + - - + + - - + + - - + + @@ -133630,14 +133485,14 @@ - - - + + + - - - + + + @@ -133650,16 +133505,16 @@ - - - - + + + + - - - - + + + + @@ -133711,12 +133566,12 @@ - - + + - - + + @@ -133763,24 +133618,24 @@ - - + + - - + + - - + + - - + + @@ -133800,13 +133655,13 @@ - - + + - - - + + + @@ -133820,18 +133675,19 @@ - - - - + + + + - - - - + + + + + @@ -133849,8 +133705,8 @@ - - + + @@ -133865,8 +133721,8 @@ - - + + @@ -133900,8 +133756,8 @@ - - + + @@ -133919,10 +133775,10 @@ - - - - + + + + @@ -133935,54 +133791,54 @@ - - + + - - - + + + - - + + - + - + - - - - + + + + - - - - + + + + - - - - - - - - - + + + + + + + + + - - + + - - + + @@ -133991,36 +133847,36 @@ - - - - - + + + + + - - - - - - + + + + + + - - - - - - - + + + + + + + - - - - - - + + + + + + @@ -134031,12 +133887,12 @@ - - - - - - + + + + + + @@ -134055,9 +133911,9 @@ - - - + + + @@ -134067,8 +133923,8 @@ - - + + @@ -134082,10 +133938,10 @@ - - - - + + + + @@ -134098,13 +133954,13 @@ - - - + + + - - + + @@ -134157,11 +134013,11 @@ - - - - - + + + + + @@ -134177,20 +134033,20 @@ - - + + - - + + - - + + @@ -134198,24 +134054,24 @@ - - + + - - + + - - + + @@ -134275,8 +134131,8 @@ - - + + @@ -134286,21 +134142,21 @@ - - - - - + + + + + - - - - + + + + @@ -134314,19 +134170,19 @@ - - - + + + - - + + - - - - + + + + @@ -134349,48 +134205,48 @@ - - - + + + - - - + + + - - - + + + - - + + - - + + - - - + + + - - + + - - + + - - + + - - + + @@ -134399,7 +134255,7 @@ - + @@ -134439,17 +134295,17 @@ - + - + - - + + @@ -134468,8 +134324,8 @@ - - + + @@ -134496,31 +134352,31 @@ - - + + - - - - + + + + - - - + + + - - - + + + @@ -134580,8 +134436,8 @@ - - + + @@ -134622,16 +134478,16 @@ - - + + - - + + - - + + @@ -134642,8 +134498,8 @@ - - + + @@ -134666,12 +134522,12 @@ - - + + - - + + @@ -134687,8 +134543,8 @@ - - + + @@ -134807,10 +134663,10 @@ - - - - + + + + @@ -134819,20 +134675,20 @@ - - - - - - - - + + + + + + + + - - - - + + + + @@ -134840,14 +134696,14 @@ - - - + + + - - - + + + @@ -134865,8 +134721,8 @@ - - + + @@ -134878,8 +134734,8 @@ - - + + @@ -134916,8 +134772,8 @@ - - + + @@ -134968,22 +134824,22 @@ - - - - + + + + - - - - + + + + - - - - + + + + @@ -135073,8 +134929,8 @@ - - + + @@ -135082,22 +134938,22 @@ - - + + - - - - - - + + + + + + - - - - + + + + @@ -135110,9 +134966,9 @@ - - - + + + @@ -135120,9 +134976,9 @@ - - - + + + @@ -135170,13 +135026,13 @@ - - - - - - - + + + + + + + @@ -135184,28 +135040,28 @@ - - + + - - + + - - + + - - + + - - + + @@ -135221,20 +135077,20 @@ - - - - - - + + + + + + - - - + + + - - + + @@ -135250,8 +135106,8 @@ - - + + @@ -135268,8 +135124,8 @@ - - + + @@ -135282,15 +135138,15 @@ - - - + + + - - - - + + + + @@ -135298,39 +135154,39 @@ - - - + + + - - - - + + + + - - + + - - - + + + - - - - + + + + - - - + + + - - - + + + @@ -135338,30 +135194,30 @@ - - - - + + + + - - - - + + + + - - - - + + + + - - + + - - + + @@ -135488,8 +135344,8 @@ - - + + @@ -135608,12 +135464,12 @@ - - + + - - + + @@ -135630,9 +135486,9 @@ - - - + + + @@ -135640,9 +135496,9 @@ - - - + + + @@ -135650,9 +135506,9 @@ - - - + + + @@ -135677,12 +135533,12 @@ - - + + - - + + @@ -135700,10 +135556,10 @@ - - - - + + + + @@ -135720,62 +135576,62 @@ - - - - + + + + - - - + + + - - + + - - - - - - + + + + + + - - - - + + + + - - - - - - - + + + + + + + - - - + + + - - - + + + - - - + + + - - - - + + + + @@ -135786,7 +135642,7 @@ - + @@ -135820,10 +135676,10 @@ - - - - + + + + @@ -135865,7 +135721,7 @@ - + @@ -135873,34 +135729,34 @@ - - + + - - + + - - + + - - - - - - + + + + + + - - - - + + + + - - + + @@ -135911,10 +135767,10 @@ - - - - + + + + @@ -135924,8 +135780,8 @@ - - + + @@ -135936,8 +135792,8 @@ - - + + @@ -135975,8 +135831,8 @@ - - + + @@ -136014,14 +135870,14 @@ - - - - - + + + + + - - + + @@ -136059,11 +135915,11 @@ - - - - - + + + + + @@ -136207,21 +136063,21 @@ - - + + - - - + + + - - + + - - + + @@ -136255,11 +136111,11 @@ - - - - - + + + + + @@ -136274,21 +136130,21 @@ - - + + - - + + - - + + - - - + + + @@ -136304,11 +136160,11 @@ - - - - - + + + + + @@ -136349,21 +136205,21 @@ - - - - + + + + - - - - + + + + - - - + + + @@ -136384,26 +136240,26 @@ - - - - + + + + - - - + + + - - - - - + + + + + - - - + + + @@ -136412,20 +136268,20 @@ - - - + + + - - - + + + - - - + + + @@ -136435,26 +136291,26 @@ - - - + + + - - - + + + - - - - + + + + - - - - + + + + @@ -136600,9 +136456,9 @@ - - - + + + @@ -136611,9 +136467,9 @@ - - - + + + @@ -136621,21 +136477,21 @@ - - + + - - - - + + + + - - + + - - + + @@ -136643,15 +136499,15 @@ - - - + + + - - - - + + + + @@ -136663,33 +136519,33 @@ - - - - - - + + + + + + - - - - - - + + + + + + - - - - + + + + - - - + + + @@ -136697,28 +136553,28 @@ - - - + + + - - - - - + + + + + - - + + - - - + + + - - + + @@ -136729,13 +136585,13 @@ - - - - - - - + + + + + + + @@ -136767,14 +136623,14 @@ - - + + - - - - + + + + @@ -136782,10 +136638,10 @@ - - - - + + + + @@ -136793,10 +136649,10 @@ - - - - + + + + @@ -136819,10 +136675,10 @@ - - - - + + + + @@ -136838,29 +136694,29 @@ - + - - + + - - + + - - - - + + + + - - - - - - + + + + + + @@ -136889,13 +136745,13 @@ - - - - - - - + + + + + + + @@ -136914,10 +136770,10 @@ - - - - + + + + @@ -136934,10 +136790,10 @@ - - - - + + + + @@ -136947,30 +136803,30 @@ - - - + + + - - - - - - + + + + + + - - + + - - - - - - - + + + + + + + @@ -136987,13 +136843,13 @@ - - + + - - - + + + @@ -137012,39 +136868,39 @@ - - - + + + - - - - - + + + + + - - - - - + + + + + - - - - - + + + + + - - - + + + - - + + @@ -137067,55 +136923,55 @@ - - - - - + + + + + - - - - - + + + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - + + - - - + + + - - - + + + @@ -137125,9 +136981,9 @@ - - - + + + @@ -137137,16 +136993,16 @@ - - - - - + + + + + - - - + + + @@ -137181,15 +137037,15 @@ - - - + + + - - - - + + + + @@ -137202,11 +137058,11 @@ - - - - - + + + + + @@ -137216,16 +137072,16 @@ - - - - - + + + + + - - - + + + @@ -137235,8 +137091,8 @@ - - + + @@ -137248,25 +137104,25 @@ - - + + - - + + - - - - - - - + + + + + + + - - + + @@ -137277,9 +137133,9 @@ - - - + + + @@ -137331,9 +137187,9 @@ - - - + + + @@ -137367,22 +137223,22 @@ - - - - - + + + + + - - - - - + + + + + - - + + @@ -137461,13 +137317,13 @@ - - + + - - - + + + @@ -137519,8 +137375,8 @@ - - + + @@ -137536,9 +137392,9 @@ - - - + + + @@ -137548,17 +137404,17 @@ - - - - + + + + - - - - - + + + + + @@ -137575,17 +137431,17 @@ - - + + - - - - - - - + + + + + + + @@ -137594,23 +137450,23 @@ - - + + - - - - + + + + - - - + + + - - + + @@ -137621,12 +137477,12 @@ - - - - - - + + + + + + @@ -137638,8 +137494,8 @@ - - + + @@ -137651,18 +137507,18 @@ - - - - - - + + + + + + - - - - + + + + @@ -137670,12 +137526,12 @@ - - + + - - + + @@ -137713,9 +137569,9 @@ - - - + + + @@ -137727,8 +137583,8 @@ - - + + @@ -137760,45 +137616,45 @@ - - - + + + - - - - + + + + - - - - - - + + + + + + - - - - - - + + + + + + - - - - - + + + + + - - - - - + + + + + @@ -137843,9 +137699,9 @@ - - - + + + @@ -137876,10 +137732,10 @@ - - - - + + + + @@ -137971,14 +137827,14 @@ - - - - + + + + - - + + @@ -137996,8 +137852,8 @@ - - + + @@ -138242,9 +138098,9 @@ - - - + + + @@ -138333,9 +138189,9 @@ - - - + + + @@ -138356,13 +138212,13 @@ - - - - - - - + + + + + + + @@ -138374,29 +138230,29 @@ - - - + + + - - + + - - + + - - - - - - + + + + + + - - + + @@ -138454,9 +138310,9 @@ - - - + + + @@ -138468,17 +138324,17 @@ - - - - - - + + + + + + - - - + + + @@ -138602,9 +138458,9 @@ - - - + + + @@ -138637,30 +138493,30 @@ - - + + - - + + - - + + - - - - + + + + - - - - - - + + + + + + @@ -138683,9 +138539,9 @@ - - - + + + @@ -138703,8 +138559,8 @@ - - + + @@ -138739,10 +138595,10 @@ - - - - + + + + @@ -138751,21 +138607,21 @@ - - - - + + + + - - - + + + - - - - + + + + @@ -138773,21 +138629,21 @@ - - - - + + + + - - - - - + + + + + - - - + + + @@ -138806,12 +138662,12 @@ - - - + + + - - + + @@ -138826,26 +138682,26 @@ - - + + - - + + - - + + - + - + @@ -138857,12 +138713,12 @@ - - + + - - + + @@ -138877,23 +138733,23 @@ - - + + - - + + - - - + + + - + - + @@ -138912,15 +138768,15 @@ - - - + + + - - - - + + + + @@ -138933,20 +138789,20 @@ - - - + + + - - - - + + + + - - - + + + @@ -138968,9 +138824,9 @@ - - - + + + @@ -138979,10 +138835,10 @@ - - - - + + + + @@ -138990,9 +138846,9 @@ - - - + + + @@ -139000,9 +138856,9 @@ - - - + + + @@ -139011,17 +138867,17 @@ - - - - + + + + - + @@ -139033,8 +138889,8 @@ - - + + @@ -139076,8 +138932,8 @@ - - + + @@ -139170,8 +139026,8 @@ - - + + @@ -139180,8 +139036,8 @@ - - + + @@ -139213,19 +139069,19 @@ - - - - - - - - - + + + + + + + + + - - + + @@ -139237,9 +139093,9 @@ - - - + + + @@ -139258,14 +139114,14 @@ - - - - + + + + - - + + @@ -139293,9 +139149,9 @@ - - - + + + @@ -139313,7 +139169,6 @@ - @@ -139335,19 +139190,19 @@ - - + + - - - - + + + + - - - + + + @@ -139365,8 +139220,8 @@ - - + + @@ -139376,24 +139231,24 @@ - - - - - + + + + + - - - - + + + + - - - - - + + + + + @@ -139403,32 +139258,32 @@ - - - - + + + + - - - + + + - - - + + + - - - + + + - - - - + + + + @@ -139445,12 +139300,12 @@ - + - - - + + + @@ -139578,10 +139433,10 @@ - - - - + + + + @@ -139589,10 +139444,10 @@ - - - - + + + + @@ -139671,19 +139526,19 @@ - - - + + + - - - + + + - - - + + + @@ -139713,8 +139568,8 @@ - - + + @@ -139732,16 +139587,16 @@ - - + + - - + + @@ -139794,9 +139649,9 @@ - - - + + + @@ -139810,9 +139665,9 @@ - - - + + + @@ -139851,8 +139706,8 @@ - - + + @@ -139898,9 +139753,9 @@ - - - + + + @@ -139991,11 +139846,11 @@ - - - - - + + + + + @@ -140230,9 +140085,9 @@ - - - + + + @@ -140350,15 +140205,15 @@ - - + + - - - - - + + + + + @@ -140392,8 +140247,8 @@ - - + + @@ -140432,17 +140287,17 @@ - - + + - - + + - - - + + + @@ -140453,8 +140308,8 @@ - - + + @@ -140485,12 +140340,12 @@ - - + + - - + + @@ -140513,8 +140368,8 @@ - - + + @@ -140536,8 +140391,8 @@ - - + + @@ -140573,9 +140428,9 @@ - - - + + + @@ -140598,9 +140453,9 @@ - - - + + + @@ -140615,16 +140470,16 @@ - - + + - - + + - - + + @@ -140643,8 +140498,8 @@ - - + + @@ -140659,16 +140514,16 @@ - - - - - - - - - - + + + + + + + + + + @@ -140702,8 +140557,8 @@ - - + + @@ -140718,15 +140573,15 @@ - - - - + + + + - - - + + + @@ -140737,9 +140592,9 @@ - - - + + + @@ -140751,9 +140606,9 @@ - - - + + + @@ -140772,24 +140627,24 @@ - - - + + + - - - - + + + + - - - + + + @@ -140816,8 +140671,8 @@ - - + + @@ -140836,9 +140691,9 @@ - - - + + + @@ -140847,28 +140702,28 @@ - - - - + + + + - - + + - - + + - - - + + + - - - + + + @@ -140877,14 +140732,14 @@ - - - - + + + + - - + + @@ -140895,9 +140750,9 @@ - - - + + + @@ -140912,8 +140767,8 @@ - - + + @@ -140935,8 +140790,8 @@ - - + + @@ -141038,15 +140893,15 @@ - - - + + + - - - - + + + + @@ -141058,8 +140913,8 @@ - - + + @@ -141125,16 +140980,16 @@ - - + + - - + + @@ -141142,10 +140997,10 @@ - - - - + + + + @@ -141169,38 +141024,38 @@ - - + + - - + + - - - + + + - - - + + + - - + + - - + + @@ -141208,10 +141063,10 @@ - - - - + + + + @@ -141235,9 +141090,9 @@ - - - + + + @@ -141245,8 +141100,8 @@ - - + + @@ -141285,9 +141140,9 @@ - - - + + + @@ -141308,10 +141163,10 @@ - - - - + + + + @@ -141361,9 +141216,9 @@ - - - + + + @@ -141423,21 +141278,21 @@ - - - + + + - - - - - - + + + + + + - - + + @@ -141613,9 +141468,9 @@ - - - + + + @@ -141629,27 +141484,27 @@ - - + + - - - - + + + + - - - + + + @@ -141663,33 +141518,33 @@ - - - - - + + + + + - - - + + + - - + + - - + + - - + + - - - + + + @@ -141935,15 +141790,15 @@ - - - + + + - - - - + + + + @@ -141994,15 +141849,15 @@ - - - + + + - - - + + + @@ -142015,15 +141870,15 @@ - - - - + + + + - - - + + + @@ -142101,9 +141956,9 @@ - - - + + + @@ -142119,36 +141974,36 @@ - - - + + + - - - - - + + + + + - - - - + + + + - - - - + + + + - - - + + + - - + + @@ -142163,9 +142018,9 @@ - - - + + + @@ -142180,14 +142035,14 @@ - - - + + + - - - + + + @@ -142229,15 +142084,15 @@ - - + + - - - - - + + + + + @@ -142245,11 +142100,11 @@ - - - - - + + + + + @@ -142265,8 +142120,8 @@ - - + + @@ -142286,8 +142141,8 @@ - - + + @@ -142330,8 +142185,8 @@ - - + + @@ -142367,8 +142222,8 @@ - - + + @@ -142435,9 +142290,9 @@ - - - + + + @@ -142508,26 +142363,26 @@ - - - - - - - + + + + + + + - - + + - - - + + + @@ -142564,21 +142419,21 @@ - - - + + + - - - + + + - - - + + + @@ -142642,15 +142497,15 @@ - - + + - - + + @@ -142661,16 +142516,16 @@ - - - - - + + + + + - - - + + + @@ -142679,11 +142534,11 @@ - - - - - + + + + + @@ -142692,9 +142547,9 @@ - - - + + + @@ -142744,11 +142599,11 @@ - - - - - + + + + + @@ -142758,23 +142613,23 @@ - - - - + + + + - - - + + + - - + + - - + + @@ -142787,12 +142642,12 @@ - - + + - - + + @@ -142800,8 +142655,8 @@ - - + + @@ -142818,8 +142673,8 @@ - - + + @@ -142827,12 +142682,12 @@ - - - + + + - + @@ -142841,9 +142696,9 @@ - - - + + + @@ -142866,17 +142721,17 @@ - - - + + + - - + + @@ -142943,28 +142798,28 @@ - - - + + + - - - - - + + + + + - - - - - + + + + + - - - + + + @@ -142974,17 +142829,17 @@ - - + + - - - - + + + + @@ -142995,26 +142850,26 @@ - - - - + + + + - - - - + + + + - - + + - - - - + + + + @@ -143025,9 +142880,9 @@ - - - + + + @@ -143059,10 +142914,10 @@ - - - - + + + + @@ -143095,9 +142950,9 @@ - - - + + + @@ -143114,15 +142969,15 @@ - - - - + + + + - - - + + + @@ -143146,12 +143001,12 @@ - - - - - - + + + + + + @@ -143173,13 +143028,13 @@ - - + + - - - + + + @@ -143196,10 +143051,10 @@ - - - - + + + + @@ -143210,47 +143065,47 @@ - - - + + + - - + + - - - - - - - + + + + + + + - - + + - - - + + + - - - - - - - + + + + + + + - - - - - - + + + + + + diff --git a/android/abi_gki_aarch64_oplus b/android/abi_gki_aarch64_oplus index bb62b99da69a..9afce39e651c 100644 --- a/android/abi_gki_aarch64_oplus +++ b/android/abi_gki_aarch64_oplus @@ -2585,6 +2585,9 @@ __traceiter_android_vh_alter_rwsem_list_add __traceiter_android_vh_arch_set_freq_scale __traceiter_android_vh_binder_alloc_new_buf_locked + __traceiter_android_vh_binder_new_ref + __traceiter_android_vh_binder_del_ref + __traceiter_android_vh_binder_proc_transaction __traceiter_android_vh_binder_preset __traceiter_android_vh_binder_priority_skip __traceiter_android_vh_binder_reply @@ -2776,6 +2779,9 @@ __tracepoint_android_vh_alter_rwsem_list_add __tracepoint_android_vh_arch_set_freq_scale __tracepoint_android_vh_binder_alloc_new_buf_locked + __tracepoint_android_vh_binder_new_ref + __tracepoint_android_vh_binder_del_ref + __tracepoint_android_vh_binder_proc_transaction __tracepoint_android_vh_binder_preset __tracepoint_android_vh_binder_priority_skip __tracepoint_android_vh_binder_reply From 53a812c6bbf3d88187f5f31a09b5499afc2930fb Mon Sep 17 00:00:00 2001 From: Tengfei Fan Date: Mon, 22 Nov 2021 09:15:36 +0800 Subject: [PATCH 15/18] ANDROID: sched: add hook point in do_sched_yield() When a task yields, it relinquishes the cpu and scheduler is tasked to find another task. However our vendor scheduler logic implementation could return the same task leading to a loop where the yielded task gets to run back, so add hook point in do_sched_yield() for vendor can do some work before task is scheduled. Bug: 205804537 Change-Id: I6528c3f4b0ee360559ef9c97cb1eb2b2d1357870 Signed-off-by: Tengfei Fan --- android/abi_gki_aarch64.xml | 8 ++++++++ android/abi_gki_aarch64_qcom | 2 ++ drivers/android/vendor_hooks.c | 1 + include/trace/hooks/sched.h | 4 ++++ kernel/sched/core.c | 2 ++ 5 files changed, 17 insertions(+) diff --git a/android/abi_gki_aarch64.xml b/android/abi_gki_aarch64.xml index dc0b6e34ebff..13fc6e4a3c82 100644 --- a/android/abi_gki_aarch64.xml +++ b/android/abi_gki_aarch64.xml @@ -280,6 +280,7 @@ + @@ -5680,6 +5681,7 @@ + @@ -114561,6 +114563,11 @@ + + + + + @@ -116568,6 +116575,7 @@ + diff --git a/android/abi_gki_aarch64_qcom b/android/abi_gki_aarch64_qcom index c2a299356d27..9680a3058076 100644 --- a/android/abi_gki_aarch64_qcom +++ b/android/abi_gki_aarch64_qcom @@ -2501,6 +2501,7 @@ __traceiter_android_rvh_cpu_cgroup_online __traceiter_android_rvh_cpufreq_transition __traceiter_android_rvh_dequeue_task + __traceiter_android_rvh_do_sched_yield __traceiter_android_rvh_enqueue_task __traceiter_android_rvh_find_busiest_queue __traceiter_android_rvh_find_lowest_rq @@ -2612,6 +2613,7 @@ __tracepoint_android_rvh_cpu_cgroup_online __tracepoint_android_rvh_cpufreq_transition __tracepoint_android_rvh_dequeue_task + __tracepoint_android_rvh_do_sched_yield __tracepoint_android_rvh_enqueue_task __tracepoint_android_rvh_find_busiest_queue __tracepoint_android_rvh_find_lowest_rq diff --git a/drivers/android/vendor_hooks.c b/drivers/android/vendor_hooks.c index 9d2a765b164d..17f42e726b55 100644 --- a/drivers/android/vendor_hooks.c +++ b/drivers/android/vendor_hooks.c @@ -239,6 +239,7 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_create_worker); EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_check_preempt_tick); EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_check_preempt_wakeup_ignore); EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_replace_next_task_fair); +EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_do_sched_yield); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_binder_wait_for_work); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_sync_txn_recvd); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_build_sched_domains); diff --git a/include/trace/hooks/sched.h b/include/trace/hooks/sched.h index 78f57b106e6c..0844244c9aff 100644 --- a/include/trace/hooks/sched.h +++ b/include/trace/hooks/sched.h @@ -291,6 +291,10 @@ DECLARE_RESTRICTED_HOOK(android_rvh_replace_next_task_fair, bool simple, struct task_struct *prev), TP_ARGS(rq, p, se, repick, simple, prev), 1); +DECLARE_RESTRICTED_HOOK(android_rvh_do_sched_yield, + TP_PROTO(struct rq *rq), + TP_ARGS(rq), 1); + DECLARE_RESTRICTED_HOOK(android_rvh_util_est_update, TP_PROTO(struct cfs_rq *cfs_rq, struct task_struct *p, bool task_sleep, int *ret), TP_ARGS(cfs_rq, p, task_sleep, ret), 1); diff --git a/kernel/sched/core.c b/kernel/sched/core.c index b519f3a561a0..a7b56e61067d 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -6343,6 +6343,8 @@ static void do_sched_yield(void) schedstat_inc(rq->yld_count); current->sched_class->yield_task(rq); + trace_android_rvh_do_sched_yield(rq); + preempt_disable(); rq_unlock_irq(rq, &rf); sched_preempt_enable_no_resched(); From 903e97a0ca6dd849a250d7fbbcbbb6e343aeb8b5 Mon Sep 17 00:00:00 2001 From: Eric Biggers Date: Thu, 18 Nov 2021 16:09:09 -0800 Subject: [PATCH 16/18] ANDROID: fips140: refactor evaluation testing support It turns out that we have to add more code to the module to support lab evaluation testing, beyond the error injection support we currently have. Therefore, rename CONFIG_CRYPTO_FIPS140_MOD_ERROR_INJECTION to CONFIG_CRYPTO_FIPS140_MOD_EVAL_TESTING, and move the relevant code into a new file fips140-eval-testing.c which is conditionally compiled. Also rename the "broken_alg" module parameter to "fail_selftest" so that it is similar to "fail_integrity_check" which we'll be adding. Bug: 188620248 Change-Id: I01bcbf7525690e277854ba4ed8dd89e7cd08d98e Signed-off-by: Eric Biggers --- crypto/Kconfig | 12 ++++++------ crypto/Makefile | 3 +++ crypto/fips140-eval-testing.c | 31 +++++++++++++++++++++++++++++++ crypto/fips140-module.c | 12 +++--------- crypto/fips140-module.h | 23 +++++++++++++++++------ crypto/fips140-selftests.c | 6 +----- 6 files changed, 61 insertions(+), 26 deletions(-) create mode 100644 crypto/fips140-eval-testing.c diff --git a/crypto/Kconfig b/crypto/Kconfig index d726b1c3a7f8..fa1617a05578 100644 --- a/crypto/Kconfig +++ b/crypto/Kconfig @@ -53,14 +53,14 @@ config CRYPTO_FIPS140_MOD meet FIPS 140 and NIAP FPT_TST_EXT.1 requirements. It shouldn't be used if you don't need to meet these requirements. -config CRYPTO_FIPS140_MOD_ERROR_INJECTION - bool "Support injecting failures into the FIPS 140 self-tests" +config CRYPTO_FIPS140_MOD_EVAL_TESTING + bool "Enable evaluation testing features in FIPS 140 module" depends on CRYPTO_FIPS140_MOD help - This option adds a module parameter "broken_alg" to the fips140 module - which can be used to fail the self-tests for a particular algorithm, - causing a kernel panic. This option is for FIPS lab testing only, and - it shouldn't be enabled on production systems. + This option adds some features to the FIPS 140 module which are needed + for lab evaluation testing of the module, e.g. support for injecting + errors and support for a userspace interface to some of the module's + services. This option should not be enabled in production builds. config CRYPTO_ALGAPI tristate diff --git a/crypto/Makefile b/crypto/Makefile index 9ada957d4cbd..f8a3677d2eec 100644 --- a/crypto/Makefile +++ b/crypto/Makefile @@ -239,11 +239,14 @@ fips140-objs := \ fips140-refs.o \ fips140-selftests.o \ crypto-fips.a +fips140-$(CONFIG_CRYPTO_FIPS140_MOD_EVAL_TESTING) += \ + fips140-eval-testing.o obj-m += fips140.o CFLAGS_fips140-alg-registration.o += $(FIPS140_CFLAGS) CFLAGS_fips140-module.o += $(FIPS140_CFLAGS) CFLAGS_fips140-selftests.o += $(FIPS140_CFLAGS) +CFLAGS_fips140-eval-testing.o += $(FIPS140_CFLAGS) hostprogs-always-y := fips140_gen_hmac HOSTLDLIBS_fips140_gen_hmac := -lcrypto -lelf diff --git a/crypto/fips140-eval-testing.c b/crypto/fips140-eval-testing.c new file mode 100644 index 000000000000..fbcd4cc633d5 --- /dev/null +++ b/crypto/fips140-eval-testing.c @@ -0,0 +1,31 @@ +// SPDX-License-Identifier: GPL-2.0-only +/* + * Copyright 2021 Google LLC + * + * This file can optionally be built into fips140.ko in order to support certain + * types of testing that the FIPS lab has to do to evaluate the module. It + * should not be included in production builds of the module. + */ + +#include + +#include "fips140-module.h" + +/* + * This option allows deliberately failing the self-tests for a particular + * algorithm. + */ +static char *fips140_fail_selftest; +module_param_named(fail_selftest, fips140_fail_selftest, charp, 0); + +/* Inject a self-test failure (via corrupting the result) if requested. */ +void fips140_inject_selftest_failure(const char *impl, u8 *result) +{ + if (fips140_fail_selftest && strcmp(impl, fips140_fail_selftest) == 0) + result[0] ^= 0xff; +} + +bool fips140_eval_testing_init(void) +{ + return true; +} diff --git a/crypto/fips140-module.c b/crypto/fips140-module.c index 5e42891fbd0d..4ebcf12a8b2a 100644 --- a/crypto/fips140-module.c +++ b/crypto/fips140-module.c @@ -29,15 +29,6 @@ #include "fips140-module.h" #include "internal.h" -/* - * This option allows deliberately failing the self-tests for a particular - * algorithm. This is for FIPS lab testing only. - */ -#ifdef CONFIG_CRYPTO_FIPS140_MOD_ERROR_INJECTION -char *fips140_broken_alg; -module_param_named(broken_alg, fips140_broken_alg, charp, 0); -#endif - /* * FIPS 140-2 prefers the use of HMAC with a public key over a plain hash. */ @@ -545,6 +536,9 @@ fips140_init(void) if (!update_fips140_library_routines()) goto panic; + if (!fips140_eval_testing_init()) + goto panic; + pr_info("module successfully loaded\n"); return 0; diff --git a/crypto/fips140-module.h b/crypto/fips140-module.h index b83547726a0f..92e2ff1ffbca 100644 --- a/crypto/fips140-module.h +++ b/crypto/fips140-module.h @@ -20,16 +20,27 @@ #define FIPS140_MODULE_NAME "Android Kernel Cryptographic Module" #define FIPS140_MODULE_VERSION UTS_RELEASE -#ifdef CONFIG_CRYPTO_FIPS140_MOD_ERROR_INJECTION -extern char *fips140_broken_alg; -#endif +/* fips140-eval-testing.c */ +#ifdef CONFIG_CRYPTO_FIPS140_MOD_EVAL_TESTING +void fips140_inject_selftest_failure(const char *impl, u8 *result); +bool fips140_eval_testing_init(void); +#else +static inline void fips140_inject_selftest_failure(const char *impl, u8 *result) +{ +} +static inline bool fips140_eval_testing_init(void) +{ + return true; +} +#endif /* !CONFIG_CRYPTO_FIPS140_MOD_EVAL_TESTING */ +/* fips140-module.c */ extern struct completion fips140_tests_done; extern struct task_struct *fips140_init_thread; - -bool __init __must_check fips140_run_selftests(void); - bool fips140_is_approved_service(const char *name); const char *fips140_module_version(void); +/* fips140-selftests.c */ +bool __init __must_check fips140_run_selftests(void); + #endif /* _CRYPTO_FIPS140_MODULE_H */ diff --git a/crypto/fips140-selftests.c b/crypto/fips140-selftests.c index 0ab388a9f213..56c503cacc41 100644 --- a/crypto/fips140-selftests.c +++ b/crypto/fips140-selftests.c @@ -146,11 +146,7 @@ static int __init __must_check fips_check_result(u8 *result, const u8 *expected_result, size_t result_size, const char *impl, const char *operation) { -#ifdef CONFIG_CRYPTO_FIPS140_MOD_ERROR_INJECTION - /* Inject a failure (via corrupting the result) if requested. */ - if (fips140_broken_alg && strcmp(impl, fips140_broken_alg) == 0) - result[0] ^= 0xff; -#endif + fips140_inject_selftest_failure(impl, result); if (memcmp(result, expected_result, result_size) != 0) { pr_err("wrong result from %s %s\n", impl, operation); return -EBADMSG; From 97fb2104fe2280a53875faed76f76140ccc7923f Mon Sep 17 00:00:00 2001 From: Eric Biggers Date: Thu, 18 Nov 2021 16:09:10 -0800 Subject: [PATCH 17/18] ANDROID: fips140: add support for injecting integrity error The lab is required to test injecting an integrity error, so add a module parameter fail_integrity_check=1 which does this. This parameter is only supported when CONFIG_CRYPTO_FIPS140_MOD_EVAL_TESTING=y. Bug: 188620248 Change-Id: I1f3683837706dc1df2755ca5b6e88f21f7956135 Signed-off-by: Eric Biggers --- crypto/fips140-eval-testing.c | 11 +++++++++++ crypto/fips140-module.c | 2 ++ crypto/fips140-module.h | 4 ++++ 3 files changed, 17 insertions(+) diff --git a/crypto/fips140-eval-testing.c b/crypto/fips140-eval-testing.c index fbcd4cc633d5..ef8edd0d1302 100644 --- a/crypto/fips140-eval-testing.c +++ b/crypto/fips140-eval-testing.c @@ -18,6 +18,10 @@ static char *fips140_fail_selftest; module_param_named(fail_selftest, fips140_fail_selftest, charp, 0); +/* This option allows deliberately failing the integrity check. */ +static bool fips140_fail_integrity_check; +module_param_named(fail_integrity_check, fips140_fail_integrity_check, bool, 0); + /* Inject a self-test failure (via corrupting the result) if requested. */ void fips140_inject_selftest_failure(const char *impl, u8 *result) { @@ -25,6 +29,13 @@ void fips140_inject_selftest_failure(const char *impl, u8 *result) result[0] ^= 0xff; } +/* Inject an integrity check failure (via corrupting the text) if requested. */ +void fips140_inject_integrity_failure(u8 *textcopy) +{ + if (fips140_fail_integrity_check) + textcopy[0] ^= 0xff; +} + bool fips140_eval_testing_init(void) { return true; diff --git a/crypto/fips140-module.c b/crypto/fips140-module.c index 4ebcf12a8b2a..cd854fe28845 100644 --- a/crypto/fips140-module.c +++ b/crypto/fips140-module.c @@ -388,6 +388,8 @@ static bool __init check_fips140_module_hmac(void) offset_to_ptr(&fips140_rela_rodata.offset), fips140_rela_rodata.count); + fips140_inject_integrity_failure(textcopy); + tfm = crypto_alloc_shash("hmac(sha256)", 0, 0); if (IS_ERR(tfm)) { pr_err("failed to allocate hmac tfm (%ld)\n", PTR_ERR(tfm)); diff --git a/crypto/fips140-module.h b/crypto/fips140-module.h index 92e2ff1ffbca..a2a63194eb64 100644 --- a/crypto/fips140-module.h +++ b/crypto/fips140-module.h @@ -23,11 +23,15 @@ /* fips140-eval-testing.c */ #ifdef CONFIG_CRYPTO_FIPS140_MOD_EVAL_TESTING void fips140_inject_selftest_failure(const char *impl, u8 *result); +void fips140_inject_integrity_failure(u8 *textcopy); bool fips140_eval_testing_init(void); #else static inline void fips140_inject_selftest_failure(const char *impl, u8 *result) { } +static inline void fips140_inject_integrity_failure(u8 *textcopy) +{ +} static inline bool fips140_eval_testing_init(void) { return true; From 109f31ac23f5fc4fa3517bfc1cd005eccf93193b Mon Sep 17 00:00:00 2001 From: Eric Biggers Date: Thu, 18 Nov 2021 16:09:11 -0800 Subject: [PATCH 18/18] ANDROID: fips140: add userspace interface for evaluation testing The FIPS lab is required to test the service indicators and version information services of the module, i.e. the fips140_is_approved_service() and fips140_module_version() functions. There are several ways we could support this: - Implement the tests in the module ourselves. However it's unclear that CMVP would allow this, and we would need the full list of tests, which could change over time depending on what the lab decides to do. - Support the lab writing, building, and loading a custom kernel module (or a custom kernel image) that tests these functions. - Provide a userspace interface to these services, restricted to builds with CONFIG_CRYPTO_FIPS140_MOD_EVAL_TESTING=y. This would allow writing the tests in userspace, which would be much easier. Implement the last solution, since it's the easier of the two solutions that are "guaranteed" to be allowed. Make the module register a char device which supports some ioctls, one per function that needs to be tested. Also provide some sample userspace code in samples/crypto/. Note: copy_to_user() would break the integrity check, so take some care to exclude it. This is allowed since this is non-production code. Bug: 188620248 Change-Id: Ic256d9c5bd4d0c57ede88a3e3e76e89554909b38 Signed-off-by: Eric Biggers --- crypto/fips140-eval-testing-uapi.h | 30 +++++ crypto/fips140-eval-testing.c | 87 ++++++++++++++ samples/crypto/fips140_lab_test.c | 187 +++++++++++++++++++++++++++++ scripts/module.lds.S | 1 + 4 files changed, 305 insertions(+) create mode 100644 crypto/fips140-eval-testing-uapi.h create mode 100644 samples/crypto/fips140_lab_test.c diff --git a/crypto/fips140-eval-testing-uapi.h b/crypto/fips140-eval-testing-uapi.h new file mode 100644 index 000000000000..04e6cf633594 --- /dev/null +++ b/crypto/fips140-eval-testing-uapi.h @@ -0,0 +1,30 @@ +/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ + +#ifndef _CRYPTO_FIPS140_EVAL_TESTING_H +#define _CRYPTO_FIPS140_EVAL_TESTING_H + +#include + +/* + * This header defines the ioctls that are available on the fips140 character + * device. These ioctls expose some of the module's services to userspace so + * that they can be tested by the FIPS certification lab; this is a required + * part of getting a FIPS 140 certification. These ioctls do not have any other + * purpose, and they do not need to be present in production builds. + */ + +/* + * Call the fips140_is_approved_service() function. The argument must be the + * service name as a NUL-terminated string. The return value will be 1 if + * fips140_is_approved_service() returned true, or 0 if it returned false. + */ +#define FIPS140_IOCTL_IS_APPROVED_SERVICE _IO('F', 0) + +/* + * Call the fips140_module_version() function. The argument must be a pointer + * to a buffer of size >= 256 chars. The NUL-terminated string returned by + * fips140_module_version() will be written to this buffer. + */ +#define FIPS140_IOCTL_MODULE_VERSION _IOR('F', 1, char[256]) + +#endif /* _CRYPTO_FIPS140_EVAL_TESTING_H */ diff --git a/crypto/fips140-eval-testing.c b/crypto/fips140-eval-testing.c index ef8edd0d1302..ea3cd653983a 100644 --- a/crypto/fips140-eval-testing.c +++ b/crypto/fips140-eval-testing.c @@ -7,9 +7,26 @@ * should not be included in production builds of the module. */ +/* + * We have to redefine inline to mean always_inline, so that _copy_to_user() + * gets inlined. This is needed for it to be placed into the correct section. + * See fips140_copy_to_user(). + * + * We also need to undefine BUILD_FIPS140_KO to allow the use of the code + * patching which copy_to_user() requires. + */ +#undef inline +#define inline inline __attribute__((__always_inline__)) __gnu_inline \ + __inline_maybe_unused notrace +#undef BUILD_FIPS140_KO + +#include +#include #include +#include #include "fips140-module.h" +#include "fips140-eval-testing-uapi.h" /* * This option allows deliberately failing the self-tests for a particular @@ -22,6 +39,9 @@ module_param_named(fail_selftest, fips140_fail_selftest, charp, 0); static bool fips140_fail_integrity_check; module_param_named(fail_integrity_check, fips140_fail_integrity_check, bool, 0); +static dev_t fips140_devnum; +static struct cdev fips140_cdev; + /* Inject a self-test failure (via corrupting the result) if requested. */ void fips140_inject_selftest_failure(const char *impl, u8 *result) { @@ -36,7 +56,74 @@ void fips140_inject_integrity_failure(u8 *textcopy) textcopy[0] ^= 0xff; } +static long fips140_ioctl_is_approved_service(unsigned long arg) +{ + const char *service_name = strndup_user((const char __user *)arg, 256); + long ret; + + if (IS_ERR(service_name)) + return PTR_ERR(service_name); + + ret = fips140_is_approved_service(service_name); + + kfree(service_name); + return ret; +} + +/* + * Code in fips140.ko is covered by an integrity check by default, and this + * check breaks if copy_to_user() is called. This is because copy_to_user() is + * an inline function that relies on code patching. However, since this is + * "evaluation testing" code which isn't included in the production builds of + * fips140.ko, it's acceptable to just exclude it from the integrity check. + */ +static noinline unsigned long __section("text.._fips140_unchecked") +fips140_copy_to_user(void __user *to, const void *from, unsigned long n) +{ + return copy_to_user(to, from, n); +} + +static long fips140_ioctl_module_version(unsigned long arg) +{ + const char *version = fips140_module_version(); + size_t len = strlen(version) + 1; + + if (len > 256) + return -EOVERFLOW; + + if (fips140_copy_to_user((void __user *)arg, version, len)) + return -EFAULT; + + return 0; +} + +static long fips140_ioctl(struct file *file, unsigned int cmd, + unsigned long arg) +{ + switch (cmd) { + case FIPS140_IOCTL_IS_APPROVED_SERVICE: + return fips140_ioctl_is_approved_service(arg); + case FIPS140_IOCTL_MODULE_VERSION: + return fips140_ioctl_module_version(arg); + default: + return -ENOTTY; + } +} + +static const struct file_operations fips140_fops = { + .unlocked_ioctl = fips140_ioctl, +}; + bool fips140_eval_testing_init(void) { + if (alloc_chrdev_region(&fips140_devnum, 1, 1, "fips140") != 0) { + pr_err("failed to allocate device number\n"); + return false; + } + cdev_init(&fips140_cdev, &fips140_fops); + if (cdev_add(&fips140_cdev, fips140_devnum, 1) != 0) { + pr_err("failed to add fips140 character device\n"); + return false; + } return true; } diff --git a/samples/crypto/fips140_lab_test.c b/samples/crypto/fips140_lab_test.c new file mode 100644 index 000000000000..dd2324b8f84a --- /dev/null +++ b/samples/crypto/fips140_lab_test.c @@ -0,0 +1,187 @@ +// SPDX-License-Identifier: GPL-2.0-only +/* + * Copyright 2021 Google LLC + * + * This is a sample program which calls some ioctls on /dev/fips140 and prints + * the results. The purpose of this program is to allow the FIPS certification + * lab to test some services of fips140.ko, which they are required to do. This + * is a sample program only, and it can be modified by the lab as needed. This + * program must be run as root, and it only works if the system has loaded a + * build of fips140.ko with evaluation testing support enabled. + * + * This program can be compiled and run on an Android device as follows: + * + * NDK_DIR=$HOME/android-ndk-r23b # adjust directory path as needed + * $NDK_DIR/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android31-clang \ + * fips140_lab_test.c -O2 -Wall -o fips140_lab_test + * adb push fips140_lab_test /data/local/tmp/ + * adb root + * adb shell /data/local/tmp/fips140_lab_test + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "../../crypto/fips140-eval-testing-uapi.h" + +static int fips140_dev_fd = -1; + +#define ARRAY_SIZE(A) (sizeof(A) / sizeof((A)[0])) + +static const char *booltostr(bool b) +{ + return b ? "true" : "false"; +} + +static void __attribute__((noreturn)) +do_die(const char *format, va_list va, int err) +{ + fputs("ERROR: ", stderr); + vfprintf(stderr, format, va); + if (err) + fprintf(stderr, ": %s", strerror(err)); + putc('\n', stderr); + exit(1); +} + +static void __attribute__((noreturn, format(printf, 1, 2))) +die_errno(const char *format, ...) +{ + va_list va; + + va_start(va, format); + do_die(format, va, errno); + va_end(va); +} + +static void __attribute__((noreturn, format(printf, 1, 2))) +die(const char *format, ...) +{ + va_list va; + + va_start(va, format); + do_die(format, va, 0); + va_end(va); +} + +static int get_fips140_device_number(void) +{ + FILE *f; + char line[128]; + int number; + char name[32]; + + f = fopen("/proc/devices", "r"); + if (!f) + die_errno("failed to open /proc/devices"); + while (fgets(line, sizeof(line), f)) { + if (sscanf(line, "%d %31s", &number, name) == 2 && + strcmp(name, "fips140") == 0) + return number; + } + fclose(f); + die("fips140 device node is unavailable.\n" +"The fips140 device node is only available when the fips140 module is loaded\n" +"and has been built with evaluation testing support."); +} + +static void create_fips140_node_if_needed(void) +{ + struct stat stbuf; + int major; + + if (stat("/dev/fips140", &stbuf) == 0) + return; + + major = get_fips140_device_number(); + if (mknod("/dev/fips140", S_IFCHR | 0600, makedev(major, 1)) != 0) + die_errno("failed to create fips140 device node"); +} + +static bool fips140_is_approved_service(const char *name) +{ + int ret = ioctl(fips140_dev_fd, FIPS140_IOCTL_IS_APPROVED_SERVICE, name); + + if (ret < 0) + die_errno("FIPS140_IOCTL_IS_APPROVED_SERVICE unexpectedly failed"); + if (ret == 1) + return true; + if (ret == 0) + return false; + die("FIPS140_IOCTL_IS_APPROVED_SERVICE returned unexpected value %d", + ret); +} + +static const char *fips140_module_version(void) +{ + char buf[256]; + char *str; + int ret = ioctl(fips140_dev_fd, FIPS140_IOCTL_MODULE_VERSION, buf); + + if (ret < 0) + die_errno("FIPS140_IOCTL_MODULE_VERSION unexpectedly failed"); + if (ret != 0) + die("FIPS140_IOCTL_MODULE_VERSION returned unexpected value %d", ret); + str = strdup(buf); + if (!str) + die("out of memory"); + return str; +} + +static const char * const services_to_check[] = { + "aes", + "cbc(aes)", + "cbcmac(aes)", + "cmac(aes)", + "ctr(aes)", + "cts(cbc(aes))", + "ecb(aes)", + "essiv(cbc(aes),sha256)", + "gcm(aes)", + "hmac(sha1)", + "hmac(sha224)", + "hmac(sha256)", + "hmac(sha384)", + "hmac(sha512)", + "jitterentropy_rng", + "sha1", + "sha224", + "sha256", + "sha384", + "sha512", + "stdrng", + "xcbc(aes)", + "xts(aes)", +}; + +int main(void) +{ + size_t i; + + if (getuid() != 0) + die("This program requires root. Run 'adb root' first."); + + create_fips140_node_if_needed(); + + fips140_dev_fd = open("/dev/fips140", O_RDONLY); + if (fips140_dev_fd < 0) + die_errno("failed to open /dev/fips140"); + + printf("fips140_module_version() => \"%s\"\n", fips140_module_version()); + for (i = 0; i < ARRAY_SIZE(services_to_check); i++) { + const char *service = services_to_check[i]; + + printf("fips140_is_approved_service(\"%s\") => %s\n", service, + booltostr(fips140_is_approved_service(service))); + } + return 0; +} diff --git a/scripts/module.lds.S b/scripts/module.lds.S index 8b9dcec11d1e..6cca5d88744e 100644 --- a/scripts/module.lds.S +++ b/scripts/module.lds.S @@ -71,6 +71,7 @@ SECTIONS { *(.text..L.cfi.jumptable .text..L.cfi.jumptable.*) __cfi_jt_end = .; *(.text.._end) + *(.text.._fips140_unchecked) } #endif }