Lines Matching +full:boot +full:- +full:reason

1 // SPDX-License-Identifier: GPL-2.0-or-later
29 * loading failures to enable improvements either for kernel module auto-loading
64 * DOC: dup_failed_modules - tracks duplicate failed modules
77 * In practice on a typical boot today most finit_module() calls fail due to
90 * - with module decompression: 2 virtual memory allocation calls
91 * - without module decompression: 1 virtual memory allocation calls
93 * - with module decompression 3 virtual memory allocation calls
94 * - without module decompression 2 virtual memory allocation calls
98 * either in-kernel or in userspace.
134 * reason for this failure is when userspace is racing to load a module
141 * duplicate failed modules are non-fatal, however they typically are
145 * non-fatal, we should try to reduce vmalloc() pressure proactively, so
146 * ideally after boot this will be close to as 0 as possible. If module
153 * * module_sig_check() - module signature checks
154 * * elf_validity_cache_copy() - some ELF validation issue
210 if (test_bit(FAIL_DUP_MOD_BECOMING, &mod_fail->dup_fail_mask) && in mod_fail_to_str()
211 test_bit(FAIL_DUP_MOD_LOAD, &mod_fail->dup_fail_mask)) in mod_fail_to_str()
213 if (test_bit(FAIL_DUP_MOD_BECOMING, &mod_fail->dup_fail_mask)) in mod_fail_to_str()
215 if (test_bit(FAIL_DUP_MOD_LOAD, &mod_fail->dup_fail_mask)) in mod_fail_to_str()
217 return "Bug-on-stats"; in mod_fail_to_str()
222 atomic_long_add(info->len * 2, &invalid_mod_bytes); in mod_stat_bump_invalid()
226 atomic_long_add(info->compressed_len, &invalid_mod_bytes); in mod_stat_bump_invalid()
233 atomic_long_add(info->len, &invalid_becoming_bytes); in mod_stat_bump_becoming()
236 atomic_long_add(info->compressed_len, &invalid_becoming_bytes); in mod_stat_bump_becoming()
240 int try_add_failed_module(const char *name, enum fail_dup_mod_reason reason) in try_add_failed_module() argument
246 if (!strcmp(mod_fail->name, name)) { in try_add_failed_module()
247 atomic_long_inc(&mod_fail->count); in try_add_failed_module()
248 __set_bit(reason, &mod_fail->dup_fail_mask); in try_add_failed_module()
255 return -ENOMEM; in try_add_failed_module()
256 memcpy(mod_fail->name, name, strlen(name)); in try_add_failed_module()
257 __set_bit(reason, &mod_fail->dup_fail_mask); in try_add_failed_module()
258 atomic_long_inc(&mod_fail->count); in try_add_failed_module()
259 list_add_rcu(&mod_fail->list, &dup_failed_modules); in try_add_failed_module()
303 return -ENOMEM; in read_file_mod_stats()
308 len += scnprintf(buf + len, size - len, "%25s\t%u\n", "Mods failed on kread", fkreads); in read_file_mod_stats()
310 len += scnprintf(buf + len, size - len, "%25s\t%u\n", "Mods failed on decompress", in read_file_mod_stats()
312 len += scnprintf(buf + len, size - len, "%25s\t%u\n", "Mods failed on becoming", fbecoming); in read_file_mod_stats()
314 len += scnprintf(buf + len, size - len, "%25s\t%u\n", "Mods failed on load", floads); in read_file_mod_stats()
316 len += scnprintf(buf + len, size - len, "%25s\t%lu\n", "Total module size", total_size); in read_file_mod_stats()
317 len += scnprintf(buf + len, size - len, "%25s\t%lu\n", "Total mod text size", text_size); in read_file_mod_stats()
319 len += scnprintf(buf + len, size - len, "%25s\t%lu\n", "Failed kread bytes", ikread_bytes); in read_file_mod_stats()
321 len += scnprintf(buf + len, size - len, "%25s\t%lu\n", "Failed decompress bytes", in read_file_mod_stats()
324 len += scnprintf(buf + len, size - len, "%25s\t%lu\n", "Failed becoming bytes", ibecoming_bytes); in read_file_mod_stats()
326 len += scnprintf(buf + len, size - len, "%25s\t%lu\n", "Failed kmod bytes", imod_bytes); in read_file_mod_stats()
328 …len += scnprintf(buf + len, size - len, "%25s\t%lu\n", "Virtual mem wasted bytes", total_virtual_l… in read_file_mod_stats()
331 len += scnprintf(buf + len, size - len, "%25s\t%lu\n", "Average mod size", in read_file_mod_stats()
336 len += scnprintf(buf + len, size - len, "%25s\t%lu\n", "Average mod text size", in read_file_mod_stats()
349 len += scnprintf(buf + len, size - len, "%25s\t%lu\n", "Avg fail kread bytes", in read_file_mod_stats()
355 len += scnprintf(buf + len, size - len, "%25s\t%lu\n", "Avg fail becoming bytes", in read_file_mod_stats()
361 len += scnprintf(buf + len, size - len, "%25s\t%lu\n", "Avg fail decomp bytes", in read_file_mod_stats()
367 len += scnprintf(buf + len, size - len, "%25s\t%lu\n", "Average fail load bytes", in read_file_mod_stats()
379 len += scnprintf(buf + len, size - len, "Duplicate failed modules:\n"); in read_file_mod_stats()
380 len += scnprintf(buf + len, size - len, "%25s\t%15s\t%25s\n", in read_file_mod_stats()
381 "Module-name", "How-many-times", "Reason"); in read_file_mod_stats()
388 len += scnprintf(buf + len, size - len, "%25s\t%15lu\t%25s\n", mod_fail->name, in read_file_mod_stats()
389 atomic_long_read(&mod_fail->count), mod_fail_to_str(mod_fail)); in read_file_mod_stats()