├── .gitignore ├── Readme.txt └── sources ├── AUTHORS ├── CMakeLists.txt ├── ChangeLog.old ├── INSTALL ├── LICENSE ├── NEWS ├── THANKS ├── calculator └── calculator.c ├── cmake ├── kmodule_sources │ ├── check_allocator │ │ └── module.c │ ├── check_hlist_for_each_entry │ │ └── module.c │ ├── check_kfree_rcu │ │ └── module.c │ ├── check_module_build │ │ └── module.c │ ├── check_posix_acl_refcount │ │ └── module.c │ ├── check_random32 │ │ └── module.c │ ├── check_ring_buffer │ │ └── module.c │ ├── check_stack_trace │ │ └── module.c │ ├── check_unreliable_functions │ │ ├── README │ │ ├── __kmalloc_node.c │ │ ├── kmem_cache_alloc_node.c │ │ ├── kmem_cache_alloc_node_notrace.c │ │ └── kmem_cache_alloc_node_trace.c │ └── check_xattr_user_ns │ │ └── module.c ├── modules │ ├── CMakeParseArguments.cmake │ ├── FindKbuild.cmake │ ├── cmake_useful.cmake │ ├── example_system.cmake │ ├── install_testing.cmake │ ├── install_testing_ctest.cmake │ ├── install_testing_ctest_files │ │ └── run_tests.sh.in │ ├── kbuild_system.cmake │ ├── kbuild_system_files │ │ ├── Kbuild.in │ │ └── try_compile_project │ │ │ └── CMakeLists.txt │ ├── kedr_testing.cmake │ ├── kmodule.cmake │ ├── kmodule_files │ │ └── scripts │ │ │ └── lookup_kernel_function.sh │ ├── multi_kernel.cmake │ ├── path_prefixes.cmake │ ├── template_generation.cmake │ ├── template_generation_files │ │ └── update_deps.sh │ ├── uninstall_target.cmake │ ├── uninstall_target_files │ │ ├── cmake_uninstall.sh.in │ │ └── cmake_uninstall_dirs.sh.in │ ├── update_modules.cmake │ └── update_modules_files │ │ └── update_modules_dir │ │ ├── CMakeLists.txt │ │ └── depmod.cmake └── platform │ ├── chromiumos-x86-generic.cmake │ └── linux-x86-generic.cmake ├── config.h.in ├── control_file └── control_file.c ├── core ├── CMakeLists.txt ├── arch │ └── x86 │ │ ├── include │ │ └── kedr │ │ │ └── asm │ │ │ ├── inat.h │ │ │ ├── inat_types.h │ │ │ └── insn.h │ │ ├── lib │ │ ├── inat.c │ │ ├── insn.c │ │ └── x86-opcode-map.txt │ │ └── tools │ │ └── gen-insn-attr-x86.awk ├── kedr_base.c ├── kedr_base_internal.h ├── kedr_functions_support.c ├── kedr_functions_support_internal.h ├── kedr_instrumentor.c ├── kedr_instrumentor_internal.h ├── kedr_internal.h ├── kedr_module.c ├── kedr_target_detector.c ├── kedr_target_detector_internal.h ├── module_param_create_use_ops.c └── module_param_create_use_ops_struct.c ├── doc ├── CMakeLists.txt ├── Readme.txt ├── docbook │ ├── analyze_trace.xml │ ├── call_mon.xml │ ├── capture_trace.xml │ ├── config.xsl.cmake │ ├── control.xml │ ├── custom_analysis.xml │ ├── custom_callm_payloads.xml │ ├── custom_fsim_payloads.xml │ ├── custom_fsim_scenarios.xml │ ├── docbook_xsl_copying.txt │ ├── entities.xml.cmake │ ├── extend.xml │ ├── fault_sim.xml │ ├── fault_simulation_api.xml │ ├── functions_support.xml │ ├── gc_wiki.xsl.cmake │ ├── gc_wiki_impl.xsl.cmake │ ├── getting_started.xml │ ├── glossary.xml │ ├── happens_before_parameter.xml │ ├── how_kedr_works.xml │ ├── images │ │ └── system_architecture.png │ ├── intro.xml │ ├── kedr-doc.css │ ├── leak_check.xml │ ├── main.xml.cmake │ ├── overview.xml │ ├── payload_api.xml │ ├── reference.xml │ ├── standard_callm_payloads.xml │ ├── standard_fsim_indicators.xml │ ├── standard_fsim_payloads.xml │ ├── using_gen.xml │ └── using_kedr.xml └── html │ ├── images │ └── system_architecture.png │ ├── index.html │ ├── kedr-doc.css │ ├── kedr_manual_extend.html │ ├── kedr_manual_getting_started.html │ ├── kedr_manual_glossary.html │ ├── kedr_manual_intro.html │ ├── kedr_manual_overview.html │ ├── kedr_manual_reference.html │ └── kedr_manual_using_kedr.html ├── examples ├── .readme.developer ├── CMakeLists.txt ├── counters │ ├── CMakeLists.txt │ ├── Kbuild.in │ ├── README │ ├── configure_kernel_functions.sh │ ├── counters.c │ ├── counters.h │ ├── functions_common.data │ ├── makefile.in │ ├── mutex_lock.data │ ├── mutex_lock_interruptible.data │ └── mutex_lock_killable.data ├── custom_indicator_fsim │ ├── CMakeLists.txt │ ├── Kbuild.in │ ├── config.h.in │ ├── indicator.data │ └── makefile.in ├── custom_payload_callm │ ├── CMakeLists.txt │ ├── Kbuild.in │ ├── makefile.in │ └── payload.data.in ├── custom_payload_fsim │ ├── CMakeLists.txt │ ├── Kbuild.in │ ├── makefile.in │ └── payload.data.in ├── leak_check │ ├── CMakeLists.txt │ ├── annotations │ │ ├── CMakeLists.txt │ │ ├── Kbuild.in │ │ ├── Readme.txt │ │ ├── cfake.h │ │ ├── makefile.in │ │ └── module.c │ └── mempool_ops │ │ ├── CMakeLists.txt │ │ ├── Kbuild.in │ │ ├── Readme.txt │ │ ├── makefile.in │ │ └── payload.data.in ├── sample_fsim_payload │ ├── CMakeLists.txt │ ├── Kbuild.in │ ├── functions.data │ ├── makefile.in │ └── payload.c ├── sample_indicator │ ├── CMakeLists.txt │ ├── Kbuild.in │ ├── makefile.in │ └── sample_indicator.c └── sample_target │ ├── CMakeLists.txt │ ├── Kbuild │ ├── cfake.c │ ├── cfake.h │ ├── kedr_sample_target │ └── makefile_installed.in ├── fault_indicators ├── CMakeLists.txt ├── capable │ ├── CMakeLists.txt │ └── indicator.data ├── common │ ├── CMakeLists.txt │ └── indicator.data └── kmalloc │ ├── CMakeLists.txt │ └── indicator.data ├── fault_simulation ├── CMakeLists.txt └── fault_simulation_module.c ├── functions ├── CMakeLists.txt ├── Readme.txt ├── capable │ ├── CMakeLists.txt │ ├── capable.data │ └── header.data ├── common_mm │ ├── CMakeLists.txt │ ├── __alloc_pages_nodemask.data.4_12 │ ├── __alloc_pages_nodemask.data.4_13 │ ├── __free_pages.data │ ├── __get_free_pages.data │ ├── __kmalloc.data │ ├── __kmalloc_node.data │ ├── __krealloc.data │ ├── alloc_pages_current.data │ ├── alloc_pages_exact.data │ ├── alloc_pages_exact_nid.data │ ├── free_pages.data │ ├── free_pages_exact.data │ ├── get_zeroed_page.data │ ├── header.data │ ├── ioremap_cache.data │ ├── ioremap_nocache.data │ ├── ioremap_prot.data │ ├── ioremap_uc.data │ ├── ioremap_wc.data │ ├── ioremap_wt.data │ ├── iounmap.data │ ├── kfree.data │ ├── kmalloc_order_trace.data │ ├── kmem_cache_alloc.data │ ├── kmem_cache_alloc_node.data │ ├── kmem_cache_alloc_node_notrace.data │ ├── kmem_cache_alloc_node_trace.data.slab │ ├── kmem_cache_alloc_node_trace.data.slub │ ├── kmem_cache_alloc_notrace.data │ ├── kmem_cache_alloc_trace.data.slab │ ├── kmem_cache_alloc_trace.data.slub │ ├── kmem_cache_free.data │ ├── krealloc.data │ └── kzfree.data ├── kasprintf │ ├── CMakeLists.txt │ ├── header.data │ ├── kasprintf.data │ └── kvasprintf.data ├── mem_util │ ├── CMakeLists.txt │ ├── __page_cache_alloc.data │ ├── __posix_acl_chmod.data │ ├── __posix_acl_create.data │ ├── add_to_page_cache_locked.data │ ├── add_to_page_cache_lru.data │ ├── call_rcu.data │ ├── call_rcu_sched.data │ ├── header.data │ ├── kfree_call_rcu.data │ ├── kmemdup.data │ ├── kstrdup.data │ ├── kstrndup.data │ ├── match_strdup.data │ ├── posix_acl_alloc.data │ ├── posix_acl_chmod.data │ ├── posix_acl_clone.data │ ├── posix_acl_create.data │ ├── posix_acl_from_mode.data │ ├── posix_acl_from_xattr.data.plain │ └── posix_acl_from_xattr.data.userns ├── mutexes │ ├── CMakeLists.txt │ ├── __mutex_init.data │ ├── header.data │ ├── mutex_lock.data │ ├── mutex_lock_interruptible.data │ ├── mutex_lock_killable.data │ ├── mutex_trylock.data │ └── mutex_unlock.data ├── schedule │ ├── CMakeLists.txt │ ├── __cond_resched_lock.data │ ├── _cond_resched.data │ ├── cond_resched_lock.data │ ├── header.data │ ├── io_schedule.data │ ├── preempt_schedule.data │ ├── schedule.data │ ├── schedule_timeout.data │ ├── schedule_timeout_interruptible.data │ └── schedule_timeout_uninterruptible.data ├── spinlocks │ ├── CMakeLists.txt │ ├── _raw_spin_lock.data │ ├── _raw_spin_lock_irq.data │ ├── _raw_spin_lock_irqsave.data │ ├── _raw_spin_unlock.data │ ├── _raw_spin_unlock_irq.data │ ├── _raw_spin_unlock_irqrestore.data │ ├── _spin_lock.data │ ├── _spin_lock_irq.data │ ├── _spin_lock_irqsave.data │ ├── _spin_unlock.data │ ├── _spin_unlock_irq.data │ ├── _spin_unlock_irqrestore.data │ └── header.data ├── uaccess │ ├── CMakeLists.txt │ ├── _copy_from_user.data │ ├── _copy_to_user.data │ ├── copy_from_user.data │ ├── copy_to_user.data │ ├── header.data │ ├── memdup_user.data │ └── strndup_user.data ├── virtual_mm │ ├── CMakeLists.txt │ ├── __vmalloc.data │ ├── header.data │ ├── vfree.data │ ├── vmalloc.data │ ├── vmalloc_32.data │ ├── vmalloc_32_user.data │ ├── vmalloc_node.data │ ├── vmalloc_user.data │ ├── vzalloc.data │ └── vzalloc_node.data └── waitqueue │ ├── CMakeLists.txt │ ├── __init_waitqueue_head.name.data │ ├── __init_waitqueue_head.old.data │ ├── __init_waitqueue_head_signature.c │ ├── __wake_up.data │ ├── add_wait_queue.data │ ├── add_wait_queue_exclusive.data │ ├── finish_wait.data │ ├── header.data │ ├── init_waitqueue_head.data │ ├── prepare_to_wait.data │ └── remove_wait_queue.data ├── include ├── CMakeLists.txt └── kedr │ ├── calculator │ └── calculator.h │ ├── control_file │ └── control_file.h │ ├── core │ ├── kedr.h │ └── kedr_functions_support.h │ ├── defs.h.in │ ├── fault_simulation │ └── fault_simulation.h │ ├── leak_check │ └── leak_check.h │ ├── trace │ └── trace.h │ └── util │ └── stack_trace.h ├── leak_check ├── CMakeLists.txt ├── common_mm │ ├── CMakeLists.txt │ ├── __alloc_pages_nodemask.data │ ├── __free_pages.data │ ├── __get_free_pages.data │ ├── __kmalloc.data │ ├── __kmalloc_node.data │ ├── __krealloc.data │ ├── __page_cache_alloc.data │ ├── __posix_acl_chmod.data │ ├── __posix_acl_create.data │ ├── __vmalloc.data │ ├── add_to_page_cache_locked.data │ ├── add_to_page_cache_lru.data │ ├── alloc_pages_current.data │ ├── alloc_pages_exact.data │ ├── alloc_pages_exact_nid.data │ ├── call_rcu.data │ ├── call_rcu_sched.data │ ├── free_pages.data │ ├── free_pages_exact.data │ ├── get_zeroed_page.data │ ├── header.data.in │ ├── ioremap_cache.data │ ├── ioremap_nocache.data │ ├── ioremap_prot.data │ ├── ioremap_uc.data │ ├── ioremap_wc.data │ ├── ioremap_wt.data │ ├── iounmap.data │ ├── kasprintf.data │ ├── kfree.data │ ├── kfree_call_rcu.data │ ├── kmalloc_order_trace.data │ ├── kmem_cache_alloc.data │ ├── kmem_cache_alloc_node.data │ ├── kmem_cache_alloc_node_notrace.data │ ├── kmem_cache_alloc_node_trace.data │ ├── kmem_cache_alloc_notrace.data │ ├── kmem_cache_alloc_trace.data │ ├── kmem_cache_free.data │ ├── kmemdup.data │ ├── krealloc.data │ ├── kstrdup.data │ ├── kstrndup.data │ ├── kvasprintf.data │ ├── kzfree.data │ ├── match_strdup.data │ ├── memdup_user.data │ ├── posix_acl_alloc.data │ ├── posix_acl_chmod.data │ ├── posix_acl_clone.data │ ├── posix_acl_create.data │ ├── posix_acl_from_mode.data │ ├── posix_acl_from_xattr.data │ ├── strndup_user.data │ ├── vfree.data │ ├── vmalloc.data │ ├── vmalloc_32.data │ ├── vmalloc_32_user.data │ ├── vmalloc_node.data │ ├── vmalloc_user.data │ ├── vzalloc.data │ └── vzalloc_node.data └── core │ ├── CMakeLists.txt │ ├── klc_output.c │ ├── klc_output.h │ ├── leak_check.c │ └── leak_check_impl.h ├── payloads_callm ├── CMakeLists.txt ├── capable │ ├── CMakeLists.txt │ ├── capable.data │ └── header.data.in ├── common_mm │ ├── CMakeLists.txt │ ├── __alloc_pages_nodemask.data │ ├── __free_pages.data │ ├── __get_free_pages.data │ ├── __kmalloc.data │ ├── __kmalloc_node.data │ ├── __krealloc.data │ ├── alloc_pages_current.data │ ├── alloc_pages_exact.data │ ├── alloc_pages_exact_nid.data │ ├── free_pages.data │ ├── free_pages_exact.data │ ├── get_zeroed_page.data │ ├── header.data.in │ ├── kfree.data │ ├── kmalloc_order_trace.data │ ├── kmem_cache_alloc.data │ ├── kmem_cache_alloc_node.data │ ├── kmem_cache_alloc_node_notrace.data │ ├── kmem_cache_alloc_node_trace.data.slab │ ├── kmem_cache_alloc_node_trace.data.slub │ ├── kmem_cache_alloc_notrace.data │ ├── kmem_cache_alloc_trace.data.slab │ ├── kmem_cache_alloc_trace.data.slub │ ├── kmem_cache_free.data │ ├── krealloc.data │ └── kzfree.data ├── mem_util │ ├── CMakeLists.txt │ ├── add_to_page_cache_locked.data │ ├── add_to_page_cache_lru.data │ ├── call_rcu.data │ ├── call_rcu_sched.data │ ├── header.data.in │ ├── kfree_call_rcu.data │ ├── kmemdup.data │ ├── kstrdup.data │ ├── kstrndup.data │ ├── match_strdup.data │ ├── posix_acl_alloc.data │ ├── posix_acl_clone.data │ └── posix_acl_from_mode.data ├── mutexes │ ├── CMakeLists.txt │ ├── __mutex_init.data │ ├── header.data.in │ ├── mutex_lock.data │ ├── mutex_lock_interruptible.data │ ├── mutex_lock_killable.data │ ├── mutex_trylock.data │ └── mutex_unlock.data ├── schedule │ ├── CMakeLists.txt │ ├── __cond_resched_lock.data │ ├── _cond_resched.data │ ├── cond_resched_lock.data │ ├── header.data.in │ ├── io_schedule.data │ ├── preempt_schedule.data │ ├── schedule.data │ ├── schedule_timeout.data │ ├── schedule_timeout_interruptible.data │ └── schedule_timeout_uninterruptible.data ├── spinlocks │ ├── CMakeLists.txt │ ├── _raw_spin_lock.data │ ├── _raw_spin_lock_irq.data │ ├── _raw_spin_lock_irqsave.data │ ├── _raw_spin_unlock.data │ ├── _raw_spin_unlock_irq.data │ ├── _raw_spin_unlock_irqrestore.data │ ├── _spin_lock.data │ ├── _spin_lock_irq.data │ ├── _spin_lock_irqsave.data │ ├── _spin_unlock.data │ ├── _spin_unlock_irq.data │ ├── _spin_unlock_irqrestore.data │ └── header.data.in ├── uaccess │ ├── CMakeLists.txt │ ├── _copy_from_user.data │ ├── _copy_to_user.data │ ├── copy_from_user.data │ ├── copy_to_user.data │ ├── header.data.in │ ├── memdup_user.data │ └── strndup_user.data ├── virtual_mm │ ├── CMakeLists.txt │ ├── __vmalloc.data │ ├── header.data.in │ ├── vfree.data │ ├── vmalloc.data │ ├── vmalloc_32.data │ ├── vmalloc_32_user.data │ ├── vmalloc_node.data │ ├── vmalloc_user.data │ ├── vzalloc.data │ └── vzalloc_node.data └── waitqueue │ ├── CMakeLists.txt │ ├── __init_waitqueue_head.data │ ├── __init_waitqueue_head_signature.c │ ├── __wake_up.data │ ├── add_wait_queue.data │ ├── add_wait_queue_exclusive.data │ ├── finish_wait.data │ ├── header.data.in │ ├── init_waitqueue_head.data │ ├── prepare_to_wait.data │ └── remove_wait_queue.data ├── payloads_fsim ├── CMakeLists.txt ├── capable │ ├── CMakeLists.txt │ ├── capable.data │ └── header.data.in ├── common_mm │ ├── CMakeLists.txt │ ├── __alloc_pages_nodemask.data │ ├── __get_free_pages.data │ ├── __kmalloc.data │ ├── __kmalloc_node.data │ ├── __krealloc.data │ ├── alloc_pages_current.data │ ├── alloc_pages_exact.data │ ├── alloc_pages_exact_nid.data │ ├── get_zeroed_page.data │ ├── header.data.in │ ├── kmalloc_order_trace.data │ ├── kmem_cache_alloc.data │ ├── kmem_cache_alloc_node.data │ ├── kmem_cache_alloc_node_notrace.data │ ├── kmem_cache_alloc_node_trace.data │ ├── kmem_cache_alloc_notrace.data │ ├── kmem_cache_alloc_trace.data │ └── krealloc.data ├── mem_util │ ├── CMakeLists.txt │ ├── __posix_acl_chmod.data │ ├── __posix_acl_create.data │ ├── header.data.in │ ├── kmemdup.data │ ├── kstrdup.data │ ├── kstrndup.data │ ├── match_strdup.data │ ├── posix_acl_alloc.data │ ├── posix_acl_chmod.data │ ├── posix_acl_clone.data │ ├── posix_acl_create.data │ ├── posix_acl_from_mode.data │ └── posix_acl_from_xattr.data ├── uaccess │ ├── CMakeLists.txt │ ├── _copy_from_user.data │ ├── _copy_to_user.data │ ├── copy_from_user.data │ ├── copy_to_user.data │ ├── header.data.in │ ├── memdup_user.data │ └── strndup_user.data └── virtual_mm │ ├── CMakeLists.txt │ ├── __vmalloc.data │ ├── header.data.in │ ├── vmalloc.data │ ├── vmalloc_32.data │ ├── vmalloc_32_user.data │ ├── vmalloc_node.data │ ├── vmalloc_user.data │ ├── vzalloc.data │ └── vzalloc_node.data ├── templates ├── CMakeLists.txt ├── README ├── fault_indicator.c │ ├── block │ │ └── block.tpl │ └── document │ │ ├── controlFileCreate.tpl │ │ ├── controlFileDeclaration.tpl │ │ ├── controlFileDestroy.tpl │ │ ├── controlFileFunctions.tpl │ │ ├── document.tpl │ │ ├── indicatorDestroyCall.tpl │ │ ├── indicatorDestroyDefinition.tpl │ │ ├── indicatorFormatString.tpl │ │ ├── indicatorInitCall.tpl │ │ ├── indicatorInitDefinition.tpl │ │ ├── indicatorSimulateCall.tpl │ │ ├── indicatorSimulateCallFirst.tpl │ │ ├── indicatorSimulateDefinition.tpl │ │ ├── indicatorStateDeclaration.tpl │ │ ├── indicatorStateName.tpl │ │ ├── indicatorStateType.tpl │ │ ├── indicatorVarsUnuse.tpl │ │ ├── indicatorVarsUse.tpl │ │ ├── isFailInInit.tpl │ │ ├── isIndicatorDestroy.tpl │ │ ├── isIndicatorInit.tpl │ │ ├── isIndicatorState.tpl │ │ ├── isPointData.tpl │ │ ├── pointDataDeclaration.tpl │ │ ├── pointDataField.tpl │ │ ├── pointDataName.tpl │ │ ├── pointDataType.tpl │ │ ├── pointDataUnuse.tpl │ │ ├── pointDataUnuseParam.tpl │ │ ├── pointDataUse.tpl │ │ ├── pointDataUseParam.tpl │ │ └── stateVariableDeclaration.tpl ├── fault_indicator.data │ ├── block │ │ └── block.tpl │ └── document │ │ ├── document.tpl │ │ ├── expressionConstCDeclaration.tpl │ │ ├── expressionConstGDeclaration.tpl │ │ ├── expressionHasConstants.tpl │ │ ├── expressionRvarDeclaration.tpl │ │ ├── expressionRvarFunction.tpl │ │ ├── expressionRvarFunctions.tpl │ │ ├── expressionVarGSet.tpl │ │ ├── expressionVarPSet.tpl │ │ ├── globalSection.tpl │ │ └── indicatorParameters.tpl ├── fault_indicator_add_caller_address.data │ ├── block │ │ └── block.tpl │ └── document │ │ ├── document.tpl │ │ ├── expressionCConstant.tpl │ │ ├── expressionConstant.tpl │ │ ├── expressionPVariable.tpl │ │ ├── expressionRVariable.tpl │ │ ├── expressionVariable.tpl │ │ ├── globalSection.tpl │ │ └── indicatorParameter.tpl ├── functions_support.c │ ├── block │ │ ├── arg.tpl │ │ ├── argCopy_declare.tpl │ │ ├── argCopy_name.tpl │ │ ├── argsCopy_declare.tpl │ │ ├── argsCopy_finalize.tpl │ │ ├── argumentList.tpl │ │ ├── argumentList_comma.tpl │ │ ├── argumentSpec.tpl │ │ ├── argumentSpec_comma.tpl │ │ ├── argumentSpec_effective.tpl │ │ └── block.tpl │ └── document │ │ ├── document.tpl │ │ └── intermediate_impl.tpl ├── payload_callm.c │ ├── block │ │ ├── arg.tpl │ │ ├── argumentSpec_comma.tpl │ │ ├── block.tpl │ │ ├── entryAssign.tpl │ │ ├── entryField.tpl │ │ ├── entryItem.tpl │ │ ├── traceArgument.tpl │ │ └── traceParamCast.tpl │ └── document │ │ ├── document.tpl │ │ ├── postPair_comma.tpl │ │ └── prePair_comma.tpl ├── payload_fsim.c │ ├── block │ │ ├── arg.tpl │ │ ├── argCopy_declare.tpl │ │ ├── argCopy_name.tpl │ │ ├── argsCopy_declare.tpl │ │ ├── argsCopy_finalize.tpl │ │ ├── argumentList.tpl │ │ ├── argumentList_comma.tpl │ │ ├── argumentSpec_comma.tpl │ │ ├── argumentSpec_effective.tpl │ │ ├── block.tpl │ │ ├── fsimDataMember.tpl │ │ ├── fsimDataMemberInitialize.tpl │ │ ├── messageParam.tpl │ │ └── point_name.tpl │ └── document │ │ ├── document.tpl │ │ ├── replFunctionAddress.tpl │ │ ├── replacePair_comma.tpl │ │ ├── simPointAttributes.tpl │ │ └── targetFunctionAddress.tpl ├── payload_fsim_add_caller_address.data │ ├── block │ │ ├── argDefinition.tpl │ │ ├── block.tpl │ │ ├── epilogueSection.tpl │ │ ├── fpointParam.tpl │ │ ├── messageParamDefinition.tpl │ │ └── prologueSection.tpl │ └── document │ │ ├── document.tpl │ │ └── headerSection.tpl └── payload_leak_check.c │ ├── block │ ├── arg.tpl │ ├── argumentSpec_comma.tpl │ └── block.tpl │ └── document │ ├── document.tpl │ ├── postPair.tpl │ └── prePair.tpl ├── tests ├── CMakeLists.txt ├── calculator │ ├── CMakeLists.txt │ ├── calc_test_simple │ │ ├── CMakeLists.txt │ │ ├── calc_test_simple.c │ │ └── test.sh.in │ ├── calc_test_var_names │ │ ├── CMakeLists.txt │ │ ├── module.c │ │ └── test.sh.in │ ├── calc_test_vars │ │ ├── CMakeLists.txt │ │ ├── calc_test_vars.c │ │ └── test.sh.in │ └── calc_test_weak_vars │ │ ├── CMakeLists.txt │ │ ├── module.c │ │ └── test.sh.in ├── control_file │ ├── CMakeLists.txt │ └── module.c ├── core │ ├── CMakeLists.txt │ ├── Readme.txt │ ├── components │ │ ├── CMakeLists.txt │ │ ├── base │ │ │ ├── CMakeLists.txt │ │ │ ├── use_payload │ │ │ │ ├── CMakeLists.txt │ │ │ │ ├── base_module_use_payload.c │ │ │ │ └── test.sh.in │ │ │ └── use_several_payloads │ │ │ │ ├── CMakeLists.txt │ │ │ │ ├── base_module.c │ │ │ │ ├── interception_info_verificator │ │ │ │ ├── CMakeLists.txt │ │ │ │ └── verificator.c │ │ │ │ ├── payload1 │ │ │ │ ├── CMakeLists.txt │ │ │ │ └── payload.c │ │ │ │ ├── payload2 │ │ │ │ ├── CMakeLists.txt │ │ │ │ └── payload.c │ │ │ │ ├── payload3 │ │ │ │ ├── CMakeLists.txt │ │ │ │ └── payload.c │ │ │ │ ├── test1.sh.in │ │ │ │ └── test2.sh.in │ │ ├── functions_support │ │ │ ├── CMakeLists.txt │ │ │ ├── use_support │ │ │ │ ├── CMakeLists.txt │ │ │ │ ├── functions_support_module.c │ │ │ │ └── test.sh.in │ │ │ └── use_support_overlapped │ │ │ │ ├── CMakeLists.txt │ │ │ │ ├── functions_support_module.c │ │ │ │ └── test.sh.in │ │ ├── instrumentor │ │ │ ├── CMakeLists.txt │ │ │ ├── instrumentor_module.h │ │ │ ├── instrumentor_module_simple.c │ │ │ ├── test.sh.in │ │ │ └── test_module │ │ │ │ ├── CMakeLists.txt │ │ │ │ └── test_module.c │ │ └── target_detector │ │ │ ├── CMakeLists.txt │ │ │ ├── target_detector_module_simple.c │ │ │ ├── test.sh.in │ │ │ └── test_module │ │ │ ├── CMakeLists.txt │ │ │ └── test_module.c │ ├── payload_api │ │ ├── CMakeLists.txt │ │ ├── basics │ │ │ ├── CMakeLists.txt │ │ │ ├── payload │ │ │ │ ├── CMakeLists.txt │ │ │ │ ├── functions.data │ │ │ │ └── payload.c │ │ │ ├── payload_event_recorder │ │ │ │ ├── CMakeLists.txt │ │ │ │ ├── functions.data │ │ │ │ └── payload.c │ │ │ ├── target-with-dashes │ │ │ │ ├── CMakeLists.txt │ │ │ │ └── target.c │ │ │ ├── target_init_fail │ │ │ │ ├── CMakeLists.txt │ │ │ │ └── target.c │ │ │ ├── target_normal │ │ │ │ ├── CMakeLists.txt │ │ │ │ └── target.c │ │ │ ├── test.sh.in │ │ │ ├── test_change_target.sh.in │ │ │ ├── test_events.sh.in │ │ │ ├── test_set_target.sh.in │ │ │ ├── test_several_targets.sh.in │ │ │ └── test_several_targets_constraints.sh.in │ │ ├── in_init │ │ │ ├── CMakeLists.txt │ │ │ ├── payload │ │ │ │ ├── CMakeLists.txt │ │ │ │ ├── functions.data │ │ │ │ └── payload.c │ │ │ ├── target │ │ │ │ ├── CMakeLists.txt │ │ │ │ └── test_in_init_target.c │ │ │ └── test.sh.in │ │ └── register │ │ │ ├── CMakeLists.txt │ │ │ ├── payload │ │ │ ├── CMakeLists.txt │ │ │ ├── functions.data │ │ │ └── payload.c │ │ │ └── test.sh.in │ └── simple │ │ ├── CMakeLists.txt │ │ ├── ins_rm.sh.in │ │ ├── ins_rm_with_target.sh.in │ │ └── simple_payload │ │ ├── CMakeLists.txt │ │ ├── functions.data │ │ └── payload.c ├── examples │ ├── CMakeLists.txt │ ├── build_example.sh.in │ ├── counters │ │ ├── CMakeLists.txt │ │ ├── counters.conf.in │ │ └── test_counters.sh.in │ ├── custom_indicator_fsim │ │ └── CMakeLists.txt │ ├── custom_payload_callm │ │ └── CMakeLists.txt │ ├── custom_payload_fsim │ │ └── CMakeLists.txt │ ├── leak_check │ │ ├── CMakeLists.txt │ │ ├── annotations │ │ │ └── CMakeLists.txt │ │ └── mempool_ops │ │ │ └── CMakeLists.txt │ ├── sample_fsim │ │ ├── CMakeLists.txt │ │ └── test_fault_simulation.sh.in │ ├── sample_fsim_payload │ │ └── CMakeLists.txt │ ├── sample_indicator │ │ ├── CMakeLists.txt │ │ ├── module │ │ │ ├── CMakeLists.txt │ │ │ └── module.c │ │ └── test.sh.in │ └── sample_target │ │ ├── CMakeLists.txt │ │ ├── load_unload_simple.sh.in │ │ ├── load_unload_with_test.sh.in │ │ └── test_sample_target.c ├── fault_indicators │ ├── CMakeLists.txt │ ├── common │ │ ├── CMakeLists.txt │ │ ├── get_caller_address │ │ │ ├── CMakeLists.txt │ │ │ ├── functions_support.data │ │ │ └── payload.c │ │ ├── module │ │ │ ├── CMakeLists.txt │ │ │ └── module.c │ │ ├── target_caller_address │ │ │ ├── CMakeLists.txt │ │ │ └── target.c │ │ ├── test.sh.in │ │ └── test_caller_address.sh.in │ └── final_template │ │ ├── CMakeLists.txt │ │ ├── README │ │ ├── cascade_simulate │ │ ├── CMakeLists.txt │ │ ├── indicator.data │ │ └── test.sh.in │ │ ├── cascade_simulate_complex │ │ ├── CMakeLists.txt │ │ ├── indicator.data │ │ └── test.sh.in │ │ ├── fail_with_even_instances │ │ ├── CMakeLists.txt │ │ ├── indicator.data │ │ └── test.sh.in │ │ ├── module │ │ ├── CMakeLists.txt │ │ └── module.c │ │ ├── simulate_always │ │ ├── CMakeLists.txt │ │ ├── indicator.data │ │ └── test.sh.in │ │ ├── simulate_never │ │ ├── CMakeLists.txt │ │ ├── indicator.data │ │ └── test.sh.in │ │ ├── state_variable │ │ ├── CMakeLists.txt │ │ ├── indicator.data │ │ └── test.sh.in │ │ ├── test_common.sh.in │ │ ├── with_file │ │ ├── CMakeLists.txt │ │ ├── indicator.data │ │ └── test.sh.in │ │ ├── with_parameter │ │ ├── CMakeLists.txt │ │ ├── indicator.data │ │ └── test.sh.in │ │ └── with_ro_file │ │ ├── CMakeLists.txt │ │ ├── indicator.data │ │ └── test.sh.in ├── fault_simulation │ ├── CMakeLists.txt │ ├── common.h │ ├── indicators_simple │ │ ├── CMakeLists.txt │ │ └── module.c │ ├── module_a │ │ ├── CMakeLists.txt │ │ └── module_a.c │ ├── module_b │ │ ├── CMakeLists.txt │ │ └── module_b.c │ ├── test_fault_tolerance.sh.in │ ├── test_rewrite_indicator.sh.in │ └── test_simple.sh.in ├── global │ ├── CMakeLists.txt │ ├── Readme.txt │ └── call_int │ │ ├── CMakeLists.txt │ │ ├── capable │ │ ├── CMakeLists.txt │ │ ├── capable.trigger │ │ └── triggers_header.data │ │ ├── common_mm │ │ ├── CMakeLists.txt │ │ ├── __alloc_pages_nodemask.trigger │ │ ├── __free_pages.trigger │ │ ├── __get_free_pages.trigger │ │ ├── __kmalloc.trigger │ │ ├── __kmalloc_node.trigger │ │ ├── __krealloc.trigger │ │ ├── alloc_pages_current.trigger │ │ ├── alloc_pages_exact.trigger │ │ ├── alloc_pages_exact_nid.trigger │ │ ├── free_pages.trigger │ │ ├── free_pages_exact.trigger │ │ ├── get_zeroed_page.trigger │ │ ├── kfree.trigger │ │ ├── kmalloc_order_trace.trigger │ │ ├── kmem_cache_alloc.trigger │ │ ├── kmem_cache_alloc_node.trigger │ │ ├── kmem_cache_alloc_node_notrace.trigger │ │ ├── kmem_cache_alloc_node_trace.trigger │ │ ├── kmem_cache_alloc_notrace.trigger │ │ ├── kmem_cache_alloc_trace.trigger │ │ ├── kmem_cache_free.trigger │ │ ├── krealloc.trigger │ │ ├── kzfree.trigger │ │ └── triggers_header.data │ │ ├── mem_util │ │ ├── CMakeLists.txt │ │ ├── call_rcu.trigger │ │ ├── call_rcu_sched.trigger │ │ ├── kfree_call_rcu.trigger │ │ ├── kmemdup.trigger │ │ ├── kstrdup.trigger │ │ ├── kstrndup.trigger │ │ ├── match_strdup.trigger │ │ ├── posix_acl_alloc.trigger │ │ ├── posix_acl_chmod.trigger │ │ ├── posix_acl_clone.trigger │ │ ├── posix_acl_create.trigger │ │ ├── posix_acl_from_mode.trigger │ │ ├── posix_acl_from_xattr.trigger │ │ └── triggers_header.data │ │ ├── mutexes │ │ ├── CMakeLists.txt │ │ ├── __mutex_init.trigger │ │ ├── mutex_lock.trigger │ │ ├── mutex_lock_interruptible.trigger │ │ ├── mutex_lock_killable.trigger │ │ ├── mutex_trylock.trigger │ │ ├── mutex_unlock.trigger │ │ └── triggers_header.data │ │ ├── schedule │ │ ├── CMakeLists.txt │ │ ├── __cond_resched_lock.trigger │ │ ├── _cond_resched.trigger │ │ ├── cond_resched_lock.trigger │ │ ├── io_schedule.trigger │ │ ├── preempt_schedule.trigger │ │ ├── schedule.trigger │ │ ├── schedule_timeout.trigger │ │ ├── schedule_timeout_interruptible.trigger │ │ ├── schedule_timeout_uninterruptible.trigger │ │ └── triggers_header.data │ │ ├── spinlocks │ │ ├── CMakeLists.txt │ │ ├── _raw_spin_lock.trigger │ │ ├── _raw_spin_lock_irq.trigger │ │ ├── _raw_spin_lock_irqsave.trigger │ │ ├── _raw_spin_unlock.trigger │ │ ├── _raw_spin_unlock_irq.trigger │ │ ├── _raw_spin_unlock_irqrestore.trigger │ │ ├── _spin_lock.trigger │ │ ├── _spin_lock_irq.trigger │ │ ├── _spin_lock_irqsave.trigger │ │ ├── _spin_unlock.trigger │ │ ├── _spin_unlock_irq.trigger │ │ ├── _spin_unlock_irqrestore.trigger │ │ └── triggers_header.data │ │ ├── test_common │ │ ├── trigger_common_info.data.in │ │ ├── trigger_payload │ │ │ ├── CMakeLists.txt │ │ │ └── templates_trigger_payload.c │ │ │ │ ├── block │ │ │ │ ├── arg_def.tpl │ │ │ │ └── block.tpl │ │ │ │ └── document │ │ │ │ ├── document.tpl │ │ │ │ └── interception.tpl │ │ ├── trigger_target │ │ │ ├── CMakeLists.txt │ │ │ └── templates_trigger_target.c │ │ │ │ ├── block │ │ │ │ └── block.tpl │ │ │ │ └── document │ │ │ │ ├── document.tpl │ │ │ │ ├── trigger.tpl │ │ │ │ └── user_space_access.tpl │ │ └── trigger_test │ │ │ ├── CMakeLists.txt │ │ │ └── templates_trigger_test.sh │ │ │ ├── block │ │ │ └── block.tpl │ │ │ └── document │ │ │ └── document.tpl │ │ ├── uaccess │ │ ├── CMakeLists.txt │ │ ├── _copy_from_user.trigger │ │ ├── _copy_to_user.trigger │ │ ├── copy_from_user.trigger │ │ ├── copy_to_user.trigger │ │ ├── memdup_user.trigger │ │ ├── strndup_user.trigger │ │ └── triggers_header.data │ │ ├── virtual_mm │ │ ├── CMakeLists.txt │ │ ├── __vmalloc.trigger │ │ ├── triggers_header.data │ │ ├── vfree.trigger │ │ ├── vmalloc.trigger │ │ ├── vmalloc_32.trigger │ │ ├── vmalloc_32_user.trigger │ │ ├── vmalloc_node.trigger │ │ ├── vmalloc_user.trigger │ │ ├── vzalloc.trigger │ │ └── vzalloc_node.trigger │ │ └── waitqueue │ │ ├── CMakeLists.txt │ │ ├── __init_waitqueue_head.trigger │ │ ├── __wake_up.trigger │ │ ├── add_wait_queue.trigger │ │ ├── add_wait_queue_exclusive.trigger │ │ ├── finish_wait.trigger │ │ ├── init_waitqueue_head.trigger │ │ ├── prepare_to_wait.trigger │ │ ├── remove_wait_queue.trigger │ │ └── triggers_header.data ├── leak_check │ ├── CMakeLists.txt │ ├── alloc_impl_module │ │ ├── CMakeLists.txt │ │ └── test_module.c │ ├── check_addresses.awk │ ├── check_summary.awk │ ├── cleaner_module │ │ ├── CMakeLists.txt │ │ └── test_module.c │ ├── kasprintf_module │ │ ├── CMakeLists.txt │ │ └── test_module.c │ ├── kedr_test_lc_common.h │ ├── kfree_rcu_module │ │ ├── CMakeLists.txt │ │ └── test_module.c │ ├── leak_check_test.conf.in │ ├── leaker_module │ │ ├── CMakeLists.txt │ │ └── test_module.c │ ├── test_alloc_impl.sh.in │ ├── test_basics.sh.in │ ├── test_clear.sh.in │ ├── test_flush.sh.in │ ├── test_kasprintf.sh.in │ ├── test_kfree_rcu.sh.in │ └── test_several_targets.sh.in ├── modules │ ├── CMakeLists.txt │ ├── payload_several_targets │ │ ├── CMakeLists.txt │ │ ├── functions.data │ │ └── payload.c │ └── sample_target │ │ └── CMakeLists.txt ├── payloads_callm │ ├── CMakeLists.txt │ └── caller_address │ │ ├── CMakeLists.txt │ │ └── test.sh.in ├── payloads_fsim │ ├── CMakeLists.txt │ └── final_template │ │ ├── CMakeLists.txt │ │ ├── function_ellipsis │ │ ├── my_function.c │ │ └── my_function.h │ │ ├── indicators_module │ │ ├── CMakeLists.txt │ │ └── indicator.c │ │ ├── test_common.sh.in │ │ ├── test_fpoint_with_params │ │ ├── CMakeLists.txt │ │ ├── payload.data │ │ └── test.sh.in │ │ ├── test_fsim_ellipsis │ │ ├── CMakeLists.txt │ │ ├── payload.data │ │ └── test.sh.in │ │ ├── test_fsim_va_arg │ │ ├── CMakeLists.txt │ │ ├── payload.data │ │ └── test.sh.in │ │ ├── test_no_fpoint_params │ │ ├── CMakeLists.txt │ │ ├── payload.data │ │ └── test.sh.in │ │ ├── test_rename_fpoint │ │ ├── CMakeLists.txt │ │ ├── payload.data │ │ └── test.sh.in │ │ ├── test_reuse_fpoint │ │ ├── CMakeLists.txt │ │ ├── payload.data │ │ └── test.sh.in │ │ ├── test_reuse_renamed_fpoint │ │ ├── CMakeLists.txt │ │ ├── payload.data │ │ └── test.sh.in │ │ ├── test_several_functions │ │ ├── CMakeLists.txt │ │ ├── payload.data │ │ └── test.sh.in │ │ └── trigger_target │ │ ├── CMakeLists.txt │ │ └── target.c ├── run_tests_common.sh.in ├── scripts │ ├── CMakeLists.txt │ └── do_commands.sh ├── tools │ ├── CMakeLists.txt │ └── control │ │ ├── CMakeLists.txt │ │ ├── common.sh │ │ ├── test.sh.in │ │ └── test_several_targets.sh.in ├── trace │ ├── CMakeLists.txt │ ├── cross_cpu_ordering │ │ ├── CMakeLists.txt │ │ ├── test.sh.in │ │ └── verify_trace.awk │ ├── include │ │ └── kedr_trace_test.h │ ├── kedr_trace_test.conf.in │ ├── modules │ │ ├── CMakeLists.txt │ │ ├── trace_generator │ │ │ ├── CMakeLists.txt │ │ │ └── module.c │ │ └── trace_target │ │ │ ├── CMakeLists.txt │ │ │ └── module.c │ ├── simple_ordering │ │ ├── CMakeLists.txt │ │ ├── test.sh.in │ │ └── verify_trace.awk │ ├── test_block.sh.in │ ├── test_block_session.sh.in │ ├── test_common.sh.in │ ├── test_session.sh.in │ └── verify_trace_format.awk └── util │ ├── CMakeLists.txt │ └── stack_trace │ ├── CMakeLists.txt │ └── reliability │ ├── CMakeLists.txt │ ├── test.sh.in │ └── test_module.c ├── tools ├── CMakeLists.txt ├── control │ ├── CMakeLists.txt │ └── kedr.in └── kedr_gen │ ├── CMakeLists.txt │ ├── README │ └── src │ ├── CMakeLists.txt │ ├── Common.cpp │ ├── Common.h │ ├── Generator.cpp │ ├── Generator.h │ ├── TemplateLoader.cpp │ ├── TemplateLoader.h │ ├── ValueLoader.cpp │ ├── ValueLoader.h │ ├── main.cpp │ └── mist_engine │ ├── AUTHORS │ ├── CMakeLists.txt │ ├── ChangeLog │ ├── INSTALL │ ├── LICENSE │ ├── NEWS │ ├── README │ └── src │ ├── CMakeLists.txt │ ├── about.h │ ├── config.h.cmake │ ├── grar.c │ ├── grar.h │ ├── main.c │ ├── mist_base.c │ ├── mist_base.h │ ├── mist_engine.c │ ├── mist_engine.h.in │ ├── mist_engine.rc │ ├── mist_engine.rc.in │ ├── mist_errors.h │ ├── mist_exec.c │ ├── mist_exec.h │ ├── mist_file_utils.c │ ├── mist_file_utils.h │ ├── mist_string_utils.c │ ├── mist_string_utils.h │ ├── smap.c │ ├── smap.h │ └── versions.ldscript ├── trace ├── CMakeLists.txt ├── kedr_trace_module.c ├── ring_buffer_consume_signature.c ├── ring_buffer_resize_signature.c ├── ring_buffer_size_signature.c ├── trace_buffer.c ├── trace_buffer.h ├── trace_config.h.in ├── trace_file.c ├── trace_file.h ├── wait_nestable.c └── wait_nestable.h └── util └── stack_trace └── stack_trace.c /.gitignore: -------------------------------------------------------------------------------- 1 | build/ 2 | 3 | -------------------------------------------------------------------------------- /sources/AUTHORS: -------------------------------------------------------------------------------- 1 | The core parts of KEDR have been developed and are maintained by: 2 | 3 | Eugene A. Shatokhin 4 | Andrey V. Tsyvarev 5 | 6 | KEDR also includes code contributed by other developers. 7 | -------------------------------------------- 8 | -------------------------------------------------------------------------------- /sources/INSTALL: -------------------------------------------------------------------------------- 1 | See doc/html/kedr_manual_getting_started.html for installation instructions 2 | and other relevant information. 3 | 4 | The manual is also available online: 5 | http://code.google.com/p/kedr/wiki/kedr_manual 6 | 7 | If you are looking for information about how to build KEDR for a different 8 | kernel version on the same system or for another system, see the "HowTos" 9 | at the project site: 10 | http://code.google.com/p/kedr/ 11 | -------------------------------------------------------------------------------- /sources/cmake/kmodule_sources/check_random32/module.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | 6 | MODULE_LICENSE("GPL"); 7 | 8 | static int __init 9 | my_init(void) 10 | { 11 | return (int)random32(); 12 | } 13 | 14 | static void __exit 15 | my_exit(void) 16 | { 17 | } 18 | 19 | module_init(my_init); 20 | module_exit(my_exit); 21 | -------------------------------------------------------------------------------- /sources/cmake/kmodule_sources/check_unreliable_functions/README: -------------------------------------------------------------------------------- 1 | This directory contains source files with names having the following format: 2 | ${f}.c. Each of the files is used in try-compile procedure to determine 3 | whether function 'f' exists in the kernel. Usually such kernel module 4 | contains the code using this function directly or indirectly. 5 | 6 | The list of these files is hard-coded in the cmake module as 7 | 'unreliable_functions_list'. 8 | -------------------------------------------------------------------------------- /sources/cmake/modules/install_testing_ctest_files/run_tests.sh.in: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | cd @_ictest_install_dir@ && ctest -------------------------------------------------------------------------------- /sources/cmake/modules/kbuild_system_files/Kbuild.in: -------------------------------------------------------------------------------- 1 | ccflags-y := @ccflags@ 2 | 3 | KBUILD_EXTRA_SYMBOLS := @module_symvers@ 4 | 5 | obj-m := @module_name@.o 6 | ${obj_src_string} -------------------------------------------------------------------------------- /sources/cmake/modules/update_modules_files/update_modules_dir/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | install(SCRIPT "${CMAKE_CURRENT_SOURCE_DIR}/depmod.cmake") -------------------------------------------------------------------------------- /sources/doc/docbook/images/system_architecture.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/euspectre/kedr/cc4f22330373f1de33ce0b7f771f097885bb4d6a/sources/doc/docbook/images/system_architecture.png -------------------------------------------------------------------------------- /sources/doc/html/images/system_architecture.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/euspectre/kedr/cc4f22330373f1de33ce0b7f771f097885bb4d6a/sources/doc/html/images/system_architecture.png -------------------------------------------------------------------------------- /sources/examples/.readme.developer: -------------------------------------------------------------------------------- 1 | The examples demonstrating how to use KEDR should be stored here. 2 | -------------------------------------------------------------------------------- /sources/examples/counters/Kbuild.in: -------------------------------------------------------------------------------- 1 | module_name=@module_name@ 2 | 3 | ccflags-y := -I$(src) -I@KEDR_INSTALL_INCLUDE_DIR@ 4 | obj-m := ${module_name}.o 5 | ${module_name}-y := counters.o functions_support.o -------------------------------------------------------------------------------- /sources/examples/counters/configure_kernel_functions.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # For each function in argument list verify, 4 | # whether this functions is exported by the Linux kernel. 5 | # Print space-separated list of functions, which are exported. 6 | 7 | for function in $*; do 8 | if grep -E "^[[:xdigit:]]+[[:space:]]+T[[:space:]]+${function}$" /proc/kallsyms > /dev/null; then 9 | printf "${function} " 10 | fi 11 | done -------------------------------------------------------------------------------- /sources/examples/counters/mutex_lock.data: -------------------------------------------------------------------------------- 1 | [group] 2 | function.name = mutex_lock 3 | 4 | arg.type = struct mutex* 5 | arg.name = lock 6 | -------------------------------------------------------------------------------- /sources/examples/counters/mutex_lock_interruptible.data: -------------------------------------------------------------------------------- 1 | [group] 2 | function.name = mutex_lock_interruptible 3 | returnType = int 4 | 5 | arg.type = struct mutex* 6 | arg.name = lock 7 | -------------------------------------------------------------------------------- /sources/examples/counters/mutex_lock_killable.data: -------------------------------------------------------------------------------- 1 | [group] 2 | function.name = mutex_lock_killable 3 | returnType = int 4 | 5 | arg.type = struct mutex* 6 | arg.name = lock 7 | -------------------------------------------------------------------------------- /sources/examples/custom_indicator_fsim/Kbuild.in: -------------------------------------------------------------------------------- 1 | module_name=@module_name@ 2 | 3 | ccflags-y := -I@KEDR_INSTALL_INCLUDE_DIR@ 4 | obj-m := $(module_name).o 5 | $(module_name)-y = indicator.o calculator.o control_file.o 6 | -------------------------------------------------------------------------------- /sources/examples/custom_payload_callm/Kbuild.in: -------------------------------------------------------------------------------- 1 | module_name=@module_name@ 2 | 3 | ccflags-y := -I@KEDR_INSTALL_INCLUDE_DIR@ 4 | obj-m := $(module_name).o 5 | $(module_name)-y := payload.o functions_support.o -------------------------------------------------------------------------------- /sources/examples/custom_payload_fsim/Kbuild.in: -------------------------------------------------------------------------------- 1 | module_name=@module_name@ 2 | 3 | ccflags-y := -I@KEDR_INSTALL_INCLUDE_DIR@ 4 | obj-m := $(module_name).o 5 | $(module_name)-y := payload.o functions_support.o -------------------------------------------------------------------------------- /sources/examples/leak_check/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # To be realistic: noone seems to use custom plugins for LeakCheck, they are 2 | # too difficult to write and maintain. 3 | # add_subdirectory(mempool_ops) 4 | 5 | add_subdirectory(annotations) 6 | -------------------------------------------------------------------------------- /sources/examples/leak_check/annotations/Kbuild.in: -------------------------------------------------------------------------------- 1 | module_name=@module_name@ 2 | 3 | ccflags-y := -I@KEDR_INSTALL_INCLUDE_DIR@ 4 | obj-m := $(module_name).o 5 | $(module_name)-y := module.o 6 | -------------------------------------------------------------------------------- /sources/examples/leak_check/annotations/cfake.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/euspectre/kedr/cc4f22330373f1de33ce0b7f771f097885bb4d6a/sources/examples/leak_check/annotations/cfake.h -------------------------------------------------------------------------------- /sources/examples/leak_check/mempool_ops/Kbuild.in: -------------------------------------------------------------------------------- 1 | module_name=@module_name@ 2 | 3 | ccflags-y := -I@KEDR_INSTALL_INCLUDE_DIR@ 4 | obj-m := $(module_name).o 5 | $(module_name)-y := payload.o functions_support.o -------------------------------------------------------------------------------- /sources/examples/sample_fsim_payload/Kbuild.in: -------------------------------------------------------------------------------- 1 | module_name=@module_name@ 2 | 3 | ccflags-y := -I@KEDR_INSTALL_INCLUDE_DIR@ 4 | obj-m := ${module_name}.o 5 | ${module_name}-y := payload.o functions_support.o -------------------------------------------------------------------------------- /sources/examples/sample_indicator/Kbuild.in: -------------------------------------------------------------------------------- 1 | module_name=@module_name@ 2 | 3 | ccflags-y := -I$(src) -I@KEDR_INSTALL_INCLUDE_DIR@ 4 | obj-m := $(module_name).o 5 | $(module_name)-y := sample_indicator.o -------------------------------------------------------------------------------- /sources/examples/sample_target/Kbuild: -------------------------------------------------------------------------------- 1 | module_name=kedr_sample_target 2 | 3 | ccflags-y := -g -I$(src) 4 | obj-m := ${module_name}.o 5 | ${module_name}-y := cfake.o 6 | -------------------------------------------------------------------------------- /sources/examples/sample_target/cfake.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/euspectre/kedr/cc4f22330373f1de33ce0b7f771f097885bb4d6a/sources/examples/sample_target/cfake.h -------------------------------------------------------------------------------- /sources/examples/sample_target/makefile_installed.in: -------------------------------------------------------------------------------- 1 | @multi_kernel_KERNEL_VAR_MAKE_DEFINITION@ 2 | 3 | module_name=kedr_sample_target 4 | 5 | KBUILD_DIR=@kbuild_dir_make_installed@ 6 | PWD=`pwd` 7 | 8 | all: ${module_name}.ko 9 | 10 | ${module_name}.ko: cfake.c 11 | $(MAKE) -C ${KBUILD_DIR} M=${PWD} modules 12 | 13 | clean: 14 | $(MAKE) -C ${KBUILD_DIR} M=${PWD} clean 15 | 16 | .PHONY: all clean 17 | -------------------------------------------------------------------------------- /sources/fault_indicators/capable/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Name of the module to create 2 | set(kmodule_name "kedr_fsim_indicator_capable") 3 | 4 | if(USER_PART) 5 | kedr_conf_fsim_add_indicator(${kmodule_name}) 6 | endif(USER_PART) 7 | 8 | # The rest is for kernel part only. 9 | if(NOT KERNEL_PART) 10 | return() 11 | endif(NOT KERNEL_PART) 12 | 13 | create_indicator(${kmodule_name}) 14 | 15 | kedr_install_kmodule(${kmodule_name}) 16 | -------------------------------------------------------------------------------- /sources/fault_indicators/common/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Name of the module to create 2 | set(kmodule_name "kedr_fsim_indicator_common") 3 | 4 | if(USER_PART) 5 | kedr_conf_fsim_add_indicator(${kmodule_name}) 6 | endif(USER_PART) 7 | 8 | # The rest is for kernel part only. 9 | if(NOT KERNEL_PART) 10 | return() 11 | endif(NOT KERNEL_PART) 12 | 13 | create_indicator(${kmodule_name}) 14 | 15 | kedr_install_kmodule(${kmodule_name}) 16 | -------------------------------------------------------------------------------- /sources/fault_indicators/kmalloc/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Name of the module to create 2 | set(kmodule_name "kedr_fsim_indicator_kmalloc") 3 | 4 | if(USER_PART) 5 | kedr_conf_fsim_add_indicator(${kmodule_name}) 6 | endif(USER_PART) 7 | 8 | # The rest is for kernel part only. 9 | if(NOT KERNEL_PART) 10 | return() 11 | endif(NOT KERNEL_PART) 12 | 13 | create_indicator(${kmodule_name}) 14 | 15 | kedr_install_kmodule(${kmodule_name}) 16 | 17 | -------------------------------------------------------------------------------- /sources/fault_simulation/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(module_name kedr_fault_simulation) 2 | 3 | kbuild_add_module(${module_name} "fault_simulation_module.c" "control_file.c") 4 | 5 | rule_copy_file("control_file.c" 6 | "${CMAKE_SOURCE_DIR}/control_file/control_file.c") 7 | 8 | kedr_install_kmodule(${module_name}) 9 | kedr_install_symvers(${module_name}) 10 | 11 | -------------------------------------------------------------------------------- /sources/functions/Readme.txt: -------------------------------------------------------------------------------- 1 | This is a kind of a "function data base": the information about the kernel 2 | functions KEDR can process by default is stored here. 3 | 4 | The functions are organized in groups for convenience. These groups have 5 | nothing to do with the groups of functions the payload modules use. These 6 | sets of groups are not required to match. Same for the groups of functions 7 | used by the call interception tests. 8 | -------------------------------------------------------------------------------- /sources/functions/capable/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | func_db_configure_functions ( 2 | "capable" 3 | ) 4 | 5 | -------------------------------------------------------------------------------- /sources/functions/capable/capable.data: -------------------------------------------------------------------------------- 1 | [group] 2 | # Name and return type of the target function 3 | function.name = capable 4 | returnType = int 5 | 6 | # Names and types of the arguments of the target function 7 | arg.type = int 8 | arg.name = cap 9 | ####################################################################### 10 | -------------------------------------------------------------------------------- /sources/functions/capable/header.data: -------------------------------------------------------------------------------- 1 | header =>> 2 | #include 3 | << 4 | -------------------------------------------------------------------------------- /sources/functions/common_mm/__free_pages.data: -------------------------------------------------------------------------------- 1 | [group] 2 | # Name and return type of the target function 3 | function.name = __free_pages 4 | 5 | # Names and types of the arguments of the target function 6 | arg.type = struct page * 7 | arg.name = page 8 | 9 | arg.type = unsigned int 10 | arg.name = order 11 | ####################################################################### 12 | -------------------------------------------------------------------------------- /sources/functions/common_mm/__get_free_pages.data: -------------------------------------------------------------------------------- 1 | [group] 2 | # Name and return type of the target function 3 | function.name = __get_free_pages 4 | returnType = unsigned long 5 | 6 | # Names and types of the arguments of the target function 7 | arg.type = gfp_t 8 | arg.name = flags 9 | 10 | arg.type = unsigned int 11 | arg.name = order 12 | ####################################################################### 13 | -------------------------------------------------------------------------------- /sources/functions/common_mm/__kmalloc.data: -------------------------------------------------------------------------------- 1 | [group] 2 | # Name and return type of the target function 3 | function.name = __kmalloc 4 | returnType = void * 5 | 6 | # Names and types of the arguments of the target function 7 | arg.type = size_t 8 | arg.name = size 9 | 10 | arg.type = gfp_t 11 | arg.name = flags 12 | ####################################################################### 13 | -------------------------------------------------------------------------------- /sources/functions/common_mm/__kmalloc_node.data: -------------------------------------------------------------------------------- 1 | [group] 2 | # Name and return type of the target function 3 | function.name = __kmalloc_node 4 | returnType = void * 5 | 6 | # Names and types of the arguments of the target function 7 | arg.type = size_t 8 | arg.name = size 9 | 10 | arg.type = gfp_t 11 | arg.name = flags 12 | 13 | arg.type = int 14 | arg.name = nodeid 15 | ####################################################################### 16 | -------------------------------------------------------------------------------- /sources/functions/common_mm/__krealloc.data: -------------------------------------------------------------------------------- 1 | [group] 2 | # Name and return type of the target function 3 | function.name = __krealloc 4 | returnType = void * 5 | 6 | # Names and types of the arguments of the target function 7 | arg.type = const void * 8 | arg.name = p 9 | 10 | arg.type = size_t 11 | arg.name = size 12 | 13 | arg.type = gfp_t 14 | arg.name = flags 15 | ####################################################################### 16 | -------------------------------------------------------------------------------- /sources/functions/common_mm/alloc_pages_current.data: -------------------------------------------------------------------------------- 1 | [group] 2 | # Name and return type of the target function 3 | function.name = alloc_pages_current 4 | returnType = struct page * 5 | 6 | # Names and types of the arguments of the target function 7 | arg.type = gfp_t 8 | arg.name = flags 9 | 10 | arg.type = unsigned int 11 | arg.name = order 12 | ####################################################################### 13 | -------------------------------------------------------------------------------- /sources/functions/common_mm/alloc_pages_exact.data: -------------------------------------------------------------------------------- 1 | [group] 2 | # Name and return type of the target function 3 | function.name = alloc_pages_exact 4 | returnType = void * 5 | 6 | # Names and types of the arguments of the target function 7 | arg.type = size_t 8 | arg.name = size 9 | 10 | arg.type = gfp_t 11 | arg.name = flags 12 | ####################################################################### 13 | -------------------------------------------------------------------------------- /sources/functions/common_mm/alloc_pages_exact_nid.data: -------------------------------------------------------------------------------- 1 | [group] 2 | # Name and return type of the target function 3 | function.name = alloc_pages_exact_nid 4 | returnType = void * 5 | 6 | # Names and types of the arguments of the target function 7 | arg.type = int 8 | arg.name = nid 9 | 10 | arg.type = size_t 11 | arg.name = size 12 | 13 | arg.type = gfp_t 14 | arg.name = flags 15 | ####################################################################### 16 | -------------------------------------------------------------------------------- /sources/functions/common_mm/free_pages.data: -------------------------------------------------------------------------------- 1 | [group] 2 | # Name and return type of the target function 3 | function.name = free_pages 4 | 5 | # Names and types of the arguments of the target function 6 | arg.type = unsigned long 7 | arg.name = addr 8 | 9 | arg.type = unsigned int 10 | arg.name = order 11 | ####################################################################### 12 | -------------------------------------------------------------------------------- /sources/functions/common_mm/free_pages_exact.data: -------------------------------------------------------------------------------- 1 | [group] 2 | # Name and return type of the target function 3 | function.name = free_pages_exact 4 | 5 | # Names and types of the arguments of the target function 6 | arg.type = void * 7 | arg.name = virt 8 | 9 | arg.type = size_t 10 | arg.name = size 11 | ####################################################################### 12 | -------------------------------------------------------------------------------- /sources/functions/common_mm/get_zeroed_page.data: -------------------------------------------------------------------------------- 1 | [group] 2 | # Name and return type of the target function 3 | function.name = get_zeroed_page 4 | returnType = unsigned long 5 | 6 | # Names and types of the arguments of the target function 7 | arg.type = gfp_t 8 | arg.name = flags 9 | ####################################################################### 10 | -------------------------------------------------------------------------------- /sources/functions/common_mm/header.data: -------------------------------------------------------------------------------- 1 | header =>> 2 | #include 3 | #include 4 | #include 5 | #include /* NUMA-related stuff */ 6 | << 7 | -------------------------------------------------------------------------------- /sources/functions/common_mm/ioremap_cache.data: -------------------------------------------------------------------------------- 1 | [group] 2 | # Name and return type of the target function 3 | function.name = ioremap_cache 4 | returnType = void * 5 | 6 | # Names and types of the arguments of the target function 7 | arg.type = resource_size_t 8 | arg.name = phys_addr 9 | 10 | arg.type = unsigned long 11 | arg.name = size 12 | ####################################################################### 13 | -------------------------------------------------------------------------------- /sources/functions/common_mm/ioremap_nocache.data: -------------------------------------------------------------------------------- 1 | [group] 2 | # Name and return type of the target function 3 | function.name = ioremap_nocache 4 | returnType = void * 5 | 6 | # Names and types of the arguments of the target function 7 | arg.type = resource_size_t 8 | arg.name = phys_addr 9 | 10 | arg.type = unsigned long 11 | arg.name = size 12 | ####################################################################### 13 | -------------------------------------------------------------------------------- /sources/functions/common_mm/ioremap_uc.data: -------------------------------------------------------------------------------- 1 | [group] 2 | # Name and return type of the target function 3 | function.name = ioremap_uc 4 | returnType = void * 5 | 6 | # Names and types of the arguments of the target function 7 | arg.type = resource_size_t 8 | arg.name = phys_addr 9 | 10 | arg.type = unsigned long 11 | arg.name = size 12 | ####################################################################### 13 | -------------------------------------------------------------------------------- /sources/functions/common_mm/ioremap_wc.data: -------------------------------------------------------------------------------- 1 | [group] 2 | # Name and return type of the target function 3 | function.name = ioremap_wc 4 | returnType = void * 5 | 6 | # Names and types of the arguments of the target function 7 | arg.type = resource_size_t 8 | arg.name = phys_addr 9 | 10 | arg.type = unsigned long 11 | arg.name = size 12 | ####################################################################### 13 | -------------------------------------------------------------------------------- /sources/functions/common_mm/ioremap_wt.data: -------------------------------------------------------------------------------- 1 | [group] 2 | # Name and return type of the target function 3 | function.name = ioremap_wt 4 | returnType = void * 5 | 6 | # Names and types of the arguments of the target function 7 | arg.type = resource_size_t 8 | arg.name = phys_addr 9 | 10 | arg.type = unsigned long 11 | arg.name = size 12 | ####################################################################### 13 | -------------------------------------------------------------------------------- /sources/functions/common_mm/iounmap.data: -------------------------------------------------------------------------------- 1 | [group] 2 | # Name and return type of the target function 3 | function.name = iounmap 4 | 5 | # Names and types of the arguments of the target function 6 | arg.type = void * 7 | arg.name = addr 8 | ####################################################################### 9 | -------------------------------------------------------------------------------- /sources/functions/common_mm/kfree.data: -------------------------------------------------------------------------------- 1 | [group] 2 | # Name and return type of the target function 3 | function.name = kfree 4 | 5 | # Names and types of the arguments of the target function 6 | arg.type = void * 7 | arg.name = p 8 | ####################################################################### 9 | -------------------------------------------------------------------------------- /sources/functions/common_mm/kmem_cache_alloc.data: -------------------------------------------------------------------------------- 1 | [group] 2 | # Name and return type of the target function 3 | function.name = kmem_cache_alloc 4 | returnType = void * 5 | 6 | # Names and types of the arguments of the target function 7 | arg.type = struct kmem_cache * 8 | arg.name = mc 9 | 10 | arg.type = gfp_t 11 | arg.name = flags 12 | ####################################################################### 13 | -------------------------------------------------------------------------------- /sources/functions/common_mm/kmem_cache_alloc_notrace.data: -------------------------------------------------------------------------------- 1 | [group] 2 | # Name and return type of the target function 3 | function.name = kmem_cache_alloc_notrace 4 | returnType = void * 5 | 6 | # Names and types of the arguments of the target function 7 | arg.type = struct kmem_cache * 8 | arg.name = mc 9 | 10 | arg.type = gfp_t 11 | arg.name = flags 12 | ####################################################################### 13 | -------------------------------------------------------------------------------- /sources/functions/common_mm/kmem_cache_free.data: -------------------------------------------------------------------------------- 1 | [group] 2 | # Name and return type of the target function 3 | function.name = kmem_cache_free 4 | 5 | # Names and types of the arguments of the target function 6 | arg.type = struct kmem_cache * 7 | arg.name = mc 8 | 9 | arg.type = void* 10 | arg.name = p 11 | ####################################################################### 12 | -------------------------------------------------------------------------------- /sources/functions/common_mm/krealloc.data: -------------------------------------------------------------------------------- 1 | [group] 2 | # Name and return type of the target function 3 | function.name = krealloc 4 | returnType = void * 5 | 6 | # Names and types of the arguments of the target function 7 | arg.type = const void * 8 | arg.name = p 9 | 10 | arg.type = size_t 11 | arg.name = size 12 | 13 | arg.type = gfp_t 14 | arg.name = flags 15 | ####################################################################### 16 | -------------------------------------------------------------------------------- /sources/functions/common_mm/kzfree.data: -------------------------------------------------------------------------------- 1 | [group] 2 | # Name and return type of the target function 3 | function.name = kzfree 4 | 5 | # Names and types of the arguments of the target function 6 | arg.type = void * 7 | arg.name = p 8 | ####################################################################### 9 | -------------------------------------------------------------------------------- /sources/functions/kasprintf/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | func_db_configure_functions ( 2 | "kasprintf" 3 | "kvasprintf" 4 | ) 5 | 6 | -------------------------------------------------------------------------------- /sources/functions/kasprintf/header.data: -------------------------------------------------------------------------------- 1 | header =>> 2 | #include 3 | #include 4 | << 5 | -------------------------------------------------------------------------------- /sources/functions/mem_util/__page_cache_alloc.data: -------------------------------------------------------------------------------- 1 | [group] 2 | # Name and return type of the target function 3 | function.name = __page_cache_alloc 4 | returnType = struct page * 5 | 6 | # Names and types of the arguments of the target function 7 | arg.type = gfp_t 8 | arg.name = gfp 9 | ####################################################################### 10 | -------------------------------------------------------------------------------- /sources/functions/mem_util/call_rcu.data: -------------------------------------------------------------------------------- 1 | [group] 2 | # Name and return type of the target function 3 | function.name = call_rcu 4 | 5 | # Names and types of the arguments of the target function 6 | arg.type = struct rcu_head * 7 | arg.name = head 8 | 9 | arg.type = kedr_rcu_callback_type 10 | arg.name = func 11 | ####################################################################### 12 | -------------------------------------------------------------------------------- /sources/functions/mem_util/call_rcu_sched.data: -------------------------------------------------------------------------------- 1 | [group] 2 | # Name and return type of the target function 3 | function.name = call_rcu_sched 4 | 5 | # Names and types of the arguments of the target function 6 | arg.type = struct rcu_head * 7 | arg.name = head 8 | 9 | arg.type = kedr_rcu_callback_type 10 | arg.name = func 11 | ####################################################################### 12 | -------------------------------------------------------------------------------- /sources/functions/mem_util/kfree_call_rcu.data: -------------------------------------------------------------------------------- 1 | [group] 2 | # Name and return type of the target function 3 | function.name = kfree_call_rcu 4 | 5 | # Names and types of the arguments of the target function 6 | arg.type = struct rcu_head * 7 | arg.name = head 8 | 9 | arg.type = kedr_rcu_callback_type 10 | arg.name = func 11 | ####################################################################### 12 | -------------------------------------------------------------------------------- /sources/functions/mem_util/kmemdup.data: -------------------------------------------------------------------------------- 1 | [group] 2 | # Name and return type of the target function 3 | function.name = kmemdup 4 | returnType = void * 5 | 6 | # Names and types of the arguments of the target function 7 | arg.type = const void * 8 | arg.name = src 9 | 10 | arg.type = size_t 11 | arg.name = len 12 | 13 | arg.type = gfp_t 14 | arg.name = flags 15 | ####################################################################### 16 | -------------------------------------------------------------------------------- /sources/functions/mem_util/kstrdup.data: -------------------------------------------------------------------------------- 1 | [group] 2 | # Name and return type of the target function 3 | function.name = kstrdup 4 | returnType = char * 5 | 6 | # Names and types of the arguments of the target function 7 | arg.type = const char * 8 | arg.name = s 9 | 10 | arg.type = gfp_t 11 | arg.name = flags 12 | ####################################################################### 13 | -------------------------------------------------------------------------------- /sources/functions/mem_util/kstrndup.data: -------------------------------------------------------------------------------- 1 | [group] 2 | # Name and return type of the target function 3 | function.name = kstrndup 4 | returnType = char * 5 | 6 | # Names and types of the arguments of the target function 7 | arg.type = const char * 8 | arg.name = s 9 | 10 | arg.type = size_t 11 | arg.name = max 12 | 13 | arg.type = gfp_t 14 | arg.name = flags 15 | ####################################################################### 16 | -------------------------------------------------------------------------------- /sources/functions/mem_util/match_strdup.data: -------------------------------------------------------------------------------- 1 | [group] 2 | # Name and return type of the target function 3 | function.name = match_strdup 4 | returnType = char * 5 | 6 | # Names and types of the arguments of the target function 7 | arg.type = const substring_t * 8 | arg.name = s 9 | ####################################################################### 10 | -------------------------------------------------------------------------------- /sources/functions/mem_util/posix_acl_alloc.data: -------------------------------------------------------------------------------- 1 | [group] 2 | # Name and return type of the target function 3 | function.name = posix_acl_alloc 4 | returnType = struct posix_acl * 5 | 6 | # Names and types of the arguments of the target function 7 | arg.type = int 8 | arg.name = count 9 | 10 | arg.type = gfp_t 11 | arg.name = flags 12 | ####################################################################### 13 | -------------------------------------------------------------------------------- /sources/functions/mem_util/posix_acl_chmod.data: -------------------------------------------------------------------------------- 1 | [group] 2 | # Name and return type of the target function 3 | function.name = posix_acl_chmod 4 | returnType = int 5 | 6 | # Names and types of the arguments of the target function 7 | arg.type = struct posix_acl ** 8 | arg.name = acl 9 | 10 | arg.type = gfp_t 11 | arg.name = gfp 12 | 13 | arg.type = umode_t 14 | arg.name = mode 15 | ####################################################################### 16 | -------------------------------------------------------------------------------- /sources/functions/mem_util/posix_acl_clone.data: -------------------------------------------------------------------------------- 1 | [group] 2 | # Name and return type of the target function 3 | function.name = posix_acl_clone 4 | returnType = struct posix_acl * 5 | 6 | # Names and types of the arguments of the target function 7 | arg.type = const struct posix_acl * 8 | arg.name = acl 9 | 10 | arg.type = gfp_t 11 | arg.name = flags 12 | ####################################################################### 13 | -------------------------------------------------------------------------------- /sources/functions/mem_util/posix_acl_from_mode.data: -------------------------------------------------------------------------------- 1 | [group] 2 | # Name and return type of the target function 3 | function.name = posix_acl_from_mode 4 | returnType = struct posix_acl * 5 | 6 | # Names and types of the arguments of the target function 7 | arg.type = mode_t 8 | arg.name = mode 9 | 10 | arg.type = gfp_t 11 | arg.name = flags 12 | ####################################################################### 13 | -------------------------------------------------------------------------------- /sources/functions/mutexes/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | func_db_configure_functions ( 2 | "__mutex_init" 3 | "mutex_lock" 4 | "mutex_lock_interruptible" 5 | "mutex_lock_killable" 6 | "mutex_trylock" 7 | "mutex_unlock" 8 | ) 9 | 10 | # [NB] If CONFIG_DEBUG_LOCK_ALLOC is defined in the kernel configuration, 11 | # *_nested functions may be used instead of mutex_lock, etc. 12 | -------------------------------------------------------------------------------- /sources/functions/mutexes/__mutex_init.data: -------------------------------------------------------------------------------- 1 | [group] 2 | # Name and return type of the target function 3 | function.name = __mutex_init 4 | 5 | # Names and types of the arguments of the target function 6 | arg.type = struct mutex* 7 | arg.name = lock 8 | 9 | arg.type = const char* 10 | arg.name = name 11 | 12 | arg.type = struct lock_class_key* 13 | arg.name = key 14 | ####################################################################### 15 | -------------------------------------------------------------------------------- /sources/functions/mutexes/header.data: -------------------------------------------------------------------------------- 1 | header =>> 2 | #include 3 | << 4 | -------------------------------------------------------------------------------- /sources/functions/mutexes/mutex_lock.data: -------------------------------------------------------------------------------- 1 | [group] 2 | # Name and return type of the target function 3 | function.name = mutex_lock 4 | 5 | # Names and types of the arguments of the target function 6 | arg.type = struct mutex* 7 | arg.name = lock 8 | ####################################################################### 9 | -------------------------------------------------------------------------------- /sources/functions/mutexes/mutex_lock_interruptible.data: -------------------------------------------------------------------------------- 1 | [group] 2 | # Name and return type of the target function 3 | function.name = mutex_lock_interruptible 4 | returnType = int 5 | 6 | # Names and types of the arguments of the target function 7 | arg.type = struct mutex* 8 | arg.name = lock 9 | ####################################################################### 10 | -------------------------------------------------------------------------------- /sources/functions/mutexes/mutex_lock_killable.data: -------------------------------------------------------------------------------- 1 | [group] 2 | # Name and return type of the target function 3 | function.name = mutex_lock_killable 4 | returnType = int 5 | 6 | # Names and types of the arguments of the target function 7 | arg.type = struct mutex* 8 | arg.name = lock 9 | ####################################################################### 10 | -------------------------------------------------------------------------------- /sources/functions/mutexes/mutex_trylock.data: -------------------------------------------------------------------------------- 1 | [group] 2 | # Name and return type of the target function 3 | function.name = mutex_trylock 4 | returnType = int 5 | 6 | # Names and types of the arguments of the target function 7 | arg.type = struct mutex* 8 | arg.name = lock 9 | ####################################################################### 10 | -------------------------------------------------------------------------------- /sources/functions/mutexes/mutex_unlock.data: -------------------------------------------------------------------------------- 1 | [group] 2 | # Name and return type of the target function 3 | function.name = mutex_unlock 4 | 5 | # Names and types of the arguments of the target function 6 | arg.type = struct mutex* 7 | arg.name = lock 8 | ####################################################################### 9 | -------------------------------------------------------------------------------- /sources/functions/schedule/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | func_db_configure_functions ( 2 | "schedule" 3 | "preempt_schedule" 4 | "_cond_resched" 5 | "schedule_timeout" 6 | "schedule_timeout_uninterruptible" 7 | "schedule_timeout_interruptible" 8 | "io_schedule" 9 | "cond_resched_lock" 10 | "__cond_resched_lock" 11 | ) 12 | 13 | -------------------------------------------------------------------------------- /sources/functions/schedule/__cond_resched_lock.data: -------------------------------------------------------------------------------- 1 | [group] 2 | # Name and return type of the target function 3 | function.name = __cond_resched_lock 4 | returnType = int 5 | 6 | # Names and types of the arguments of the target function 7 | arg.type = spinlock_t * 8 | arg.name = lock 9 | ####################################################################### 10 | -------------------------------------------------------------------------------- /sources/functions/schedule/_cond_resched.data: -------------------------------------------------------------------------------- 1 | [group] 2 | # Name and return type of the target function 3 | function.name = _cond_resched 4 | returnType = int 5 | ####################################################################### 6 | -------------------------------------------------------------------------------- /sources/functions/schedule/cond_resched_lock.data: -------------------------------------------------------------------------------- 1 | [group] 2 | # Name and return type of the target function 3 | function.name = cond_resched_lock 4 | returnType = int 5 | 6 | # Names and types of the arguments of the target function 7 | arg.type = spinlock_t * 8 | arg.name = lock 9 | ####################################################################### 10 | -------------------------------------------------------------------------------- /sources/functions/schedule/header.data: -------------------------------------------------------------------------------- 1 | header =>> 2 | #include /* schedule-related functions */ 3 | << 4 | -------------------------------------------------------------------------------- /sources/functions/schedule/io_schedule.data: -------------------------------------------------------------------------------- 1 | [group] 2 | # Name and return type of the target function 3 | function.name = io_schedule 4 | ####################################################################### 5 | -------------------------------------------------------------------------------- /sources/functions/schedule/preempt_schedule.data: -------------------------------------------------------------------------------- 1 | [group] 2 | # Name and return type of the target function 3 | function.name = preempt_schedule 4 | ####################################################################### 5 | -------------------------------------------------------------------------------- /sources/functions/schedule/schedule.data: -------------------------------------------------------------------------------- 1 | [group] 2 | # Name and return type of the target function 3 | function.name = schedule 4 | ####################################################################### 5 | -------------------------------------------------------------------------------- /sources/functions/schedule/schedule_timeout.data: -------------------------------------------------------------------------------- 1 | [group] 2 | # Name and return type of the target function 3 | function.name = schedule_timeout 4 | returnType = signed long 5 | 6 | # Names and types of the arguments of the target function 7 | arg.type = signed long 8 | arg.name = timeout 9 | ####################################################################### 10 | -------------------------------------------------------------------------------- /sources/functions/schedule/schedule_timeout_interruptible.data: -------------------------------------------------------------------------------- 1 | [group] 2 | # Name and return type of the target function 3 | function.name = schedule_timeout_interruptible 4 | returnType = signed long 5 | 6 | # Names and types of the arguments of the target function 7 | arg.type = signed long 8 | arg.name = timeout 9 | ####################################################################### 10 | -------------------------------------------------------------------------------- /sources/functions/schedule/schedule_timeout_uninterruptible.data: -------------------------------------------------------------------------------- 1 | [group] 2 | # Name and return type of the target function 3 | function.name = schedule_timeout_uninterruptible 4 | returnType = signed long 5 | 6 | # Names and types of the arguments of the target function 7 | arg.type = signed long 8 | arg.name = timeout 9 | ####################################################################### 10 | -------------------------------------------------------------------------------- /sources/functions/spinlocks/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | func_db_configure_functions ( 2 | "_spin_lock" 3 | "_raw_spin_lock" 4 | "_spin_lock_irq" 5 | "_raw_spin_lock_irq" 6 | "_spin_lock_irqsave" 7 | "_raw_spin_lock_irqsave" 8 | "_spin_unlock" 9 | "_raw_spin_unlock" 10 | "_spin_unlock_irq" 11 | "_raw_spin_unlock_irq" 12 | "_spin_unlock_irqrestore" 13 | "_raw_spin_unlock_irqrestore" 14 | ) 15 | 16 | -------------------------------------------------------------------------------- /sources/functions/spinlocks/_raw_spin_lock.data: -------------------------------------------------------------------------------- 1 | [group] 2 | # Name and return type of the target function 3 | function.name = _raw_spin_lock 4 | 5 | # Names and types of the arguments of the target function 6 | arg.type = raw_spinlock_t * 7 | arg.name = lock 8 | ####################################################################### 9 | -------------------------------------------------------------------------------- /sources/functions/spinlocks/_raw_spin_lock_irq.data: -------------------------------------------------------------------------------- 1 | [group] 2 | # Name and return type of the target function 3 | function.name = _raw_spin_lock_irq 4 | 5 | # Names and types of the arguments of the target function 6 | arg.type = raw_spinlock_t * 7 | arg.name = lock 8 | ####################################################################### 9 | -------------------------------------------------------------------------------- /sources/functions/spinlocks/_raw_spin_lock_irqsave.data: -------------------------------------------------------------------------------- 1 | [group] 2 | # Name and return type of the target function 3 | function.name = _raw_spin_lock_irqsave 4 | returnType = unsigned long 5 | 6 | # Names and types of the arguments of the target function 7 | arg.type = raw_spinlock_t * 8 | arg.name = lock 9 | ####################################################################### 10 | -------------------------------------------------------------------------------- /sources/functions/spinlocks/_raw_spin_unlock.data: -------------------------------------------------------------------------------- 1 | [group] 2 | # Name and return type of the target function 3 | function.name = _raw_spin_unlock 4 | 5 | # Names and types of the arguments of the target function 6 | arg.type = raw_spinlock_t * 7 | arg.name = lock 8 | ####################################################################### 9 | -------------------------------------------------------------------------------- /sources/functions/spinlocks/_raw_spin_unlock_irq.data: -------------------------------------------------------------------------------- 1 | [group] 2 | # Name and return type of the target function 3 | function.name = _raw_spin_unlock_irq 4 | 5 | # Names and types of the arguments of the target function 6 | arg.type = raw_spinlock_t * 7 | arg.name = lock 8 | ####################################################################### 9 | -------------------------------------------------------------------------------- /sources/functions/spinlocks/_raw_spin_unlock_irqrestore.data: -------------------------------------------------------------------------------- 1 | [group] 2 | # Name and return type of the target function 3 | function.name = _raw_spin_unlock_irqrestore 4 | 5 | # Names and types of the arguments of the target function 6 | arg.type = raw_spinlock_t * 7 | arg.name = lock 8 | 9 | arg.type = unsigned long 10 | arg.name = flags 11 | ####################################################################### 12 | -------------------------------------------------------------------------------- /sources/functions/spinlocks/_spin_lock.data: -------------------------------------------------------------------------------- 1 | [group] 2 | # Name and return type of the target function 3 | function.name = _spin_lock 4 | 5 | # Names and types of the arguments of the target function 6 | arg.type = spinlock_t * 7 | arg.name = lock 8 | ####################################################################### 9 | -------------------------------------------------------------------------------- /sources/functions/spinlocks/_spin_lock_irq.data: -------------------------------------------------------------------------------- 1 | [group] 2 | # Name and return type of the target function 3 | function.name = _spin_lock_irq 4 | 5 | # Names and types of the arguments of the target function 6 | arg.type = spinlock_t * 7 | arg.name = lock 8 | ####################################################################### 9 | -------------------------------------------------------------------------------- /sources/functions/spinlocks/_spin_lock_irqsave.data: -------------------------------------------------------------------------------- 1 | [group] 2 | # Name and return type of the target function 3 | function.name = _spin_lock_irqsave 4 | returnType = unsigned long 5 | 6 | # Names and types of the arguments of the target function 7 | arg.type = spinlock_t * 8 | arg.name = lock 9 | ####################################################################### 10 | -------------------------------------------------------------------------------- /sources/functions/spinlocks/_spin_unlock.data: -------------------------------------------------------------------------------- 1 | [group] 2 | # Name and return type of the target function 3 | function.name = _spin_unlock 4 | 5 | # Names and types of the arguments of the target function 6 | arg.type = spinlock_t * 7 | arg.name = lock 8 | ####################################################################### 9 | -------------------------------------------------------------------------------- /sources/functions/spinlocks/_spin_unlock_irq.data: -------------------------------------------------------------------------------- 1 | [group] 2 | # Name and return type of the target function 3 | function.name = _spin_unlock_irq 4 | 5 | # Names and types of the arguments of the target function 6 | arg.type = spinlock_t * 7 | arg.name = lock 8 | ####################################################################### 9 | -------------------------------------------------------------------------------- /sources/functions/spinlocks/_spin_unlock_irqrestore.data: -------------------------------------------------------------------------------- 1 | [group] 2 | # Name and return type of the target function 3 | function.name = _spin_unlock_irqrestore 4 | 5 | # Names and types of the arguments of the target function 6 | arg.type = spinlock_t * 7 | arg.name = lock 8 | 9 | arg.type = unsigned long 10 | arg.name = flags 11 | ####################################################################### 12 | -------------------------------------------------------------------------------- /sources/functions/spinlocks/header.data: -------------------------------------------------------------------------------- 1 | header =>> 2 | #include 3 | << 4 | -------------------------------------------------------------------------------- /sources/functions/uaccess/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | func_db_configure_functions ( 2 | "copy_to_user" 3 | "_copy_to_user" 4 | "copy_from_user" 5 | "_copy_from_user" 6 | "strndup_user" 7 | "memdup_user" 8 | ) 9 | 10 | -------------------------------------------------------------------------------- /sources/functions/uaccess/copy_to_user.data: -------------------------------------------------------------------------------- 1 | [group] 2 | # Name and return type of the target function 3 | function.name = copy_to_user 4 | returnType = unsigned long 5 | 6 | # Names and types of the arguments of the target function 7 | arg.type = void __user * 8 | arg.name = to 9 | 10 | arg.type = void * 11 | arg.name = from 12 | 13 | arg.type = unsigned long 14 | arg.name = n 15 | ####################################################################### 16 | -------------------------------------------------------------------------------- /sources/functions/uaccess/header.data: -------------------------------------------------------------------------------- 1 | header =>> 2 | #include /* user space access functions */ 3 | #include /* *dup_user() */ 4 | #include 5 | << 6 | -------------------------------------------------------------------------------- /sources/functions/uaccess/memdup_user.data: -------------------------------------------------------------------------------- 1 | [group] 2 | # Name and return type of the target function 3 | function.name = memdup_user 4 | returnType = void * 5 | 6 | # Names and types of the arguments of the target function 7 | arg.type = const void __user * 8 | arg.name = src 9 | 10 | arg.type = size_t 11 | arg.name = len 12 | ####################################################################### 13 | -------------------------------------------------------------------------------- /sources/functions/uaccess/strndup_user.data: -------------------------------------------------------------------------------- 1 | [group] 2 | # Name and return type of the target function 3 | function.name = strndup_user 4 | returnType = char * 5 | 6 | # Names and types of the arguments of the target function 7 | arg.type = const char __user * 8 | arg.name = src 9 | 10 | arg.type = long 11 | arg.name = n 12 | ####################################################################### 13 | -------------------------------------------------------------------------------- /sources/functions/virtual_mm/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | func_db_configure_functions ( 2 | "vmalloc" 3 | "__vmalloc" 4 | "vmalloc_user" 5 | "vmalloc_node" 6 | "vmalloc_32" 7 | "vmalloc_32_user" 8 | "vfree" 9 | "vzalloc" 10 | "vzalloc_node" 11 | ) 12 | -------------------------------------------------------------------------------- /sources/functions/virtual_mm/__vmalloc.data: -------------------------------------------------------------------------------- 1 | [group] 2 | # Name and return type of the target function 3 | function.name = __vmalloc 4 | returnType = void * 5 | 6 | # Names and types of the arguments of the target function 7 | arg.type = unsigned long 8 | arg.name = size 9 | 10 | arg.type = gfp_t 11 | arg.name = gfp_mask 12 | 13 | arg.type = pgprot_t 14 | arg.name = prot 15 | ####################################################################### 16 | -------------------------------------------------------------------------------- /sources/functions/virtual_mm/header.data: -------------------------------------------------------------------------------- 1 | header =>> 2 | #include /* vmalloc() and related functions */ 3 | << 4 | -------------------------------------------------------------------------------- /sources/functions/virtual_mm/vfree.data: -------------------------------------------------------------------------------- 1 | [group] 2 | # Name and return type of the target function 3 | function.name = vfree 4 | 5 | # Names and types of the arguments of the target function 6 | arg.type = const void * 7 | arg.name = addr 8 | ####################################################################### 9 | -------------------------------------------------------------------------------- /sources/functions/virtual_mm/vmalloc.data: -------------------------------------------------------------------------------- 1 | [group] 2 | # Name and return type of the target function 3 | function.name = vmalloc 4 | returnType = void * 5 | 6 | # Names and types of the arguments of the target function 7 | arg.type = unsigned long 8 | arg.name = size 9 | ####################################################################### 10 | -------------------------------------------------------------------------------- /sources/functions/virtual_mm/vmalloc_32.data: -------------------------------------------------------------------------------- 1 | [group] 2 | # Name and return type of the target function 3 | function.name = vmalloc_32 4 | returnType = void * 5 | 6 | # Names and types of the arguments of the target function 7 | arg.type = unsigned long 8 | arg.name = size 9 | ####################################################################### 10 | -------------------------------------------------------------------------------- /sources/functions/virtual_mm/vmalloc_32_user.data: -------------------------------------------------------------------------------- 1 | [group] 2 | # Name and return type of the target function 3 | function.name = vmalloc_32_user 4 | returnType = void * 5 | 6 | # Names and types of the arguments of the target function 7 | arg.type = unsigned long 8 | arg.name = size 9 | ####################################################################### 10 | -------------------------------------------------------------------------------- /sources/functions/virtual_mm/vmalloc_node.data: -------------------------------------------------------------------------------- 1 | [group] 2 | # Name and return type of the target function 3 | function.name = vmalloc_node 4 | returnType = void * 5 | 6 | # Names and types of the arguments of the target function 7 | arg.type = unsigned long 8 | arg.name = size 9 | 10 | arg.type = int 11 | arg.name = node 12 | ####################################################################### 13 | -------------------------------------------------------------------------------- /sources/functions/virtual_mm/vmalloc_user.data: -------------------------------------------------------------------------------- 1 | [group] 2 | # Name and return type of the target function 3 | function.name = vmalloc_user 4 | returnType = void * 5 | 6 | # Names and types of the arguments of the target function 7 | arg.type = unsigned long 8 | arg.name = size 9 | ####################################################################### 10 | -------------------------------------------------------------------------------- /sources/functions/virtual_mm/vzalloc.data: -------------------------------------------------------------------------------- 1 | [group] 2 | # Name and return type of the target function 3 | function.name = vzalloc 4 | returnType = void * 5 | 6 | # Names and types of the arguments of the target function 7 | arg.type = unsigned long 8 | arg.name = size 9 | ####################################################################### 10 | -------------------------------------------------------------------------------- /sources/functions/virtual_mm/vzalloc_node.data: -------------------------------------------------------------------------------- 1 | [group] 2 | # Name and return type of the target function 3 | function.name = vzalloc_node 4 | returnType = void * 5 | 6 | # Names and types of the arguments of the target function 7 | arg.type = unsigned long 8 | arg.name = size 9 | 10 | arg.type = int 11 | arg.name = node 12 | ####################################################################### 13 | -------------------------------------------------------------------------------- /sources/functions/waitqueue/__init_waitqueue_head.old.data: -------------------------------------------------------------------------------- 1 | [group] 2 | # Name and return type of the target function 3 | function.name = __init_waitqueue_head 4 | 5 | # Names and types of the arguments of the target function 6 | arg.type = wait_queue_head_t * 7 | arg.name = q 8 | 9 | arg.type = struct lock_class_key * 10 | arg.name = key 11 | ####################################################################### 12 | -------------------------------------------------------------------------------- /sources/functions/waitqueue/add_wait_queue.data: -------------------------------------------------------------------------------- 1 | [group] 2 | # Name and return type of the target function 3 | function.name = add_wait_queue 4 | 5 | # Names and types of the arguments of the target function 6 | arg.type = wait_queue_head_t * 7 | arg.name = q 8 | 9 | arg.type = wait_queue_t * 10 | arg.name = wait 11 | ####################################################################### 12 | -------------------------------------------------------------------------------- /sources/functions/waitqueue/add_wait_queue_exclusive.data: -------------------------------------------------------------------------------- 1 | [group] 2 | # Name and return type of the target function 3 | function.name = add_wait_queue_exclusive 4 | 5 | # Names and types of the arguments of the target function 6 | arg.type = wait_queue_head_t * 7 | arg.name = q 8 | 9 | arg.type = wait_queue_t * 10 | arg.name = wait 11 | ####################################################################### 12 | -------------------------------------------------------------------------------- /sources/functions/waitqueue/finish_wait.data: -------------------------------------------------------------------------------- 1 | [group] 2 | # Name and return type of the target function 3 | function.name = finish_wait 4 | 5 | # Names and types of the arguments of the target function 6 | arg.type = wait_queue_head_t * 7 | arg.name = q 8 | 9 | arg.type = wait_queue_t * 10 | arg.name = wait 11 | ####################################################################### 12 | -------------------------------------------------------------------------------- /sources/functions/waitqueue/header.data: -------------------------------------------------------------------------------- 1 | header =>> 2 | #include /* wait-related functions */ 3 | << 4 | -------------------------------------------------------------------------------- /sources/functions/waitqueue/init_waitqueue_head.data: -------------------------------------------------------------------------------- 1 | [group] 2 | # Name and return type of the target function 3 | function.name = init_waitqueue_head 4 | 5 | # Names and types of the arguments of the target function 6 | arg.type = wait_queue_head_t * 7 | arg.name = q 8 | ####################################################################### 9 | -------------------------------------------------------------------------------- /sources/functions/waitqueue/prepare_to_wait.data: -------------------------------------------------------------------------------- 1 | [group] 2 | # Name and return type of the target function 3 | function.name = prepare_to_wait 4 | 5 | # Names and types of the arguments of the target function 6 | arg.type = wait_queue_head_t * 7 | arg.name = q 8 | 9 | arg.type = wait_queue_t * 10 | arg.name = wait 11 | 12 | arg.type = int 13 | arg.name = state 14 | ####################################################################### 15 | -------------------------------------------------------------------------------- /sources/functions/waitqueue/remove_wait_queue.data: -------------------------------------------------------------------------------- 1 | [group] 2 | # Name and return type of the target function 3 | function.name = remove_wait_queue 4 | 5 | # Names and types of the arguments of the target function 6 | arg.type = wait_queue_head_t * 7 | arg.name = q 8 | 9 | arg.type = wait_queue_t * 10 | arg.name = wait 11 | ####################################################################### 12 | -------------------------------------------------------------------------------- /sources/include/kedr/defs.h.in: -------------------------------------------------------------------------------- 1 | #ifndef KEDR_DEFS_H 2 | #define KEDR_DEFS_H 3 | 4 | /* 5 | * Definitions for KEDR. 6 | */ 7 | #cmakedefine KEDR_ENABLE_CALLER_ADDRESS 8 | 9 | #endif -------------------------------------------------------------------------------- /sources/leak_check/common_mm/__alloc_pages_nodemask.data: -------------------------------------------------------------------------------- 1 | [group] 2 | # The body of the replacement function 3 | handler.post =>> 4 | struct page *page = ret_val; 5 | if (page != NULL) { 6 | const void *p = (const void *)page_address(page); 7 | if (p != NULL) 8 | kedr_lc_handle_alloc(p, 9 | (size_t)(PAGE_SIZE << order), 10 | caller_address); 11 | } 12 | << 13 | ####################################################################### 14 | -------------------------------------------------------------------------------- /sources/leak_check/common_mm/__get_free_pages.data: -------------------------------------------------------------------------------- 1 | [group] 2 | # The body of the replacement function 3 | handler.post =>> 4 | if ((void *)ret_val != NULL) { 5 | kedr_lc_handle_alloc((const void *)ret_val, 6 | (size_t)(PAGE_SIZE << order), caller_address); 7 | } 8 | << 9 | ####################################################################### 10 | -------------------------------------------------------------------------------- /sources/leak_check/common_mm/__kmalloc.data: -------------------------------------------------------------------------------- 1 | [group] 2 | # The body of the replacement function 3 | handler.post =>> 4 | if (!ZERO_OR_NULL_PTR(ret_val)) 5 | kedr_lc_handle_alloc(ret_val, size, 6 | caller_address); 7 | << 8 | ####################################################################### 9 | -------------------------------------------------------------------------------- /sources/leak_check/common_mm/__kmalloc_node.data: -------------------------------------------------------------------------------- 1 | [group] 2 | # The body of the replacement function 3 | handler.post =>> 4 | if (!ZERO_OR_NULL_PTR(ret_val)) 5 | kedr_lc_handle_alloc(ret_val, size, 6 | caller_address); 7 | << 8 | ####################################################################### 9 | -------------------------------------------------------------------------------- /sources/leak_check/common_mm/__page_cache_alloc.data: -------------------------------------------------------------------------------- 1 | [group] 2 | # The body of the replacement function 3 | handler.post =>> 4 | struct page *page = ret_val; 5 | if (page != NULL) { 6 | const void *p = (const void *)page_address(page); 7 | if (p != NULL) 8 | kedr_lc_handle_alloc(p, 9 | (size_t)(PAGE_SIZE), 10 | caller_address); 11 | } 12 | << 13 | ####################################################################### 14 | -------------------------------------------------------------------------------- /sources/leak_check/common_mm/__vmalloc.data: -------------------------------------------------------------------------------- 1 | [group] 2 | # The body of the replacement function 3 | handler.post =>> 4 | if (ret_val != NULL) 5 | kedr_lc_handle_alloc(ret_val, size, 6 | caller_address); 7 | << 8 | ####################################################################### 9 | -------------------------------------------------------------------------------- /sources/leak_check/common_mm/alloc_pages_current.data: -------------------------------------------------------------------------------- 1 | [group] 2 | # The body of the handler 3 | handler.post =>> 4 | struct page *page = ret_val; 5 | 6 | if (page != NULL) { 7 | const void *p = (const void *)page_address(page); 8 | if (p != NULL) 9 | kedr_lc_handle_alloc(p, 10 | (size_t)(PAGE_SIZE << order), 11 | caller_address); 12 | } 13 | << 14 | ####################################################################### 15 | -------------------------------------------------------------------------------- /sources/leak_check/common_mm/alloc_pages_exact.data: -------------------------------------------------------------------------------- 1 | [group] 2 | # The body of the replacement function 3 | handler.post =>> 4 | if (!ZERO_OR_NULL_PTR(ret_val)) 5 | kedr_lc_handle_alloc(ret_val, size, 6 | caller_address); 7 | << 8 | ####################################################################### 9 | -------------------------------------------------------------------------------- /sources/leak_check/common_mm/alloc_pages_exact_nid.data: -------------------------------------------------------------------------------- 1 | [group] 2 | # The body of the replacement function 3 | handler.post =>> 4 | if (!ZERO_OR_NULL_PTR(ret_val)) 5 | kedr_lc_handle_alloc(ret_val, size, 6 | caller_address); 7 | << 8 | ####################################################################### 9 | -------------------------------------------------------------------------------- /sources/leak_check/common_mm/free_pages.data: -------------------------------------------------------------------------------- 1 | [group] 2 | # The body of the replacement function 3 | handler.pre =>> 4 | void *p = (void *)addr; 5 | if (!ZERO_OR_NULL_PTR(p)) 6 | kedr_lc_handle_free(p, caller_address); 7 | << 8 | ####################################################################### 9 | -------------------------------------------------------------------------------- /sources/leak_check/common_mm/free_pages_exact.data: -------------------------------------------------------------------------------- 1 | [group] 2 | # The body of the replacement function 3 | handler.pre =>> 4 | if (!ZERO_OR_NULL_PTR(virt)) 5 | kedr_lc_handle_free(virt, 6 | caller_address); 7 | << 8 | ####################################################################### 9 | -------------------------------------------------------------------------------- /sources/leak_check/common_mm/get_zeroed_page.data: -------------------------------------------------------------------------------- 1 | [group] 2 | # The body of the replacement function 3 | handler.post =>> 4 | if ((void *)ret_val != NULL) { 5 | kedr_lc_handle_alloc( 6 | (const void *)ret_val, (size_t)PAGE_SIZE, 7 | caller_address); 8 | } 9 | << 10 | ####################################################################### 11 | -------------------------------------------------------------------------------- /sources/leak_check/common_mm/ioremap_cache.data: -------------------------------------------------------------------------------- 1 | [group] 2 | # The body of the replacement function 3 | handler.post =>> 4 | if (!ZERO_OR_NULL_PTR(ret_val)) 5 | kedr_lc_handle_alloc(ret_val, size, 6 | caller_address); 7 | << 8 | ####################################################################### 9 | -------------------------------------------------------------------------------- /sources/leak_check/common_mm/ioremap_nocache.data: -------------------------------------------------------------------------------- 1 | [group] 2 | # The body of the replacement function 3 | handler.post =>> 4 | if (!ZERO_OR_NULL_PTR(ret_val)) 5 | kedr_lc_handle_alloc(ret_val, size, 6 | caller_address); 7 | << 8 | ####################################################################### 9 | -------------------------------------------------------------------------------- /sources/leak_check/common_mm/ioremap_prot.data: -------------------------------------------------------------------------------- 1 | [group] 2 | # The body of the replacement function 3 | handler.post =>> 4 | if (!ZERO_OR_NULL_PTR(ret_val)) 5 | kedr_lc_handle_alloc(ret_val, size, 6 | caller_address); 7 | << 8 | ####################################################################### 9 | -------------------------------------------------------------------------------- /sources/leak_check/common_mm/ioremap_uc.data: -------------------------------------------------------------------------------- 1 | [group] 2 | # The body of the replacement function 3 | handler.post =>> 4 | if (!ZERO_OR_NULL_PTR(ret_val)) 5 | kedr_lc_handle_alloc(ret_val, size, 6 | caller_address); 7 | << 8 | ####################################################################### 9 | -------------------------------------------------------------------------------- /sources/leak_check/common_mm/ioremap_wc.data: -------------------------------------------------------------------------------- 1 | [group] 2 | # The body of the replacement function 3 | handler.post =>> 4 | if (!ZERO_OR_NULL_PTR(ret_val)) 5 | kedr_lc_handle_alloc(ret_val, size, 6 | caller_address); 7 | << 8 | ####################################################################### 9 | -------------------------------------------------------------------------------- /sources/leak_check/common_mm/ioremap_wt.data: -------------------------------------------------------------------------------- 1 | [group] 2 | # The body of the replacement function 3 | handler.post =>> 4 | if (!ZERO_OR_NULL_PTR(ret_val)) 5 | kedr_lc_handle_alloc(ret_val, size, 6 | caller_address); 7 | << 8 | ####################################################################### 9 | -------------------------------------------------------------------------------- /sources/leak_check/common_mm/iounmap.data: -------------------------------------------------------------------------------- 1 | [group] 2 | # The body of the replacement function 3 | handler.pre =>> 4 | if (!ZERO_OR_NULL_PTR(addr)) 5 | kedr_lc_handle_free(addr, caller_address); 6 | << 7 | ####################################################################### 8 | -------------------------------------------------------------------------------- /sources/leak_check/common_mm/kasprintf.data: -------------------------------------------------------------------------------- 1 | [group] 2 | # The body of the replacement function 3 | handler.post =>> 4 | if (ret_val != NULL) 5 | kedr_lc_handle_alloc((void *)ret_val, 6 | strlen(ret_val) + 1, caller_address); 7 | << 8 | ####################################################################### 9 | -------------------------------------------------------------------------------- /sources/leak_check/common_mm/kfree.data: -------------------------------------------------------------------------------- 1 | [group] 2 | # The body of the replacement function 3 | handler.pre =>> 4 | if (!ZERO_OR_NULL_PTR(p)) 5 | kedr_lc_handle_free(p, caller_address); 6 | << 7 | ####################################################################### 8 | -------------------------------------------------------------------------------- /sources/leak_check/common_mm/kmalloc_order_trace.data: -------------------------------------------------------------------------------- 1 | [group] 2 | # The body of the replacement function 3 | handler.post =>> 4 | if (!ZERO_OR_NULL_PTR(ret_val)) { 5 | kedr_lc_handle_alloc(ret_val, 6 | (size_t)(PAGE_SIZE << order), 7 | caller_address); 8 | } 9 | << 10 | ####################################################################### 11 | -------------------------------------------------------------------------------- /sources/leak_check/common_mm/kmem_cache_alloc.data: -------------------------------------------------------------------------------- 1 | [group] 2 | # The body of the replacement function 3 | handler.post =>> 4 | if (ret_val != NULL) 5 | kedr_lc_handle_alloc(ret_val, 6 | (size_t)kmem_cache_size(mc), 7 | caller_address); 8 | << 9 | ####################################################################### 10 | -------------------------------------------------------------------------------- /sources/leak_check/common_mm/kmem_cache_alloc_node.data: -------------------------------------------------------------------------------- 1 | [group] 2 | # The body of the replacement function 3 | handler.post =>> 4 | if (ret_val != NULL) 5 | kedr_lc_handle_alloc(ret_val, 6 | (size_t)kmem_cache_size(mc), 7 | caller_address); 8 | << 9 | ####################################################################### 10 | -------------------------------------------------------------------------------- /sources/leak_check/common_mm/kmem_cache_alloc_node_notrace.data: -------------------------------------------------------------------------------- 1 | [group] 2 | # The body of the replacement function 3 | handler.post =>> 4 | if (ret_val != NULL) 5 | kedr_lc_handle_alloc(ret_val, 6 | (size_t)kmem_cache_size(mc), 7 | caller_address); 8 | << 9 | ####################################################################### 10 | -------------------------------------------------------------------------------- /sources/leak_check/common_mm/kmem_cache_alloc_node_trace.data: -------------------------------------------------------------------------------- 1 | [group] 2 | # The body of the replacement function 3 | handler.post =>> 4 | if (ret_val != NULL) 5 | kedr_lc_handle_alloc(ret_val, 6 | (size_t)kmem_cache_size(mc), 7 | caller_address); 8 | << 9 | ####################################################################### 10 | -------------------------------------------------------------------------------- /sources/leak_check/common_mm/kmem_cache_alloc_notrace.data: -------------------------------------------------------------------------------- 1 | [group] 2 | # The body of the replacement function 3 | handler.post =>> 4 | if (ret_val != NULL) 5 | kedr_lc_handle_alloc(ret_val, 6 | (size_t)kmem_cache_size(mc), 7 | caller_address); 8 | << 9 | ####################################################################### 10 | -------------------------------------------------------------------------------- /sources/leak_check/common_mm/kmem_cache_alloc_trace.data: -------------------------------------------------------------------------------- 1 | [group] 2 | # The body of the replacement function 3 | handler.post =>> 4 | if (ret_val != NULL) 5 | kedr_lc_handle_alloc(ret_val, 6 | (size_t)kmem_cache_size(mc), 7 | caller_address); 8 | << 9 | ####################################################################### 10 | -------------------------------------------------------------------------------- /sources/leak_check/common_mm/kmem_cache_free.data: -------------------------------------------------------------------------------- 1 | [group] 2 | # The body of the replacement function 3 | handler.pre =>> 4 | if (!ZERO_OR_NULL_PTR(p)) 5 | kedr_lc_handle_free(p, caller_address); 6 | << 7 | ####################################################################### 8 | -------------------------------------------------------------------------------- /sources/leak_check/common_mm/kmemdup.data: -------------------------------------------------------------------------------- 1 | [group] 2 | # The body of the replacement function 3 | handler.post =>> 4 | if (!ZERO_OR_NULL_PTR(ret_val)) 5 | kedr_lc_handle_alloc(ret_val, len, 6 | caller_address); 7 | << 8 | ####################################################################### 9 | -------------------------------------------------------------------------------- /sources/leak_check/common_mm/kstrdup.data: -------------------------------------------------------------------------------- 1 | [group] 2 | # The body of the replacement function 3 | handler.post =>> 4 | if (ret_val != NULL) 5 | kedr_lc_handle_alloc((void *)ret_val, 6 | strlen(s) + 1, caller_address); 7 | << 8 | ####################################################################### 9 | -------------------------------------------------------------------------------- /sources/leak_check/common_mm/kstrndup.data: -------------------------------------------------------------------------------- 1 | [group] 2 | # The body of the replacement function 3 | handler.post =>> 4 | if (ret_val != NULL) 5 | kedr_lc_handle_alloc((void *)ret_val, 6 | strnlen(s, max) + 1, caller_address); 7 | << 8 | ####################################################################### 9 | -------------------------------------------------------------------------------- /sources/leak_check/common_mm/kvasprintf.data: -------------------------------------------------------------------------------- 1 | [group] 2 | # The body of the replacement function 3 | handler.post =>> 4 | if (ret_val != NULL) 5 | kedr_lc_handle_alloc((void *)ret_val, 6 | strlen(ret_val) + 1, caller_address); 7 | << 8 | ####################################################################### 9 | -------------------------------------------------------------------------------- /sources/leak_check/common_mm/kzfree.data: -------------------------------------------------------------------------------- 1 | [group] 2 | # The body of the replacement function 3 | handler.pre =>> 4 | if (!ZERO_OR_NULL_PTR(p)) 5 | kedr_lc_handle_free(p, caller_address); 6 | << 7 | ####################################################################### 8 | -------------------------------------------------------------------------------- /sources/leak_check/common_mm/match_strdup.data: -------------------------------------------------------------------------------- 1 | [group] 2 | # The body of the replacement function 3 | handler.post =>> 4 | if (ret_val != NULL) { 5 | size_t size = s->to - s->from + 1; 6 | kedr_lc_handle_alloc(ret_val, size, 7 | caller_address); 8 | } 9 | << 10 | ####################################################################### 11 | -------------------------------------------------------------------------------- /sources/leak_check/common_mm/memdup_user.data: -------------------------------------------------------------------------------- 1 | [group] 2 | # The body of the replacement function 3 | handler.post =>> 4 | if (!IS_ERR(ret_val)) 5 | kedr_lc_handle_alloc(ret_val, len, 6 | caller_address); 7 | << 8 | ####################################################################### 9 | -------------------------------------------------------------------------------- /sources/leak_check/common_mm/posix_acl_alloc.data: -------------------------------------------------------------------------------- 1 | [group] 2 | # The body of the replacement function 3 | handler.post =>> 4 | if (ret_val != NULL) { 5 | size_t size = sizeof(struct posix_acl) + 6 | (size_t)count * sizeof(struct posix_acl_entry); 7 | kedr_lc_handle_alloc(ret_val, size, 8 | caller_address); 9 | } 10 | << 11 | ####################################################################### 12 | -------------------------------------------------------------------------------- /sources/leak_check/common_mm/posix_acl_clone.data: -------------------------------------------------------------------------------- 1 | [group] 2 | # The body of the replacement function 3 | handler.post =>> 4 | if (ret_val != NULL) { 5 | size_t size = sizeof(struct posix_acl) + 6 | (size_t)acl->a_count * sizeof(struct posix_acl_entry); 7 | kedr_lc_handle_alloc(ret_val, size, 8 | caller_address); 9 | } 10 | << 11 | ####################################################################### 12 | -------------------------------------------------------------------------------- /sources/leak_check/common_mm/posix_acl_from_xattr.data: -------------------------------------------------------------------------------- 1 | [group] 2 | # The body of the replacement function 3 | handler.post =>> 4 | if (ret_val && !IS_ERR(ret_val)) { 5 | size_t acl_size = sizeof(struct posix_acl) + 6 | ret_val->a_count * sizeof(struct posix_acl_entry); 7 | kedr_lc_handle_alloc(ret_val, acl_size, 8 | caller_address); 9 | } 10 | << 11 | ####################################################################### 12 | -------------------------------------------------------------------------------- /sources/leak_check/common_mm/strndup_user.data: -------------------------------------------------------------------------------- 1 | [group] 2 | # The body of the replacement function 3 | handler.post =>> 4 | if (!IS_ERR(ret_val)) 5 | kedr_lc_handle_alloc((void *)ret_val, 6 | strnlen_user(src, n), caller_address); 7 | << 8 | ####################################################################### 9 | -------------------------------------------------------------------------------- /sources/leak_check/common_mm/vfree.data: -------------------------------------------------------------------------------- 1 | [group] 2 | # The body of the replacement function 3 | handler.pre =>> 4 | if (!ZERO_OR_NULL_PTR(addr)) 5 | kedr_lc_handle_free(addr, 6 | caller_address); 7 | << 8 | ####################################################################### 9 | -------------------------------------------------------------------------------- /sources/leak_check/common_mm/vmalloc.data: -------------------------------------------------------------------------------- 1 | [group] 2 | # The body of the replacement function 3 | handler.post =>> 4 | if (ret_val != NULL) 5 | kedr_lc_handle_alloc(ret_val, size, 6 | caller_address); 7 | << 8 | ####################################################################### 9 | -------------------------------------------------------------------------------- /sources/leak_check/common_mm/vmalloc_32.data: -------------------------------------------------------------------------------- 1 | [group] 2 | # The body of the replacement function 3 | handler.post =>> 4 | if (ret_val != NULL) 5 | kedr_lc_handle_alloc(ret_val, size, 6 | caller_address); 7 | << 8 | ####################################################################### 9 | -------------------------------------------------------------------------------- /sources/leak_check/common_mm/vmalloc_32_user.data: -------------------------------------------------------------------------------- 1 | [group] 2 | # The body of the replacement function 3 | handler.post =>> 4 | if (ret_val != NULL) 5 | kedr_lc_handle_alloc(ret_val, size, 6 | caller_address); 7 | << 8 | ####################################################################### 9 | -------------------------------------------------------------------------------- /sources/leak_check/common_mm/vmalloc_node.data: -------------------------------------------------------------------------------- 1 | [group] 2 | # The body of the replacement function 3 | handler.post =>> 4 | if (ret_val != NULL) 5 | kedr_lc_handle_alloc(ret_val, size, 6 | caller_address); 7 | << 8 | ####################################################################### 9 | -------------------------------------------------------------------------------- /sources/leak_check/common_mm/vmalloc_user.data: -------------------------------------------------------------------------------- 1 | [group] 2 | # The body of the replacement function 3 | handler.post =>> 4 | if (ret_val != NULL) 5 | kedr_lc_handle_alloc(ret_val, size, 6 | caller_address); 7 | << 8 | ####################################################################### 9 | -------------------------------------------------------------------------------- /sources/leak_check/common_mm/vzalloc.data: -------------------------------------------------------------------------------- 1 | [group] 2 | # The body of the replacement function 3 | handler.post =>> 4 | if (ret_val != NULL) 5 | kedr_lc_handle_alloc(ret_val, size, 6 | caller_address); 7 | << 8 | ####################################################################### 9 | -------------------------------------------------------------------------------- /sources/leak_check/common_mm/vzalloc_node.data: -------------------------------------------------------------------------------- 1 | [group] 2 | # The body of the replacement function 3 | handler.post =>> 4 | if (ret_val != NULL) 5 | kedr_lc_handle_alloc(ret_val, size, 6 | caller_address); 7 | << 8 | ####################################################################### 9 | -------------------------------------------------------------------------------- /sources/payloads_callm/capable/capable.data: -------------------------------------------------------------------------------- 1 | [group] 2 | # The parameters to be output to the trace. 3 | trace.param.type = int 4 | trace.param.name = cap 5 | 6 | trace.param.type = int 7 | trace.param.name = ret_val 8 | 9 | # The format string to be used for trace output. 10 | trace.formatString = "arguments: (%d), result: %d" 11 | ####################################################################### 12 | -------------------------------------------------------------------------------- /sources/payloads_callm/common_mm/get_zeroed_page.data: -------------------------------------------------------------------------------- 1 | [group] 2 | # The parameters to be output to the trace. 3 | trace.param.type = unsigned int 4 | trace.param.name = flags 5 | 6 | trace.param.type = unsigned long 7 | trace.param.name = ret_val 8 | 9 | # The format string to be used for trace output. 10 | trace.formatString = "arguments: (%x), result: 0x%lx" 11 | ####################################################################### 12 | -------------------------------------------------------------------------------- /sources/payloads_callm/common_mm/kfree.data: -------------------------------------------------------------------------------- 1 | [group] 2 | # The parameters to be output to the trace. 3 | trace.param.type = void * 4 | trace.param.name = p 5 | 6 | # Happens-before relationship with kmalloc 7 | trace.happensBefore = yes 8 | 9 | # The format string to be used for trace output. 10 | trace.formatString = "arguments: (%p)" 11 | ####################################################################### 12 | -------------------------------------------------------------------------------- /sources/payloads_callm/common_mm/kmem_cache_free.data: -------------------------------------------------------------------------------- 1 | [group] 2 | # The parameters to be output to the trace. 3 | trace.param.type = void * 4 | trace.param.name = mc 5 | 6 | trace.param.type = void * 7 | trace.param.name = p 8 | 9 | # The format string to be used for trace output. 10 | trace.formatString = "arguments: (%p, %p)" 11 | ####################################################################### 12 | -------------------------------------------------------------------------------- /sources/payloads_callm/common_mm/kzfree.data: -------------------------------------------------------------------------------- 1 | [group] 2 | # The parameters to be output to the trace. 3 | trace.param.type = void * 4 | trace.param.name = p 5 | 6 | # Happens-before relationship with kmalloc 7 | trace.happensBefore = yes 8 | 9 | # The format string to be used for trace output. 10 | trace.formatString = "arguments: (%p)" 11 | ####################################################################### 12 | -------------------------------------------------------------------------------- /sources/payloads_callm/mutexes/mutex_lock.data: -------------------------------------------------------------------------------- 1 | [group] 2 | # The parameters to be output to the trace. 3 | trace.param.type = struct mutex * 4 | trace.param.name = lock 5 | 6 | # The format string to be used for trace output. 7 | trace.formatString = "arguments: (%p)" 8 | ####################################################################### 9 | -------------------------------------------------------------------------------- /sources/payloads_callm/mutexes/mutex_lock_interruptible.data: -------------------------------------------------------------------------------- 1 | [group] 2 | # The parameters to be output to the trace. 3 | trace.param.type = struct mutex * 4 | trace.param.name = lock 5 | 6 | trace.param.type = int 7 | trace.param.name = ret_val 8 | 9 | # The format string to be used for trace output. 10 | trace.formatString = "arguments: (%p), result: %d" 11 | ####################################################################### 12 | -------------------------------------------------------------------------------- /sources/payloads_callm/mutexes/mutex_lock_killable.data: -------------------------------------------------------------------------------- 1 | [group] 2 | # The parameters to be output to the trace. 3 | trace.param.type = struct mutex * 4 | trace.param.name = lock 5 | 6 | trace.param.type = int 7 | trace.param.name = ret_val 8 | 9 | # The format string to be used for trace output. 10 | trace.formatString = "arguments: (%p), result: %d" 11 | ####################################################################### 12 | -------------------------------------------------------------------------------- /sources/payloads_callm/mutexes/mutex_trylock.data: -------------------------------------------------------------------------------- 1 | [group] 2 | # The parameters to be output to the trace. 3 | trace.param.type = struct mutex * 4 | trace.param.name = lock 5 | 6 | trace.param.type = int 7 | trace.param.name = ret_val 8 | 9 | # The format string to be used for trace output. 10 | trace.formatString = "arguments: (%p), result: %d" 11 | ####################################################################### 12 | -------------------------------------------------------------------------------- /sources/payloads_callm/mutexes/mutex_unlock.data: -------------------------------------------------------------------------------- 1 | [group] 2 | # The parameters to be output to the trace. 3 | trace.param.type = struct mutex * 4 | trace.param.name = lock 5 | 6 | # Happens-before relationship with lock 7 | trace.happensBefore = yes 8 | 9 | # The format string to be used for trace output. 10 | trace.formatString = "arguments: (%p)" 11 | ####################################################################### 12 | -------------------------------------------------------------------------------- /sources/payloads_callm/schedule/__cond_resched_lock.data: -------------------------------------------------------------------------------- 1 | [group] 2 | # The parameters to be output to the trace. 3 | trace.param.type = spinlock_t * 4 | trace.param.name = lock 5 | 6 | trace.param.type = int 7 | trace.param.name = ret_val 8 | 9 | # The format string to be used for trace output. 10 | trace.formatString = "arguments: (%p), returns: %d" 11 | ####################################################################### 12 | -------------------------------------------------------------------------------- /sources/payloads_callm/schedule/_cond_resched.data: -------------------------------------------------------------------------------- 1 | [group] 2 | # The parameters to be output to the trace. 3 | trace.param.type = int 4 | trace.param.name = ret_val 5 | 6 | # The format string to be used for trace output. 7 | trace.formatString = "returns: %d" 8 | ####################################################################### 9 | -------------------------------------------------------------------------------- /sources/payloads_callm/schedule/cond_resched_lock.data: -------------------------------------------------------------------------------- 1 | [group] 2 | # The parameters to be output to the trace. 3 | trace.param.type = spinlock_t * 4 | trace.param.name = lock 5 | 6 | trace.param.type = int 7 | trace.param.name = ret_val 8 | 9 | # The format string to be used for trace output. 10 | trace.formatString = "arguments: (%p), returns: %d" 11 | ####################################################################### 12 | -------------------------------------------------------------------------------- /sources/payloads_callm/schedule/io_schedule.data: -------------------------------------------------------------------------------- 1 | [group] 2 | # No additional information for trace. 3 | ####################################################################### 4 | -------------------------------------------------------------------------------- /sources/payloads_callm/schedule/preempt_schedule.data: -------------------------------------------------------------------------------- 1 | [group] 2 | # No additional information for trace. 3 | ####################################################################### 4 | -------------------------------------------------------------------------------- /sources/payloads_callm/schedule/schedule.data: -------------------------------------------------------------------------------- 1 | [group] 2 | # No additional information for trace. 3 | ####################################################################### 4 | -------------------------------------------------------------------------------- /sources/payloads_callm/schedule/schedule_timeout.data: -------------------------------------------------------------------------------- 1 | [group] 2 | # The parameters to be output to the trace. 3 | trace.param.type = signed long 4 | trace.param.name = timeout 5 | 6 | trace.param.type = signed long 7 | trace.param.name = ret_val 8 | 9 | # The format string to be used for trace output. 10 | trace.formatString = "arguments: (%ld), result: %ld" 11 | ####################################################################### 12 | -------------------------------------------------------------------------------- /sources/payloads_callm/schedule/schedule_timeout_interruptible.data: -------------------------------------------------------------------------------- 1 | [group] 2 | # The parameters to be output to the trace. 3 | trace.param.type = signed long 4 | trace.param.name = timeout 5 | 6 | trace.param.type = signed long 7 | trace.param.name = ret_val 8 | 9 | # The format string to be used for trace output. 10 | trace.formatString = "arguments: (%ld), result: %ld" 11 | ####################################################################### 12 | -------------------------------------------------------------------------------- /sources/payloads_callm/schedule/schedule_timeout_uninterruptible.data: -------------------------------------------------------------------------------- 1 | [group] 2 | # The parameters to be output to the trace. 3 | trace.param.type = signed long 4 | trace.param.name = timeout 5 | 6 | trace.param.type = signed long 7 | trace.param.name = ret_val 8 | 9 | # The format string to be used for trace output. 10 | trace.formatString = "arguments: (%ld), result: %ld" 11 | ####################################################################### 12 | -------------------------------------------------------------------------------- /sources/payloads_callm/spinlocks/_raw_spin_lock.data: -------------------------------------------------------------------------------- 1 | [group] 2 | # The parameters to be output to the trace. 3 | trace.param.type = raw_spinlock_t * 4 | trace.param.name = lock 5 | 6 | # The format string to be used for trace output. 7 | trace.formatString = "arguments: (%p)" 8 | ####################################################################### 9 | -------------------------------------------------------------------------------- /sources/payloads_callm/spinlocks/_raw_spin_lock_irq.data: -------------------------------------------------------------------------------- 1 | [group] 2 | # The parameters to be output to the trace. 3 | trace.param.type = raw_spinlock_t * 4 | trace.param.name = lock 5 | 6 | # The format string to be used for trace output. 7 | trace.formatString = "arguments: (%p)" 8 | ####################################################################### 9 | -------------------------------------------------------------------------------- /sources/payloads_callm/spinlocks/_raw_spin_lock_irqsave.data: -------------------------------------------------------------------------------- 1 | [group] 2 | # The parameters to be output to the trace. 3 | trace.param.type = raw_spinlock_t * 4 | trace.param.name = lock 5 | 6 | trace.param.type = unsigned long 7 | trace.param.name = ret_val 8 | 9 | # The format string to be used for trace output. 10 | trace.formatString = "arguments: (%p), result: %lu" 11 | ####################################################################### 12 | -------------------------------------------------------------------------------- /sources/payloads_callm/spinlocks/_raw_spin_unlock.data: -------------------------------------------------------------------------------- 1 | [group] 2 | # The parameters to be output to the trace. 3 | trace.param.type = raw_spinlock_t * 4 | trace.param.name = lock 5 | 6 | # Happens-before relationship with lock 7 | trace.happensBefore = yes 8 | 9 | # The format string to be used for trace output. 10 | trace.formatString = "arguments: (%p)" 11 | ####################################################################### 12 | -------------------------------------------------------------------------------- /sources/payloads_callm/spinlocks/_raw_spin_unlock_irq.data: -------------------------------------------------------------------------------- 1 | [group] 2 | # The parameters to be output to the trace. 3 | trace.param.type = raw_spinlock_t * 4 | trace.param.name = lock 5 | 6 | # Happens-before relationship with lock 7 | trace.happensBefore = yes 8 | 9 | # The format string to be used for trace output. 10 | trace.formatString = "arguments: (%p)" 11 | ####################################################################### 12 | -------------------------------------------------------------------------------- /sources/payloads_callm/spinlocks/_spin_lock.data: -------------------------------------------------------------------------------- 1 | [group] 2 | # The parameters to be output to the trace. 3 | trace.param.type = spinlock_t * 4 | trace.param.name = lock 5 | 6 | # The format string to be used for trace output. 7 | trace.formatString = "arguments: (%p)" 8 | ####################################################################### 9 | -------------------------------------------------------------------------------- /sources/payloads_callm/spinlocks/_spin_lock_irq.data: -------------------------------------------------------------------------------- 1 | [group] 2 | # The parameters to be output to the trace. 3 | trace.param.type = spinlock_t * 4 | trace.param.name = lock 5 | 6 | # The format string to be used for trace output. 7 | trace.formatString = "arguments: (%p)" 8 | ####################################################################### 9 | -------------------------------------------------------------------------------- /sources/payloads_callm/spinlocks/_spin_lock_irqsave.data: -------------------------------------------------------------------------------- 1 | [group] 2 | # The parameters to be output to the trace. 3 | trace.param.type = spinlock_t * 4 | trace.param.name = lock 5 | 6 | trace.param.type = unsigned long 7 | trace.param.name = ret_val 8 | 9 | # The format string to be used for trace output. 10 | trace.formatString = "arguments: (%p), result: %lu" 11 | ####################################################################### 12 | -------------------------------------------------------------------------------- /sources/payloads_callm/spinlocks/_spin_unlock.data: -------------------------------------------------------------------------------- 1 | [group] 2 | # The parameters to be output to the trace. 3 | trace.param.type = spinlock_t * 4 | trace.param.name = lock 5 | 6 | # Happens-before relationship with lock 7 | trace.happensBefore = yes 8 | 9 | # The format string to be used for trace output. 10 | trace.formatString = "arguments: (%p)" 11 | ####################################################################### 12 | -------------------------------------------------------------------------------- /sources/payloads_callm/spinlocks/_spin_unlock_irq.data: -------------------------------------------------------------------------------- 1 | [group] 2 | # The parameters to be output to the trace. 3 | trace.param.type = spinlock_t * 4 | trace.param.name = lock 5 | 6 | # Happens-before relationship with lock 7 | trace.happensBefore = yes 8 | 9 | # The format string to be used for trace output. 10 | trace.formatString = "arguments: (%p)" 11 | ####################################################################### 12 | -------------------------------------------------------------------------------- /sources/payloads_callm/virtual_mm/vfree.data: -------------------------------------------------------------------------------- 1 | [group] 2 | # The parameters to be output to the trace. 3 | trace.param.type = const void * 4 | trace.param.name = addr 5 | 6 | # Happens-before relationship with vmalloc 7 | trace.happensBefore = yes 8 | 9 | # The format string to be used for trace output. 10 | trace.formatString = "arguments: (%p)" 11 | ####################################################################### 12 | -------------------------------------------------------------------------------- /sources/payloads_callm/virtual_mm/vmalloc.data: -------------------------------------------------------------------------------- 1 | [group] 2 | # The parameters to be output to the trace. 3 | trace.param.type = size_t 4 | trace.param.name = size 5 | 6 | trace.param.type = void * 7 | trace.param.name = ret_val 8 | 9 | # The format string to be used for trace output. 10 | trace.formatString = "arguments: (%zu), result: %p" 11 | ####################################################################### 12 | -------------------------------------------------------------------------------- /sources/payloads_callm/virtual_mm/vmalloc_32.data: -------------------------------------------------------------------------------- 1 | [group] 2 | # The parameters to be output to the trace. 3 | trace.param.type = size_t 4 | trace.param.name = size 5 | 6 | trace.param.type = void * 7 | trace.param.name = ret_val 8 | 9 | # The format string to be used for trace output. 10 | trace.formatString = "arguments: (%zu), result: %p" 11 | ####################################################################### 12 | -------------------------------------------------------------------------------- /sources/payloads_callm/virtual_mm/vmalloc_32_user.data: -------------------------------------------------------------------------------- 1 | [group] 2 | # The parameters to be output to the trace. 3 | trace.param.type = size_t 4 | trace.param.name = size 5 | 6 | trace.param.type = void * 7 | trace.param.name = ret_val 8 | 9 | # The format string to be used for trace output. 10 | trace.formatString = "arguments: (%zu), result: %p" 11 | ####################################################################### 12 | -------------------------------------------------------------------------------- /sources/payloads_callm/virtual_mm/vmalloc_user.data: -------------------------------------------------------------------------------- 1 | [group] 2 | # The parameters to be output to the trace. 3 | trace.param.type = size_t 4 | trace.param.name = size 5 | 6 | trace.param.type = void * 7 | trace.param.name = ret_val 8 | 9 | # The format string to be used for trace output. 10 | trace.formatString = "arguments: (%zu), result: %p" 11 | ####################################################################### 12 | -------------------------------------------------------------------------------- /sources/payloads_callm/virtual_mm/vzalloc.data: -------------------------------------------------------------------------------- 1 | [group] 2 | # The parameters to be output to the trace. 3 | trace.param.type = size_t 4 | trace.param.name = size 5 | 6 | trace.param.type = void * 7 | trace.param.name = ret_val 8 | 9 | # The format string to be used for trace output. 10 | trace.formatString = "arguments: (%zu), result: %p" 11 | ####################################################################### 12 | -------------------------------------------------------------------------------- /sources/payloads_callm/waitqueue/__init_waitqueue_head.data: -------------------------------------------------------------------------------- 1 | [group] 2 | # The parameters to be output to the trace. 3 | trace.param.type = wait_queue_head_t * 4 | trace.param.name = q 5 | 6 | trace.param.type = struct lock_class_key * 7 | trace.param.name = key 8 | 9 | # The format string to be used for trace output. 10 | trace.formatString = "arguments: (q=%p, key=%p)" 11 | ####################################################################### 12 | -------------------------------------------------------------------------------- /sources/payloads_callm/waitqueue/add_wait_queue.data: -------------------------------------------------------------------------------- 1 | [group] 2 | # The parameters to be output to the trace. 3 | trace.param.type = wait_queue_head_t * 4 | trace.param.name = q 5 | 6 | trace.param.type = wait_queue_t * 7 | trace.param.name = wait 8 | 9 | # The format string to be used for trace output. 10 | trace.formatString = "arguments: (%p, %p)" 11 | ####################################################################### 12 | -------------------------------------------------------------------------------- /sources/payloads_callm/waitqueue/add_wait_queue_exclusive.data: -------------------------------------------------------------------------------- 1 | [group] 2 | # The parameters to be output to the trace. 3 | trace.param.type = wait_queue_head_t * 4 | trace.param.name = q 5 | 6 | trace.param.type = wait_queue_t * 7 | trace.param.name = wait 8 | 9 | # The format string to be used for trace output. 10 | trace.formatString = "arguments: (%p, %p)" 11 | ####################################################################### 12 | -------------------------------------------------------------------------------- /sources/payloads_callm/waitqueue/finish_wait.data: -------------------------------------------------------------------------------- 1 | [group] 2 | # The parameters to be output to the trace. 3 | trace.param.type = wait_queue_head_t * 4 | trace.param.name = q 5 | 6 | trace.param.type = wait_queue_t * 7 | trace.param.name = wait 8 | 9 | # The format string to be used for trace output. 10 | trace.formatString = "arguments: (%p, %p)" 11 | ####################################################################### 12 | -------------------------------------------------------------------------------- /sources/payloads_callm/waitqueue/init_waitqueue_head.data: -------------------------------------------------------------------------------- 1 | [group] 2 | # The parameters to be output to the trace. 3 | trace.param.type = wait_queue_head_t * 4 | trace.param.name = q 5 | 6 | # The format string to be used for trace output. 7 | trace.formatString = "arguments: (%p)" 8 | ####################################################################### 9 | -------------------------------------------------------------------------------- /sources/payloads_callm/waitqueue/remove_wait_queue.data: -------------------------------------------------------------------------------- 1 | [group] 2 | # The parameters to be output to the trace. 3 | trace.param.type = wait_queue_head_t * 4 | trace.param.name = q 5 | 6 | trace.param.type = wait_queue_t * 7 | trace.param.name = wait 8 | 9 | # The format string to be used for trace output. 10 | trace.formatString = "arguments: (%p, %p)" 11 | ####################################################################### 12 | -------------------------------------------------------------------------------- /sources/payloads_fsim/capable/capable.data: -------------------------------------------------------------------------------- 1 | [group] 2 | # Fault Simulation 3 | fpoint.fault_code = ret_val = 0; 4 | 5 | fpoint.param.type = int 6 | fpoint.param.name = cap 7 | ####################################################################### 8 | -------------------------------------------------------------------------------- /sources/payloads_fsim/common_mm/__kmalloc.data: -------------------------------------------------------------------------------- 1 | [group] 2 | # Fault Simulation 3 | fpoint.param.type = size_t 4 | fpoint.param.name = size 5 | 6 | fpoint.param.type = gfp_t 7 | fpoint.param.name = flags 8 | 9 | # Rename point 10 | fpoint.rename = kmalloc 11 | 12 | fpoint.fault_code = ret_val = NULL; 13 | ####################################################################### 14 | -------------------------------------------------------------------------------- /sources/payloads_fsim/common_mm/__kmalloc_node.data: -------------------------------------------------------------------------------- 1 | [group] 2 | # Fault Simulation 3 | fpoint.reuse_point = kmalloc 4 | 5 | # Duplicate parameters for kmalloc simulation point 6 | fpoint.param.type = size_t 7 | fpoint.param.name = size 8 | 9 | fpoint.param.type = gfp_t 10 | fpoint.param.name = flags 11 | 12 | fpoint.fault_code = ret_val = NULL; 13 | ####################################################################### 14 | -------------------------------------------------------------------------------- /sources/payloads_fsim/common_mm/__krealloc.data: -------------------------------------------------------------------------------- 1 | [group] 2 | # Fault Simulation 3 | fpoint.reuse_point = kmalloc 4 | 5 | # Duplicate parameters for kmalloc simulation point 6 | fpoint.param.type = size_t 7 | fpoint.param.name = size 8 | 9 | fpoint.param.type = gfp_t 10 | fpoint.param.name = flags 11 | 12 | fpoint.fault_code = ret_val = NULL; 13 | ####################################################################### 14 | -------------------------------------------------------------------------------- /sources/payloads_fsim/common_mm/alloc_pages_exact.data: -------------------------------------------------------------------------------- 1 | [group] 2 | # Fault Simulation 3 | fpoint.reuse_point = kmalloc 4 | 5 | # Duplicate parameters for kmalloc simulation point 6 | fpoint.param.type = size_t 7 | fpoint.param.name = size 8 | 9 | fpoint.param.type = gfp_t 10 | fpoint.param.name = flags 11 | 12 | fpoint.fault_code = ret_val = NULL; 13 | ####################################################################### 14 | -------------------------------------------------------------------------------- /sources/payloads_fsim/common_mm/alloc_pages_exact_nid.data: -------------------------------------------------------------------------------- 1 | [group] 2 | # Fault Simulation 3 | fpoint.reuse_point = kmalloc 4 | 5 | # Duplicate parameters for kmalloc simulation point 6 | fpoint.param.type = size_t 7 | fpoint.param.name = size 8 | 9 | fpoint.param.type = gfp_t 10 | fpoint.param.name = flags 11 | 12 | fpoint.fault_code = ret_val = NULL; 13 | ####################################################################### 14 | -------------------------------------------------------------------------------- /sources/payloads_fsim/common_mm/kmem_cache_alloc_node_trace.data: -------------------------------------------------------------------------------- 1 | [group] 2 | # Fault Simulation 3 | fpoint.reuse_point = kmalloc 4 | 5 | # Duplicate parameters for kmalloc simulation point 6 | fpoint.param.type = size_t 7 | fpoint.param.name = size 8 | 9 | fpoint.param.type = gfp_t 10 | fpoint.param.name = flags 11 | 12 | fpoint.fault_code = ret_val = NULL; 13 | ####################################################################### 14 | -------------------------------------------------------------------------------- /sources/payloads_fsim/common_mm/kmem_cache_alloc_trace.data: -------------------------------------------------------------------------------- 1 | [group] 2 | # Fault Simulation 3 | fpoint.reuse_point = kmalloc 4 | 5 | # Duplicate parameters for kmalloc simulation point 6 | fpoint.param.type = size_t 7 | fpoint.param.name = size 8 | 9 | fpoint.param.type = gfp_t 10 | fpoint.param.name = flags 11 | 12 | fpoint.fault_code = ret_val = NULL; 13 | ####################################################################### 14 | -------------------------------------------------------------------------------- /sources/payloads_fsim/common_mm/krealloc.data: -------------------------------------------------------------------------------- 1 | [group] 2 | # Fault Simulation 3 | fpoint.reuse_point = kmalloc 4 | 5 | fpoint.param.type = size_t 6 | fpoint.param.name = size 7 | 8 | fpoint.param.type = gfp_t 9 | fpoint.param.name = flags 10 | 11 | fpoint.fault_code = ret_val = NULL; 12 | ####################################################################### 13 | -------------------------------------------------------------------------------- /sources/payloads_fsim/mem_util/kmemdup.data: -------------------------------------------------------------------------------- 1 | [group] 2 | # Fault Simulation 3 | fpoint.fault_code = ret_val = NULL; 4 | ####################################################################### 5 | -------------------------------------------------------------------------------- /sources/payloads_fsim/mem_util/kstrdup.data: -------------------------------------------------------------------------------- 1 | [group] 2 | # Fault Simulation 3 | fpoint.fault_code = ret_val = NULL; 4 | ####################################################################### 5 | -------------------------------------------------------------------------------- /sources/payloads_fsim/mem_util/kstrndup.data: -------------------------------------------------------------------------------- 1 | [group] 2 | # Fault Simulation 3 | fpoint.fault_code = ret_val = NULL; 4 | ####################################################################### 5 | -------------------------------------------------------------------------------- /sources/payloads_fsim/mem_util/match_strdup.data: -------------------------------------------------------------------------------- 1 | [group] 2 | # Fault Simulation 3 | fpoint.fault_code = ret_val = NULL; 4 | ####################################################################### 5 | -------------------------------------------------------------------------------- /sources/payloads_fsim/uaccess/_copy_from_user.data: -------------------------------------------------------------------------------- 1 | [group] 2 | # Rename 3 | fpoint.rename = copy_from_user 4 | 5 | # Fault Simulation 6 | fpoint.fault_code = ret_val = n; 7 | ####################################################################### 8 | -------------------------------------------------------------------------------- /sources/payloads_fsim/uaccess/_copy_to_user.data: -------------------------------------------------------------------------------- 1 | [group] 2 | # Rename 3 | fpoint.rename = copy_to_user 4 | 5 | # Fault Simulation 6 | fpoint.fault_code = ret_val = n; 7 | ####################################################################### 8 | -------------------------------------------------------------------------------- /sources/payloads_fsim/uaccess/copy_from_user.data: -------------------------------------------------------------------------------- 1 | [group] 2 | # Rename 3 | fpoint.rename = copy_from_user 4 | 5 | # Fault Simulation 6 | fpoint.fault_code = ret_val = n; 7 | ####################################################################### 8 | -------------------------------------------------------------------------------- /sources/payloads_fsim/uaccess/copy_to_user.data: -------------------------------------------------------------------------------- 1 | [group] 2 | # Rename 3 | fpoint.rename = copy_to_user 4 | 5 | # Fault Simulation 6 | fpoint.fault_code = ret_val = n; 7 | ####################################################################### 8 | -------------------------------------------------------------------------------- /sources/payloads_fsim/uaccess/memdup_user.data: -------------------------------------------------------------------------------- 1 | [group] 2 | # Fault Simulation 3 | fpoint.fault_code = ret_val = ERR_PTR(-ENOMEM); 4 | ####################################################################### 5 | -------------------------------------------------------------------------------- /sources/payloads_fsim/uaccess/strndup_user.data: -------------------------------------------------------------------------------- 1 | [group] 2 | # Fault Simulation 3 | fpoint.fault_code = ret_val = ERR_PTR(-ENOMEM); 4 | ####################################################################### 5 | -------------------------------------------------------------------------------- /sources/payloads_fsim/virtual_mm/__vmalloc.data: -------------------------------------------------------------------------------- 1 | [group] 2 | # Fault Simulation 3 | fpoint.reuse_point = vmalloc 4 | fpoint.fault_code = ret_val = NULL; 5 | ####################################################################### 6 | -------------------------------------------------------------------------------- /sources/payloads_fsim/virtual_mm/vmalloc.data: -------------------------------------------------------------------------------- 1 | [group] 2 | # Fault Simulation 3 | fpoint.fault_code = ret_val = NULL; 4 | ####################################################################### 5 | -------------------------------------------------------------------------------- /sources/payloads_fsim/virtual_mm/vmalloc_32.data: -------------------------------------------------------------------------------- 1 | [group] 2 | # Fault Simulation 3 | fpoint.reuse_point = vmalloc 4 | fpoint.fault_code = ret_val = NULL; 5 | ####################################################################### 6 | -------------------------------------------------------------------------------- /sources/payloads_fsim/virtual_mm/vmalloc_32_user.data: -------------------------------------------------------------------------------- 1 | [group] 2 | # Fault Simulation 3 | fpoint.reuse_point = vmalloc 4 | fpoint.fault_code = ret_val = NULL; 5 | ####################################################################### 6 | -------------------------------------------------------------------------------- /sources/payloads_fsim/virtual_mm/vmalloc_node.data: -------------------------------------------------------------------------------- 1 | [group] 2 | # Fault Simulation 3 | fpoint.reuse_point = vmalloc 4 | fpoint.fault_code = ret_val = NULL; 5 | ####################################################################### 6 | -------------------------------------------------------------------------------- /sources/payloads_fsim/virtual_mm/vmalloc_user.data: -------------------------------------------------------------------------------- 1 | [group] 2 | # Fault Simulation 3 | fpoint.reuse_point = vmalloc 4 | fpoint.fault_code = ret_val = NULL; 5 | ####################################################################### 6 | -------------------------------------------------------------------------------- /sources/payloads_fsim/virtual_mm/vzalloc.data: -------------------------------------------------------------------------------- 1 | [group] 2 | # Fault Simulation 3 | fpoint.reuse_point = vmalloc 4 | fpoint.fault_code = ret_val = NULL; 5 | ####################################################################### 6 | -------------------------------------------------------------------------------- /sources/payloads_fsim/virtual_mm/vzalloc_node.data: -------------------------------------------------------------------------------- 1 | [group] 2 | # Fault Simulation 3 | fpoint.reuse_point = vmalloc 4 | fpoint.fault_code = ret_val = NULL; 5 | ####################################################################### 6 | -------------------------------------------------------------------------------- /sources/templates/README: -------------------------------------------------------------------------------- 1 | This directory contains the templates for function_support sources and 2 | for the payload modules of different types. 3 | -------------------------------------------------------------------------------- /sources/templates/fault_indicator.c/block/block.tpl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/euspectre/kedr/cc4f22330373f1de33ce0b7f771f097885bb4d6a/sources/templates/fault_indicator.c/block/block.tpl -------------------------------------------------------------------------------- /sources/templates/fault_indicator.c/document/controlFileCreate.tpl: -------------------------------------------------------------------------------- 1 | error = indicator_file_<$indicator.file.name$>_create(<$indicatorStateName$>, control_directory); 2 | if(error) <$if isIndicatorDestroy$>goto fail<$else$>return error<$endif$>; -------------------------------------------------------------------------------- /sources/templates/fault_indicator.c/document/controlFileDeclaration.tpl: -------------------------------------------------------------------------------- 1 | struct dentry* file_<$indicator.file.name$>; -------------------------------------------------------------------------------- /sources/templates/fault_indicator.c/document/controlFileDestroy.tpl: -------------------------------------------------------------------------------- 1 | indicator_file_<$indicator.file.name$>_destroy(<$indicatorStateName$>); -------------------------------------------------------------------------------- /sources/templates/fault_indicator.c/document/indicatorDestroyCall.tpl: -------------------------------------------------------------------------------- 1 | indicator_destroy_<$indicator.destroy.name$>(<$if concat(indicator.state.name)$><$indicatorStateName$><$endif$>); -------------------------------------------------------------------------------- /sources/templates/fault_indicator.c/document/indicatorDestroyDefinition.tpl: -------------------------------------------------------------------------------- 1 | static void 2 | indicator_destroy_<$indicator.destroy.name$>(<$if concat(indicator.state.name)$><$indicatorStateDeclaration$><$else$>void<$endif$>) 3 | { 4 | <$indicatorVarsUse$><$indicator.destroy.code$> 5 | <$indicatorVarsUnuse$>} -------------------------------------------------------------------------------- /sources/templates/fault_indicator.c/document/indicatorFormatString.tpl: -------------------------------------------------------------------------------- 1 | <$if concat(indicator.parameter.type)$><$indicator.parameter.type : join(,)$><$endif$> -------------------------------------------------------------------------------- /sources/templates/fault_indicator.c/document/indicatorInitCall.tpl: -------------------------------------------------------------------------------- 1 | error = indicator_init_<$indicator.init.name$>(<$if concat(indicator.state.name)$><$indicatorStateName$>, <$endif$>params); 2 | if(error) <$if isFailInInit$>goto fail<$else$>return error<$endif$>; -------------------------------------------------------------------------------- /sources/templates/fault_indicator.c/document/indicatorInitDefinition.tpl: -------------------------------------------------------------------------------- 1 | static int 2 | indicator_init_<$indicator.init.name$>(<$if concat(indicator.state.name)$><$indicatorStateDeclaration$>, <$endif$>const char* params) 3 | { 4 | <$indicatorVarsUse$><$indicator.init.code$> 5 | <$indicatorVarsUnuse$>} 6 | -------------------------------------------------------------------------------- /sources/templates/fault_indicator.c/document/indicatorSimulateCall.tpl: -------------------------------------------------------------------------------- 1 | <$if indicator.simulate.first$><$else$> result = indicator_simulate_<$indicator.simulate.name$>(<$if concat(indicator.state.name)$><$indicatorStateName$><$if concat(indicator.parameter.name)$>, 2 | <$pointDataName$><$endif$><$else$><$if concat(indicator.parameter.name)$><$pointDataName$><$endif$><$endif$>); 3 | if(result) return result; 4 | <$endif$> -------------------------------------------------------------------------------- /sources/templates/fault_indicator.c/document/indicatorSimulateCallFirst.tpl: -------------------------------------------------------------------------------- 1 | <$if indicator.simulate.first$> result = indicator_simulate_<$indicator.simulate.name$>(<$if concat(indicator.state.name)$><$indicatorStateName$>, 2 | <$endif$><$if concat(indicator.parameter.name)$><$pointDataName$>, 3 | <$endif$>&never); 4 | if(result || never) return result; 5 | <$endif$> -------------------------------------------------------------------------------- /sources/templates/fault_indicator.c/document/indicatorStateDeclaration.tpl: -------------------------------------------------------------------------------- 1 | <$if isIndicatorState$>struct indicator_real_state* indicator_state<$endif$> -------------------------------------------------------------------------------- /sources/templates/fault_indicator.c/document/indicatorStateName.tpl: -------------------------------------------------------------------------------- 1 | <$if isIndicatorState$>indicator_state<$endif$> -------------------------------------------------------------------------------- /sources/templates/fault_indicator.c/document/indicatorStateType.tpl: -------------------------------------------------------------------------------- 1 | <$if isIndicatorState$>struct indicator_real_state*<$endif$> -------------------------------------------------------------------------------- /sources/templates/fault_indicator.c/document/indicatorVarsUnuse.tpl: -------------------------------------------------------------------------------- 1 | <$if concat(indicator.state.name)$>#undef state 2 | <$endif$> -------------------------------------------------------------------------------- /sources/templates/fault_indicator.c/document/indicatorVarsUse.tpl: -------------------------------------------------------------------------------- 1 | <$if concat(indicator.state.name)$>#define state(param) (indicator_state->param) 2 | <$endif$> -------------------------------------------------------------------------------- /sources/templates/fault_indicator.c/document/isFailInInit.tpl: -------------------------------------------------------------------------------- 1 | <$if isIndicatorDestroy$><$if concat(indicator.init.name)$>1<$else$><$if concat(indicator.file.name)$>1<$endif$><$endif$><$endif$> -------------------------------------------------------------------------------- /sources/templates/fault_indicator.c/document/isIndicatorDestroy.tpl: -------------------------------------------------------------------------------- 1 | <$if concat(indicator.file.name)$>1<$else$><$if concat(indicator.destroy.name)$>1<$endif$><$endif$> -------------------------------------------------------------------------------- /sources/templates/fault_indicator.c/document/isIndicatorInit.tpl: -------------------------------------------------------------------------------- 1 | <$if concat(indicator.file.name)$>1<$else$><$if concat(indicator.init.name)$>1<$endif$><$endif$> -------------------------------------------------------------------------------- /sources/templates/fault_indicator.c/document/isIndicatorState.tpl: -------------------------------------------------------------------------------- 1 | <$if concat(indicator.state.name)$>1<$else$><$if concat(indicator.file.name)$>1<$endif$><$endif$> -------------------------------------------------------------------------------- /sources/templates/fault_indicator.c/document/isPointData.tpl: -------------------------------------------------------------------------------- 1 | <$if concat(indicator.parameter.type)$>1<$endif$> -------------------------------------------------------------------------------- /sources/templates/fault_indicator.c/document/pointDataDeclaration.tpl: -------------------------------------------------------------------------------- 1 | <$pointDataType$> <$pointDataName$> -------------------------------------------------------------------------------- /sources/templates/fault_indicator.c/document/pointDataField.tpl: -------------------------------------------------------------------------------- 1 | <$indicator.parameter.type$> <$indicator.parameter.name$>; -------------------------------------------------------------------------------- /sources/templates/fault_indicator.c/document/pointDataName.tpl: -------------------------------------------------------------------------------- 1 | point_data -------------------------------------------------------------------------------- /sources/templates/fault_indicator.c/document/pointDataType.tpl: -------------------------------------------------------------------------------- 1 | struct point_data* -------------------------------------------------------------------------------- /sources/templates/fault_indicator.c/document/pointDataUnuse.tpl: -------------------------------------------------------------------------------- 1 | <$if concat(indicator.parameter.name)$><$pointDataUnuseParam : join(\n)$> 2 | <$endif$> 3 | -------------------------------------------------------------------------------- /sources/templates/fault_indicator.c/document/pointDataUnuseParam.tpl: -------------------------------------------------------------------------------- 1 | #undef <$indicator.parameter.name$> -------------------------------------------------------------------------------- /sources/templates/fault_indicator.c/document/pointDataUse.tpl: -------------------------------------------------------------------------------- 1 | <$if concat(indicator.parameter.name)$><$pointDataUseParam : join(\n)$> 2 | <$endif$> -------------------------------------------------------------------------------- /sources/templates/fault_indicator.c/document/pointDataUseParam.tpl: -------------------------------------------------------------------------------- 1 | #define <$indicator.parameter.name$> (point_data-><$indicator.parameter.name$>) -------------------------------------------------------------------------------- /sources/templates/fault_indicator.c/document/stateVariableDeclaration.tpl: -------------------------------------------------------------------------------- 1 | <$indicator.state.type$> <$indicator.state.name$>; -------------------------------------------------------------------------------- /sources/templates/fault_indicator.data/block/block.tpl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/euspectre/kedr/cc4f22330373f1de33ce0b7f771f097885bb4d6a/sources/templates/fault_indicator.data/block/block.tpl -------------------------------------------------------------------------------- /sources/templates/fault_indicator.data/document/expressionConstCDeclaration.tpl: -------------------------------------------------------------------------------- 1 | {"<$expression.constant.c_name$>", <$expression.constant.c_name$>} -------------------------------------------------------------------------------- /sources/templates/fault_indicator.data/document/expressionConstGDeclaration.tpl: -------------------------------------------------------------------------------- 1 | {"<$expression.constant.name$>", <$expression.constant.value$>} -------------------------------------------------------------------------------- /sources/templates/fault_indicator.data/document/expressionHasConstants.tpl: -------------------------------------------------------------------------------- 1 | <$if concat(expression.constant.c_name)$>1<$else$><$if concat(expression.constant.name)$>1<$endif$><$endif$> -------------------------------------------------------------------------------- /sources/templates/fault_indicator.data/document/expressionRvarDeclaration.tpl: -------------------------------------------------------------------------------- 1 | {"<$expression.rvariable.name$>", runtime_var_<$expression.rvariable.name$>_compute} -------------------------------------------------------------------------------- /sources/templates/fault_indicator.data/document/expressionRvarFunction.tpl: -------------------------------------------------------------------------------- 1 | static kedr_calc_int_t runtime_var_<$expression.rvariable.name$>_compute(void) 2 | { 3 | <$expression.rvariable.code$> 4 | } -------------------------------------------------------------------------------- /sources/templates/fault_indicator.data/document/expressionRvarFunctions.tpl: -------------------------------------------------------------------------------- 1 | <$if concat(expression.rvariable.name)$><$expressionRvarFunction : join(\n)$><$endif$> -------------------------------------------------------------------------------- /sources/templates/fault_indicator.data/document/expressionVarGSet.tpl: -------------------------------------------------------------------------------- 1 | *var_next++ = <$expression.variable.value$>; -------------------------------------------------------------------------------- /sources/templates/fault_indicator.data/document/expressionVarPSet.tpl: -------------------------------------------------------------------------------- 1 | *var_next++ = <$expression.variable.pname$>; -------------------------------------------------------------------------------- /sources/templates/fault_indicator.data/document/globalSection.tpl: -------------------------------------------------------------------------------- 1 | global =>> 2 | <$global$> 3 | << -------------------------------------------------------------------------------- /sources/templates/fault_indicator.data/document/indicatorParameters.tpl: -------------------------------------------------------------------------------- 1 | indicator.parameter.type = <$indicator.parameter.type$> 2 | indicator.parameter.name = <$indicator.parameter.name$> -------------------------------------------------------------------------------- /sources/templates/fault_indicator_add_caller_address.data/block/block.tpl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/euspectre/kedr/cc4f22330373f1de33ce0b7f771f097885bb4d6a/sources/templates/fault_indicator_add_caller_address.data/block/block.tpl -------------------------------------------------------------------------------- /sources/templates/fault_indicator_add_caller_address.data/document/expressionCConstant.tpl: -------------------------------------------------------------------------------- 1 | expression.constant.c_name = <$expression.constant.c_name$> 2 | -------------------------------------------------------------------------------- /sources/templates/fault_indicator_add_caller_address.data/document/expressionConstant.tpl: -------------------------------------------------------------------------------- 1 | expression.constant.name = <$expression.constant.name$> 2 | expression.constant.value = <$expression.constant.value$> 3 | -------------------------------------------------------------------------------- /sources/templates/fault_indicator_add_caller_address.data/document/expressionPVariable.tpl: -------------------------------------------------------------------------------- 1 | expression.variable.pname = <$expression.variable.pname$> 2 | -------------------------------------------------------------------------------- /sources/templates/fault_indicator_add_caller_address.data/document/expressionRVariable.tpl: -------------------------------------------------------------------------------- 1 | expression.rvariable.name = <$expression.rvariable.name$> 2 | expression.rvariable.code = <$expression.rvariable.code$> 3 | -------------------------------------------------------------------------------- /sources/templates/fault_indicator_add_caller_address.data/document/expressionVariable.tpl: -------------------------------------------------------------------------------- 1 | expression.variable.name = <$expression.variable.name$> 2 | expression.variable.value = <$expression.variable.value$> 3 | -------------------------------------------------------------------------------- /sources/templates/fault_indicator_add_caller_address.data/document/globalSection.tpl: -------------------------------------------------------------------------------- 1 | global =>> 2 | <$global$> 3 | << -------------------------------------------------------------------------------- /sources/templates/fault_indicator_add_caller_address.data/document/indicatorParameter.tpl: -------------------------------------------------------------------------------- 1 | indicator.parameter.type = <$indicator.parameter.type$> 2 | indicator.parameter.name = <$indicator.parameter.name$> -------------------------------------------------------------------------------- /sources/templates/functions_support.c/block/arg.tpl: -------------------------------------------------------------------------------- 1 | <$arg.type$> <$arg.name$> -------------------------------------------------------------------------------- /sources/templates/functions_support.c/block/argCopy_declare.tpl: -------------------------------------------------------------------------------- 1 | <$arg.type$> <$argCopy_name$> = <$arg.name$>; -------------------------------------------------------------------------------- /sources/templates/functions_support.c/block/argCopy_name.tpl: -------------------------------------------------------------------------------- 1 | <$arg.name$>_copy -------------------------------------------------------------------------------- /sources/templates/functions_support.c/block/argsCopy_declare.tpl: -------------------------------------------------------------------------------- 1 | <$if concat(arg.name)$> <$if ellipsis$>va_list args_copy; 2 | <$endif$><$if args_copy_declare_and_init$><$args_copy_declare_and_init$> 3 | <$else$><$argCopy_declare: join(\n )$> 4 | <$endif$><$if ellipsis$>va_start(args_copy, <$last_arg$>); 5 | <$endif$><$endif$> -------------------------------------------------------------------------------- /sources/templates/functions_support.c/block/argsCopy_finalize.tpl: -------------------------------------------------------------------------------- 1 | <$if concat(arg.name)$><$if ellipsis$> va_end(args_copy); 2 | <$endif$><$if args_copy_destroy$> <$args_copy_destroy$> 3 | <$endif$><$endif$> -------------------------------------------------------------------------------- /sources/templates/functions_support.c/block/argumentList.tpl: -------------------------------------------------------------------------------- 1 | <$if concat(arg.name)$><$argCopy_name : join(, )$><$if ellipsis$>, args_copy<$endif$><$endif$> -------------------------------------------------------------------------------- /sources/templates/functions_support.c/block/argumentList_comma.tpl: -------------------------------------------------------------------------------- 1 | <$if concat(arg.name)$><$argCopy_name : join(, )$>, <$if ellipsis$>args_copy, <$endif$><$endif$> -------------------------------------------------------------------------------- /sources/templates/functions_support.c/block/argumentSpec.tpl: -------------------------------------------------------------------------------- 1 | <$if concat(arg.name)$><$arg : join(, )$><$if ellipsis$>, ...<$endif$><$else$>void<$endif$> -------------------------------------------------------------------------------- /sources/templates/functions_support.c/block/argumentSpec_comma.tpl: -------------------------------------------------------------------------------- 1 | <$if concat(arg.name)$><$arg : join(, )$>, <$if ellipsis$>va_list args, <$endif$><$endif$> -------------------------------------------------------------------------------- /sources/templates/functions_support.c/block/argumentSpec_effective.tpl: -------------------------------------------------------------------------------- 1 | <$if concat(arg.name)$><$arg : join(, )$><$if ellipsis$>, va_list args<$endif$><$else$>void<$endif$> -------------------------------------------------------------------------------- /sources/templates/functions_support.c/document/intermediate_impl.tpl: -------------------------------------------------------------------------------- 1 | { 2 | .orig = (void*)<$function.name$>, 3 | .intermediate = (void*)kedr_intermediate_func_<$function.name$>, 4 | .info = &kedr_intermediate_info_<$function.name$> 5 | }, 6 | -------------------------------------------------------------------------------- /sources/templates/payload_callm.c/block/arg.tpl: -------------------------------------------------------------------------------- 1 | <$arg.type$> <$arg.name$> 2 | -------------------------------------------------------------------------------- /sources/templates/payload_callm.c/block/argumentSpec_comma.tpl: -------------------------------------------------------------------------------- 1 | <$if concat(arg.name)$><$arg : join(, )$>, <$if ellipsis$>va_list args, <$endif$><$endif$> 2 | -------------------------------------------------------------------------------- /sources/templates/payload_callm.c/block/entryAssign.tpl: -------------------------------------------------------------------------------- 1 | __entry.<$trace.param.name$> = <$trace.param.name$>; 2 | -------------------------------------------------------------------------------- /sources/templates/payload_callm.c/block/entryField.tpl: -------------------------------------------------------------------------------- 1 | <$trace.param.type$> <$trace.param.name$>; -------------------------------------------------------------------------------- /sources/templates/payload_callm.c/block/entryItem.tpl: -------------------------------------------------------------------------------- 1 | __entry-><$trace.param.name$> -------------------------------------------------------------------------------- /sources/templates/payload_callm.c/block/traceArgument.tpl: -------------------------------------------------------------------------------- 1 | <$trace.param.type$> <$trace.param.name$> -------------------------------------------------------------------------------- /sources/templates/payload_callm.c/block/traceParamCast.tpl: -------------------------------------------------------------------------------- 1 | (<$trace.param.type$>)<$trace.param.name$> -------------------------------------------------------------------------------- /sources/templates/payload_callm.c/document/postPair_comma.tpl: -------------------------------------------------------------------------------- 1 | #ifdef KEDR_POST_<$function.name$> 2 | { 3 | .orig = (void*)&<$function.name$>, 4 | .post = (void*)&kedr_post_<$function.name$> 5 | }, 6 | #endif 7 | -------------------------------------------------------------------------------- /sources/templates/payload_callm.c/document/prePair_comma.tpl: -------------------------------------------------------------------------------- 1 | #ifdef KEDR_PRE_<$function.name$> 2 | { 3 | .orig = (void*)&<$function.name$>, 4 | .pre = (void*)&kedr_pre_<$function.name$> 5 | }, 6 | #endif 7 | -------------------------------------------------------------------------------- /sources/templates/payload_fsim.c/block/arg.tpl: -------------------------------------------------------------------------------- 1 | <$arg.type$> <$arg.name$> -------------------------------------------------------------------------------- /sources/templates/payload_fsim.c/block/argCopy_declare.tpl: -------------------------------------------------------------------------------- 1 | <$arg.type$> <$argCopy_name$> = <$arg.name$>; -------------------------------------------------------------------------------- /sources/templates/payload_fsim.c/block/argCopy_name.tpl: -------------------------------------------------------------------------------- 1 | <$arg.name$>_copy -------------------------------------------------------------------------------- /sources/templates/payload_fsim.c/block/argsCopy_declare.tpl: -------------------------------------------------------------------------------- 1 | <$if concat(arg.name)$> <$if ellipsis$>va_list args_copy; 2 | <$endif$><$if args_copy_declare_and_init$><$args_copy_declare_and_init$> 3 | <$else$><$argCopy_declare: join(\n )$> 4 | <$endif$><$if ellipsis$>va_copy(args_copy, args); 5 | <$endif$><$endif$> -------------------------------------------------------------------------------- /sources/templates/payload_fsim.c/block/argsCopy_finalize.tpl: -------------------------------------------------------------------------------- 1 | <$if concat(arg.name)$><$if ellipsis$> va_end(args_copy); 2 | <$endif$><$if args_copy_destroy$> <$args_copy_destroy$> 3 | <$endif$><$endif$> -------------------------------------------------------------------------------- /sources/templates/payload_fsim.c/block/argumentList.tpl: -------------------------------------------------------------------------------- 1 | <$if concat(arg.name)$><$argCopy_name : join(, )$><$if ellipsis$>, args_copy<$endif$><$endif$> -------------------------------------------------------------------------------- /sources/templates/payload_fsim.c/block/argumentList_comma.tpl: -------------------------------------------------------------------------------- 1 | <$if concat(arg.name)$><$argCopy_name : join(, )$>, <$if ellipsis$>args_copy, <$endif$><$endif$> -------------------------------------------------------------------------------- /sources/templates/payload_fsim.c/block/argumentSpec_comma.tpl: -------------------------------------------------------------------------------- 1 | <$if concat(arg.name)$><$arg : join(, )$>, <$if ellipsis$>va_list args, <$endif$><$endif$> -------------------------------------------------------------------------------- /sources/templates/payload_fsim.c/block/argumentSpec_effective.tpl: -------------------------------------------------------------------------------- 1 | <$if concat(arg.name)$><$arg : join(, )$><$if ellipsis$>, va_list args<$endif$><$else$>void<$endif$> -------------------------------------------------------------------------------- /sources/templates/payload_fsim.c/block/fsimDataMember.tpl: -------------------------------------------------------------------------------- 1 | <$fpoint.param.type$> <$fpoint.param.name$>; -------------------------------------------------------------------------------- /sources/templates/payload_fsim.c/block/fsimDataMemberInitialize.tpl: -------------------------------------------------------------------------------- 1 | fsim_point_data.<$fpoint.param.name$> = (<$fpoint.param.type$>) <$fpoint.param.name$>; -------------------------------------------------------------------------------- /sources/templates/payload_fsim.c/block/messageParam.tpl: -------------------------------------------------------------------------------- 1 | (<$message.param.type$>) <$message.param.name$> -------------------------------------------------------------------------------- /sources/templates/payload_fsim.c/block/point_name.tpl: -------------------------------------------------------------------------------- 1 | <$if fpoint.reuse_point$><$fpoint.reuse_point$><$else$><$if fpoint.rename$><$fpoint.rename$><$else$><$function.name$><$endif$><$endif$> -------------------------------------------------------------------------------- /sources/templates/payload_fsim.c/document/replFunctionAddress.tpl: -------------------------------------------------------------------------------- 1 | (void*)&repl_<$function.name$> -------------------------------------------------------------------------------- /sources/templates/payload_fsim.c/document/replacePair_comma.tpl: -------------------------------------------------------------------------------- 1 | { 2 | .orig = (void*)&<$function.name$>, 3 | .replace = (void*)&kedr_repl_<$function.name$> 4 | }, -------------------------------------------------------------------------------- /sources/templates/payload_fsim.c/document/simPointAttributes.tpl: -------------------------------------------------------------------------------- 1 | #ifdef fsim_point_attributes_<$function.name$> 2 | fsim_point_attributes_<$function.name$>, 3 | #endif /* fsim_point_attributes_<$function.name$> */ -------------------------------------------------------------------------------- /sources/templates/payload_fsim.c/document/targetFunctionAddress.tpl: -------------------------------------------------------------------------------- 1 | (void*)&<$function.name$> -------------------------------------------------------------------------------- /sources/templates/payload_fsim_add_caller_address.data/block/argDefinition.tpl: -------------------------------------------------------------------------------- 1 | arg.type = <$arg.type$> 2 | arg.name = <$arg.name$> -------------------------------------------------------------------------------- /sources/templates/payload_fsim_add_caller_address.data/block/epilogueSection.tpl: -------------------------------------------------------------------------------- 1 | epilogue =>> 2 | <$epilogue: join(\n)$> 3 | << -------------------------------------------------------------------------------- /sources/templates/payload_fsim_add_caller_address.data/block/fpointParam.tpl: -------------------------------------------------------------------------------- 1 | fpoint.param.type = <$fpoint.param.type$> 2 | fpoint.param.name = <$fpoint.param.name$> -------------------------------------------------------------------------------- /sources/templates/payload_fsim_add_caller_address.data/block/messageParamDefinition.tpl: -------------------------------------------------------------------------------- 1 | message.param.type = <$message.param.type$> 2 | message.param.name = <$message.param.name$> -------------------------------------------------------------------------------- /sources/templates/payload_fsim_add_caller_address.data/block/prologueSection.tpl: -------------------------------------------------------------------------------- 1 | prologue =>> 2 | <$prologue: join(\n)$> 3 | << -------------------------------------------------------------------------------- /sources/templates/payload_fsim_add_caller_address.data/document/document.tpl: -------------------------------------------------------------------------------- 1 | module.name = <$module.name$> 2 | 3 | module.author = <$module.author$> 4 | 5 | module.license = <$module.license$> 6 | 7 | <$if concat(header)$><$headerSection: join(\n)$> 8 | 9 | <$endif$><$if concat(function.name)$><$block: join(\n)$> 10 | 11 | <$endif$> -------------------------------------------------------------------------------- /sources/templates/payload_fsim_add_caller_address.data/document/headerSection.tpl: -------------------------------------------------------------------------------- 1 | header =>> 2 | <$header$> 3 | << -------------------------------------------------------------------------------- /sources/templates/payload_leak_check.c/block/arg.tpl: -------------------------------------------------------------------------------- 1 | <$arg.type$> <$arg.name$> -------------------------------------------------------------------------------- /sources/templates/payload_leak_check.c/block/argumentSpec_comma.tpl: -------------------------------------------------------------------------------- 1 | <$if concat(arg.name)$><$arg : join(, )$>, <$if ellipsis$>va_list args, <$endif$><$endif$> 2 | -------------------------------------------------------------------------------- /sources/templates/payload_leak_check.c/document/postPair.tpl: -------------------------------------------------------------------------------- 1 | #ifdef KEDR_LEAK_CHECK_POST_<$function.name$> 2 | { 3 | .orig = (void*)&<$function.name$>, 4 | .post = (void*)&post_<$function.name$> 5 | }, 6 | #endif 7 | -------------------------------------------------------------------------------- /sources/templates/payload_leak_check.c/document/prePair.tpl: -------------------------------------------------------------------------------- 1 | #ifdef KEDR_LEAK_CHECK_PRE_<$function.name$> 2 | { 3 | .orig = (void*)&<$function.name$>, 4 | .pre = (void*)&pre_<$function.name$> 5 | }, 6 | #endif 7 | -------------------------------------------------------------------------------- /sources/tests/calculator/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(CALCULATOR_SOURCE_DIR "${CMAKE_SOURCE_DIR}/calculator") 2 | 3 | add_subdirectory(calc_test_simple) 4 | add_subdirectory(calc_test_vars) 5 | add_subdirectory(calc_test_var_names) 6 | add_subdirectory(calc_test_weak_vars) 7 | -------------------------------------------------------------------------------- /sources/tests/control_file/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(module_name "kedr_control_file_test_module") 2 | 3 | # Currently, only try to build module which use control file architecture 4 | kbuild_add_module(${module_name} module.c control_file.c) 5 | 6 | rule_copy_file("${CMAKE_CURRENT_BINARY_DIR}/control_file.c" 7 | "${CMAKE_SOURCE_DIR}/control_file/control_file.c") 8 | 9 | kedr_test_install_module(${module_name}) 10 | -------------------------------------------------------------------------------- /sources/tests/core/Readme.txt: -------------------------------------------------------------------------------- 1 | Here is the place for the tests for the particular component of the system 2 | ("local" tests). 3 | 4 | Note that the line between "global" and "local" tests is often not very 5 | clear, the distinction is made just for convenience. 6 | -------------------------------------------------------------------------------- /sources/tests/core/components/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(arch_dir "arch/${Kbuild_ARCH}") 2 | kbuild_include_directories(${CORE_SOURCE_DIR}) 3 | 4 | add_subdirectory(base) 5 | add_subdirectory(instrumentor) 6 | add_subdirectory(functions_support) 7 | add_subdirectory(target_detector) 8 | 9 | -------------------------------------------------------------------------------- /sources/tests/core/components/base/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_subdirectory(use_payload) 2 | add_subdirectory(use_several_payloads) -------------------------------------------------------------------------------- /sources/tests/core/components/base/use_payload/test.sh.in: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | 3 | base_module_name=@base_module_name@ 4 | base_module="${base_module_name}.ko" 5 | 6 | if ! @INSMOD@ "${base_module}"; then 7 | printf "Loading of testing module was failed.\n" 8 | exit 1 9 | fi 10 | 11 | if ! @RMMOD@ "${base_module_name}"; then 12 | printf "Failed to unload test module.\n" 13 | exit 1 14 | fi 15 | -------------------------------------------------------------------------------- /sources/tests/core/components/base/use_several_payloads/interception_info_verificator/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | kbuild_add_module(${verificator_module_name} 2 | "verificator.c" 3 | ) 4 | kbuild_link_module(${verificator_module_name} ${base_module_name}) 5 | 6 | kedr_test_install_module(${verificator_module_name}) 7 | -------------------------------------------------------------------------------- /sources/tests/core/components/base/use_several_payloads/payload1/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | kbuild_add_module(${payload_module1_name} 2 | "payload.c" 3 | ) 4 | kbuild_link_module(${payload_module1_name} ${base_module_name}) 5 | 6 | kedr_test_install_module(${payload_module1_name}) 7 | -------------------------------------------------------------------------------- /sources/tests/core/components/base/use_several_payloads/payload2/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | kbuild_add_module(${payload_module2_name} 2 | "payload.c" 3 | ) 4 | kbuild_link_module(${payload_module2_name} ${base_module_name}) 5 | 6 | kedr_test_install_module(${payload_module2_name}) 7 | -------------------------------------------------------------------------------- /sources/tests/core/components/base/use_several_payloads/payload3/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | kbuild_add_module(${payload_module3_name} 2 | "payload.c" 3 | ) 4 | 5 | kbuild_link_module(${payload_module3_name} ${base_module_name}) 6 | 7 | kedr_test_install_module(${payload_module3_name}) -------------------------------------------------------------------------------- /sources/tests/core/components/functions_support/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_subdirectory(use_support) 2 | add_subdirectory(use_support_overlapped) -------------------------------------------------------------------------------- /sources/tests/core/components/instrumentor/instrumentor_module.h: -------------------------------------------------------------------------------- 1 | #ifndef KEDR_INSTRUMENTOR_MODULE_H 2 | #define KEDR_INSTRUMENTOR_MODULE_H 3 | 4 | void test_function(int value); 5 | 6 | #endif 7 | -------------------------------------------------------------------------------- /sources/tests/core/components/instrumentor/test_module/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | kbuild_add_module(${test_module_name} 2 | "test_module.c" 3 | ) 4 | kbuild_link_module(${test_module_name} ${instrumentor_module_name}) 5 | 6 | kedr_test_install_module(${test_module_name}) -------------------------------------------------------------------------------- /sources/tests/core/components/target_detector/test_module/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | kbuild_add_module(${test_module_name} 2 | "test_module.c" 3 | ) 4 | kbuild_link_module(${test_module_name} ${target_detector_module_name}) 5 | 6 | kedr_test_install_module(${test_module_name}) -------------------------------------------------------------------------------- /sources/tests/core/components/target_detector/test_module/test_module.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | MODULE_AUTHOR("Tsyvarev Andrey"); 5 | MODULE_LICENSE("GPL"); 6 | 7 | static int __init 8 | test_module_init(void) 9 | { 10 | return 0; 11 | } 12 | 13 | static void __exit 14 | test_module_exit(void) 15 | { 16 | } 17 | 18 | module_init(test_module_init); 19 | module_exit(test_module_exit); -------------------------------------------------------------------------------- /sources/tests/core/payload_api/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_subdirectory (in_init) 2 | add_subdirectory (register) 3 | add_subdirectory (basics) 4 | -------------------------------------------------------------------------------- /sources/tests/core/payload_api/basics/payload/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(KMODULE_NAME "test_basics_payload") 2 | 3 | kbuild_add_module(${KMODULE_NAME} 4 | "payload.c" 5 | "functions_support.c" 6 | ) 7 | kbuild_link_module(${KMODULE_NAME} kedr) 8 | 9 | kedr_generate("functions_support.c" "functions.data" 10 | "${KEDR_GEN_TEMPLATES_DIR}/functions_support.c") 11 | 12 | kedr_test_install_module (${KMODULE_NAME}) 13 | -------------------------------------------------------------------------------- /sources/tests/core/payload_api/basics/payload/functions.data: -------------------------------------------------------------------------------- 1 | header =>> 2 | #include 3 | << 4 | 5 | [group] 6 | function.name = __kmalloc 7 | returnType = void* 8 | 9 | arg.type = size_t 10 | arg.name = size 11 | 12 | arg.type = gfp_t 13 | arg.name = flags 14 | 15 | -------------------------------------------------------------------------------- /sources/tests/core/payload_api/basics/payload_event_recorder/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(KMODULE_NAME "test_payload_event_recorder") 2 | 3 | kbuild_add_module(${KMODULE_NAME} 4 | "payload.c" 5 | "functions_support.c" 6 | ) 7 | kbuild_link_module(${KMODULE_NAME} kedr) 8 | 9 | kedr_generate("functions_support.c" "functions.data" 10 | "${KEDR_GEN_TEMPLATES_DIR}/functions_support.c") 11 | 12 | kedr_test_install_module (${KMODULE_NAME}) 13 | -------------------------------------------------------------------------------- /sources/tests/core/payload_api/basics/payload_event_recorder/functions.data: -------------------------------------------------------------------------------- 1 | header =>> 2 | #include 3 | << 4 | 5 | [group] 6 | function.name = __kmalloc 7 | returnType = void* 8 | 9 | arg.type = size_t 10 | arg.name = size 11 | 12 | arg.type = gfp_t 13 | arg.name = flags 14 | 15 | -------------------------------------------------------------------------------- /sources/tests/core/payload_api/basics/target-with-dashes/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(KMODULE_NAME "test_target-with-dashes") 2 | 3 | kbuild_include_directories ("${CMAKE_CURRENT_SOURCE_DIR}") 4 | kbuild_add_module(${KMODULE_NAME} 5 | "target.c" 6 | ) 7 | 8 | kedr_test_install_module (${KMODULE_NAME}) 9 | -------------------------------------------------------------------------------- /sources/tests/core/payload_api/basics/target_init_fail/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(KMODULE_NAME "test_target_init_fail") 2 | 3 | kbuild_include_directories ("${CMAKE_CURRENT_SOURCE_DIR}") 4 | kbuild_add_module(${KMODULE_NAME} 5 | "target.c" 6 | ) 7 | 8 | kedr_test_install_module (${KMODULE_NAME}) 9 | -------------------------------------------------------------------------------- /sources/tests/core/payload_api/basics/target_normal/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(KMODULE_NAME "test_target_normal") 2 | 3 | kbuild_include_directories ("${CMAKE_CURRENT_SOURCE_DIR}") 4 | kbuild_add_module(${KMODULE_NAME} 5 | "target.c" 6 | ) 7 | 8 | kedr_test_install_module (${KMODULE_NAME}) 9 | -------------------------------------------------------------------------------- /sources/tests/core/payload_api/in_init/payload/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(KMODULE_NAME "test_in_init_payload") 2 | 3 | kbuild_add_module(${KMODULE_NAME} 4 | "payload.c" 5 | "functions_support.c" 6 | ) 7 | kbuild_link_module(${KMODULE_NAME} kedr) 8 | 9 | kedr_generate("functions_support.c" "functions.data" 10 | "${KEDR_GEN_TEMPLATES_DIR}/functions_support.c") 11 | 12 | kedr_test_install_module(${KMODULE_NAME}) 13 | -------------------------------------------------------------------------------- /sources/tests/core/payload_api/in_init/payload/functions.data: -------------------------------------------------------------------------------- 1 | header =>> 2 | #include 3 | << 4 | 5 | [group] 6 | function.name = __kmalloc 7 | returnType = void* 8 | 9 | arg.type = size_t 10 | arg.name = size 11 | 12 | arg.type = gfp_t 13 | arg.name = flags 14 | 15 | -------------------------------------------------------------------------------- /sources/tests/core/payload_api/in_init/target/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(KMODULE_NAME "test_in_init_target") 2 | 3 | kbuild_add_module(${KMODULE_NAME} 4 | "test_in_init_target.c" 5 | ) 6 | 7 | kedr_test_install_module (${KMODULE_NAME}) 8 | -------------------------------------------------------------------------------- /sources/tests/core/payload_api/register/payload/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(KMODULE_NAME "test_reg_payload") 2 | 3 | kbuild_add_module(${KMODULE_NAME} 4 | "payload.c" 5 | "functions_support.c" 6 | ) 7 | kbuild_link_module(${KMODULE_NAME} kedr) 8 | 9 | kedr_generate("functions_support.c" "functions.data" 10 | "${KEDR_GEN_TEMPLATES_DIR}/functions_support.c") 11 | 12 | kedr_test_install_module (${KMODULE_NAME}) 13 | -------------------------------------------------------------------------------- /sources/tests/core/payload_api/register/payload/functions.data: -------------------------------------------------------------------------------- 1 | header =>> 2 | #include 3 | << 4 | 5 | [group] 6 | function.name = __kmalloc 7 | returnType = void* 8 | 9 | arg.type = size_t 10 | arg.name = size 11 | 12 | arg.type = gfp_t 13 | arg.name = flags 14 | 15 | -------------------------------------------------------------------------------- /sources/tests/core/simple/simple_payload/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(KMODULE_NAME "simple_payload") 2 | 3 | kbuild_add_module(${KMODULE_NAME} 4 | "payload.c" 5 | "functions_support.c" 6 | ) 7 | 8 | kbuild_link_module(${KMODULE_NAME} kedr) 9 | 10 | kedr_generate("functions_support.c" "functions.data" 11 | "${KEDR_GEN_TEMPLATES_DIR}/functions_support.c") 12 | 13 | kedr_test_install_module(${KMODULE_NAME}) -------------------------------------------------------------------------------- /sources/tests/core/simple/simple_payload/functions.data: -------------------------------------------------------------------------------- 1 | header =>> 2 | #include 3 | << 4 | 5 | [group] 6 | function.name = __kmalloc 7 | returnType = void* 8 | 9 | arg.type = size_t 10 | arg.name = size 11 | 12 | arg.type = gfp_t 13 | arg.name = flags 14 | 15 | [group] 16 | function.name = kfree 17 | 18 | arg.type = void* 19 | arg.name = p 20 | 21 | -------------------------------------------------------------------------------- /sources/tests/examples/build_example.sh.in: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Usage: 4 | # [build_dir] 5 | 6 | example_location=@example_location@ 7 | 8 | 9 | if test $# -eq 0; then 10 | build_dir=build 11 | else 12 | build_dir=$1 13 | fi 14 | 15 | mkdir -p $build_dir 16 | 17 | cp -pr -t $build_dir $example_location/* 18 | 19 | if ! make -C $build_dir; then 20 | printf "Failed to build example\n" 21 | exit 1 22 | fi -------------------------------------------------------------------------------- /sources/tests/examples/custom_indicator_fsim/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Only check that example can be built. 2 | example_create_build_script("test.sh" custom_indicator_fsim) 3 | 4 | kedr_test_add_script("examples.custom_indicator_fsim.01" "test.sh") 5 | -------------------------------------------------------------------------------- /sources/tests/examples/custom_payload_callm/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Only check that example can be built. 2 | example_create_build_script("test.sh" custom_payload_callm) 3 | 4 | kedr_test_add_script("examples.custom_payload_callm.01" "test.sh") 5 | -------------------------------------------------------------------------------- /sources/tests/examples/custom_payload_fsim/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Only check that example can be built. 2 | example_create_build_script("test.sh" custom_payload_fsim) 3 | 4 | kedr_test_add_script("examples.custom_payload_fsim.01" "test.sh") 5 | -------------------------------------------------------------------------------- /sources/tests/examples/leak_check/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_subdirectory(annotations) 2 | # add_subdirectory(mempool_ops) -------------------------------------------------------------------------------- /sources/tests/examples/leak_check/annotations/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Only check that example can be built. 2 | example_create_build_script("test.sh" leak_check/annotations) 3 | 4 | kedr_test_add_script("examples.leak_check.annotations.01" "test.sh") 5 | -------------------------------------------------------------------------------- /sources/tests/examples/leak_check/mempool_ops/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Only check that example can be built. 2 | example_create_build_script("test.sh" leak_check/mempool_ops) 3 | 4 | kedr_test_add_script("examples.leak_check.mempool_ops.01" "test.sh") 5 | 6 | -------------------------------------------------------------------------------- /sources/tests/examples/sample_fsim_payload/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Actually, this example is also built in sample_fsim/ test. 2 | # But keep this test for better tests traceability. 3 | 4 | # Only check that example can be built. 5 | example_create_build_script("test.sh" sample_fsim_payload) 6 | 7 | # The test hangs the system. Until someone digs into it and fixes it, 8 | # I have disabled the test. 9 | # kedr_test_add_script("examples.sample_fsim_payload.01" "test.sh") 10 | -------------------------------------------------------------------------------- /sources/tests/examples/sample_indicator/module/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Name of the module to create 2 | set(kmodule_name "kedr_sample_indicator_test_module") 3 | 4 | kbuild_add_module(${kmodule_name} "module.c") 5 | kbuild_link_module(${kmodule_name} kedr_fault_simulation) 6 | 7 | kedr_test_install_module(${kmodule_name}) -------------------------------------------------------------------------------- /sources/tests/fault_indicators/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_subdirectory(final_template) 2 | add_subdirectory(common) -------------------------------------------------------------------------------- /sources/tests/fault_indicators/common/get_caller_address/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(kmodule_name "get_caller_address") 2 | 3 | kbuild_add_module(${kmodule_name} 4 | "payload.c" 5 | "functions_support.c" 6 | ) 7 | 8 | kbuild_link_module(${kmodule_name} kedr) 9 | 10 | kedr_generate("functions_support.c" "functions_support.data" 11 | "${KEDR_GEN_TEMPLATES_DIR}/functions_support.c") 12 | 13 | kedr_test_install_module(${kmodule_name}) -------------------------------------------------------------------------------- /sources/tests/fault_indicators/common/get_caller_address/functions_support.data: -------------------------------------------------------------------------------- 1 | # Detect call to __kmalloc() 2 | 3 | header =>> 4 | #include 5 | << 6 | 7 | [group] 8 | function.name = __kmalloc 9 | returnType = void* 10 | 11 | # Names and types of the arguments of the target function 12 | arg.type = size_t 13 | arg.name = size 14 | 15 | arg.type = gfp_t 16 | arg.name = flags 17 | -------------------------------------------------------------------------------- /sources/tests/fault_indicators/common/module/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(kmodule_name "kedr_indicator_common_test_module") 2 | 3 | kbuild_add_module(${kmodule_name} "module.c") 4 | 5 | kbuild_link_module(${kmodule_name} kedr_fault_simulation) 6 | 7 | kedr_test_install_module(${kmodule_name}) 8 | -------------------------------------------------------------------------------- /sources/tests/fault_indicators/common/target_caller_address/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(kmodule_name "target_caller_address") 2 | 3 | kbuild_add_module(${kmodule_name} "target.c") 4 | 5 | kedr_test_install_module(${kmodule_name}) -------------------------------------------------------------------------------- /sources/tests/fault_indicators/final_template/README: -------------------------------------------------------------------------------- 1 | Here are tests for correctness of final template for indicator. 2 | 3 | That is, that internal data files are transformed into the correct indicator module, with correct behaviour. -------------------------------------------------------------------------------- /sources/tests/fault_indicators/final_template/cascade_simulate/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | #name of module created 2 | set(kmodule_name "kedr_test_indicator_cascade_simulate") 3 | 4 | add_test_indicator(${kmodule_name}) 5 | 6 | configure_file("${CMAKE_CURRENT_SOURCE_DIR}/test.sh.in" 7 | "${CMAKE_CURRENT_BINARY_DIR}/test.sh" 8 | @ONLY 9 | ) 10 | 11 | kedr_test_add_script(fault_simulation_indicator_template.cascade_simulate.01 12 | "test.sh" 13 | ) 14 | -------------------------------------------------------------------------------- /sources/tests/fault_indicators/final_template/cascade_simulate_complex/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | #name of module created 2 | set(kmodule_name "kedr_test_indicator_cascade_simulate_complex") 3 | 4 | add_test_indicator(${kmodule_name}) 5 | 6 | configure_file("${CMAKE_CURRENT_SOURCE_DIR}/test.sh.in" 7 | "${CMAKE_CURRENT_BINARY_DIR}/test.sh" 8 | @ONLY) 9 | 10 | kedr_test_add_script(fault_simulation_indicator_template.cascade_simulate_complex.01 11 | "test.sh") -------------------------------------------------------------------------------- /sources/tests/fault_indicators/final_template/fail_with_even_instances/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | #name of module created 2 | set(kmodule_name "kedr_test_indicator_even_instances") 3 | 4 | add_test_indicator(${kmodule_name}) 5 | 6 | configure_file("${CMAKE_CURRENT_SOURCE_DIR}/test.sh.in" 7 | "${CMAKE_CURRENT_BINARY_DIR}/test.sh" 8 | @ONLY) 9 | 10 | kedr_test_add_script(fault_simulation_indicator_template.with_init_destroy.01 11 | "test.sh") -------------------------------------------------------------------------------- /sources/tests/fault_indicators/final_template/module/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | #name of module created 2 | set(kmodule_name "kedr_indicator_internal_test_module") 3 | 4 | kbuild_add_module(${kmodule_name} "module.c") 5 | 6 | kbuild_link_module(${kmodule_name} kedr_fault_simulation) 7 | 8 | kedr_test_install_module(${kmodule_name}) -------------------------------------------------------------------------------- /sources/tests/fault_indicators/final_template/simulate_always/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | #name of module created 2 | set(kmodule_name "kedr_test_indicator_simulate_always") 3 | 4 | add_test_indicator(${kmodule_name}) 5 | 6 | configure_file("${CMAKE_CURRENT_SOURCE_DIR}/test.sh.in" 7 | "${CMAKE_CURRENT_BINARY_DIR}/test.sh" 8 | @ONLY 9 | ) 10 | 11 | kedr_test_add_script(fault_simulation_indicator_template.with_simulate.01 12 | "test.sh" 13 | ) -------------------------------------------------------------------------------- /sources/tests/fault_indicators/final_template/simulate_never/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | #name of module created 2 | set(kmodule_name "kedr_test_indicator_simulate_never") 3 | 4 | add_test_indicator(${kmodule_name}) 5 | 6 | configure_file("${CMAKE_CURRENT_SOURCE_DIR}/test.sh.in" 7 | "${CMAKE_CURRENT_BINARY_DIR}/test.sh" 8 | @ONLY 9 | ) 10 | 11 | kedr_test_add_script(fault_simulation_indicator_template.never.01 12 | "test.sh" 13 | ) 14 | -------------------------------------------------------------------------------- /sources/tests/fault_indicators/final_template/state_variable/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | #name of module created 2 | set(kmodule_name "kedr_test_indicator_every_second_call") 3 | 4 | add_test_indicator(${kmodule_name}) 5 | 6 | configure_file("${CMAKE_CURRENT_SOURCE_DIR}/test.sh.in" 7 | "${CMAKE_CURRENT_BINARY_DIR}/test.sh" 8 | @ONLY 9 | ) 10 | 11 | kedr_test_add_script(fault_simulation_indicator_template.with_state.01 12 | "test.sh" 13 | ) 14 | -------------------------------------------------------------------------------- /sources/tests/fault_indicators/final_template/with_file/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | #name of module created 2 | set(kmodule_name "kedr_test_indicator_file") 3 | 4 | add_test_indicator(${kmodule_name}) 5 | 6 | configure_file("${CMAKE_CURRENT_SOURCE_DIR}/test.sh.in" 7 | "${CMAKE_CURRENT_BINARY_DIR}/test.sh" 8 | @ONLY 9 | ) 10 | 11 | kedr_test_add_script(fault_simulation_indicator_template.file.01 12 | "test.sh" 13 | ) 14 | -------------------------------------------------------------------------------- /sources/tests/fault_indicators/final_template/with_parameter/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | #name of module created 2 | set(kmodule_name "kedr_test_indicator_with_parameter") 3 | 4 | add_test_indicator(${kmodule_name}) 5 | 6 | configure_file("${CMAKE_CURRENT_SOURCE_DIR}/test.sh.in" 7 | "${CMAKE_CURRENT_BINARY_DIR}/test.sh" 8 | @ONLY 9 | ) 10 | 11 | kedr_test_add_script(fault_simulation_indicator_template.with_parameter.01 12 | "test.sh" 13 | ) -------------------------------------------------------------------------------- /sources/tests/fault_indicators/final_template/with_ro_file/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | #name of module created 2 | set(kmodule_name "kedr_test_indicator_ro_file") 3 | 4 | add_test_indicator(${kmodule_name}) 5 | 6 | configure_file("${CMAKE_CURRENT_SOURCE_DIR}/test.sh.in" 7 | "${CMAKE_CURRENT_BINARY_DIR}/test.sh" 8 | @ONLY) 9 | 10 | kedr_test_add_script(fault_simulation_indicator_template.ro_file.01 11 | "test.sh") -------------------------------------------------------------------------------- /sources/tests/fault_simulation/common.h: -------------------------------------------------------------------------------- 1 | #define read_point_name "kedr point" 2 | #define write_point_name "kedr point with parameter" 3 | 4 | -------------------------------------------------------------------------------- /sources/tests/fault_simulation/indicators_simple/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | kbuild_add_module("fsim_test_indicators_simple" "module.c") 2 | kbuild_link_module("fsim_test_indicators_simple" kedr_fault_simulation) 3 | 4 | kedr_test_install_module("fsim_test_indicators_simple") -------------------------------------------------------------------------------- /sources/tests/fault_simulation/module_a/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | kbuild_add_module("fsim_test_module_a" "module_a.c") 2 | kbuild_link_module("fsim_test_module_a" kedr_fault_simulation) 3 | 4 | kedr_test_install_module("fsim_test_module_a") -------------------------------------------------------------------------------- /sources/tests/fault_simulation/module_b/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | kbuild_add_module("fsim_test_module_b" "module_b.c") 2 | kbuild_link_module("fsim_test_module_b" kedr_fault_simulation) 3 | 4 | kedr_test_install_module("fsim_test_module_b") -------------------------------------------------------------------------------- /sources/tests/global/Readme.txt: -------------------------------------------------------------------------------- 1 | Here is the place for the "global" tests. Such tests generally check 2 | several components each. 3 | 4 | Note that the line between "global" and "local" tests is often not very 5 | clear, the distinction is made just for convenience. 6 | -------------------------------------------------------------------------------- /sources/tests/global/call_int/capable/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | kedr_test_add_ci_test("capable" 2 | # Functions: 3 | "capable" 4 | ) -------------------------------------------------------------------------------- /sources/tests/global/call_int/capable/capable.trigger: -------------------------------------------------------------------------------- 1 | [group] 2 | function.name = capable 3 | trigger.code =>> 4 | capable(CAP_SYS_ADMIN); 5 | << 6 | -------------------------------------------------------------------------------- /sources/tests/global/call_int/capable/triggers_header.data: -------------------------------------------------------------------------------- 1 | # capable: header is not used but newline is necessary 2 | -------------------------------------------------------------------------------- /sources/tests/global/call_int/common_mm/__free_pages.trigger: -------------------------------------------------------------------------------- 1 | [group] 2 | function.name = __free_pages 3 | trigger.code =>> 4 | struct page *page = alloc_pages(GFP_KERNEL, 1); 5 | if (page) 6 | __free_pages(page, 1); 7 | << 8 | -------------------------------------------------------------------------------- /sources/tests/global/call_int/common_mm/__get_free_pages.trigger: -------------------------------------------------------------------------------- 1 | [group] 2 | function.name = __get_free_pages 3 | trigger.code =>> 4 | unsigned long addr = __get_free_pages(GFP_KERNEL, 4); 5 | free_pages(addr, 4); 6 | << 7 | -------------------------------------------------------------------------------- /sources/tests/global/call_int/common_mm/__kmalloc.trigger: -------------------------------------------------------------------------------- 1 | [group] 2 | # Name of the target function 3 | function.name = __kmalloc 4 | 5 | # The code to trigger a call to this function. 6 | trigger.code =>> 7 | size_t size = 20; 8 | void *p; 9 | p = __kmalloc(size, GFP_KERNEL); 10 | kfree(p); 11 | << 12 | ####################################################################### 13 | -------------------------------------------------------------------------------- /sources/tests/global/call_int/common_mm/__kmalloc_node.trigger: -------------------------------------------------------------------------------- 1 | [group] 2 | function.name = __kmalloc_node 3 | trigger.code =>> 4 | size_t size; 5 | void *p; 6 | size = 100; 7 | p = __kmalloc_node(size, GFP_KERNEL, numa_node_id()); 8 | kfree(p); 9 | << 10 | -------------------------------------------------------------------------------- /sources/tests/global/call_int/common_mm/__krealloc.trigger: -------------------------------------------------------------------------------- 1 | [group] 2 | function.name = __krealloc 3 | trigger.code =>> 4 | void* p = __krealloc(NULL, 100, GFP_KERNEL); 5 | kfree(p); 6 | << 7 | -------------------------------------------------------------------------------- /sources/tests/global/call_int/common_mm/alloc_pages_current.trigger: -------------------------------------------------------------------------------- 1 | [group] 2 | function.name = alloc_pages_current 3 | trigger.code =>> 4 | /* Request 2 pages (2^1) */ 5 | struct page *page = alloc_pages_current(GFP_KERNEL, 1); 6 | if (page) 7 | __free_pages(page, 1); 8 | << 9 | -------------------------------------------------------------------------------- /sources/tests/global/call_int/common_mm/alloc_pages_exact.trigger: -------------------------------------------------------------------------------- 1 | [group] 2 | function.name = alloc_pages_exact 3 | trigger.code =>> 4 | size_t size; 5 | void* p; 6 | size = 100; 7 | p = alloc_pages_exact(size, GFP_KERNEL); 8 | if (p) 9 | free_pages_exact(p, size); 10 | << 11 | -------------------------------------------------------------------------------- /sources/tests/global/call_int/common_mm/alloc_pages_exact_nid.trigger: -------------------------------------------------------------------------------- 1 | [group] 2 | function.name = alloc_pages_exact_nid 3 | trigger.code =>> 4 | size_t size; 5 | void* p; 6 | size = 100; 7 | p = alloc_pages_exact_nid(numa_node_id(), size, GFP_KERNEL); 8 | if (p) 9 | free_pages_exact(p, size); 10 | << 11 | -------------------------------------------------------------------------------- /sources/tests/global/call_int/common_mm/free_pages.trigger: -------------------------------------------------------------------------------- 1 | [group] 2 | function.name = free_pages 3 | trigger.code =>> 4 | unsigned long addr = __get_free_pages(GFP_KERNEL, 4); 5 | free_pages(addr, 4); 6 | << 7 | -------------------------------------------------------------------------------- /sources/tests/global/call_int/common_mm/free_pages_exact.trigger: -------------------------------------------------------------------------------- 1 | [group] 2 | function.name = free_pages_exact 3 | trigger.code =>> 4 | size_t size; 5 | void *p; 6 | size = 100; 7 | p = alloc_pages_exact(size, GFP_KERNEL); 8 | if (p) 9 | free_pages_exact(p, size); 10 | << 11 | -------------------------------------------------------------------------------- /sources/tests/global/call_int/common_mm/get_zeroed_page.trigger: -------------------------------------------------------------------------------- 1 | [group] 2 | function.name = get_zeroed_page 3 | trigger.code =>> 4 | unsigned long addr = get_zeroed_page(GFP_KERNEL); 5 | free_pages(addr, 0); 6 | << 7 | -------------------------------------------------------------------------------- /sources/tests/global/call_int/common_mm/kfree.trigger: -------------------------------------------------------------------------------- 1 | [group] 2 | # Name of the target function 3 | function.name = kfree 4 | 5 | # The code to trigger a call to this function. 6 | trigger.code =>> 7 | size_t size = 20; 8 | void *p; 9 | p = __kmalloc(size, GFP_KERNEL); 10 | kfree(p); 11 | << 12 | ####################################################################### 13 | -------------------------------------------------------------------------------- /sources/tests/global/call_int/common_mm/kmalloc_order_trace.trigger: -------------------------------------------------------------------------------- 1 | [group] 2 | function.name = kmalloc_order_trace 3 | trigger.code =>> 4 | size_t size; 5 | void *p; 6 | size = 100; 7 | p = kmalloc_order_trace(size, GFP_KERNEL, 1); 8 | kfree(p); 9 | << 10 | -------------------------------------------------------------------------------- /sources/tests/global/call_int/common_mm/krealloc.trigger: -------------------------------------------------------------------------------- 1 | [group] 2 | function.name = krealloc 3 | trigger.code =>> 4 | void* p = krealloc(NULL, 100, GFP_KERNEL); 5 | kfree(p); 6 | << 7 | -------------------------------------------------------------------------------- /sources/tests/global/call_int/common_mm/kzfree.trigger: -------------------------------------------------------------------------------- 1 | [group] 2 | function.name = kzfree 3 | trigger.code =>> 4 | void *p = kmalloc(100, GFP_KERNEL); 5 | kzfree(p); 6 | << 7 | -------------------------------------------------------------------------------- /sources/tests/global/call_int/common_mm/triggers_header.data: -------------------------------------------------------------------------------- 1 | # common_mm: header is not used but newline is necessary 2 | -------------------------------------------------------------------------------- /sources/tests/global/call_int/mem_util/kmemdup.trigger: -------------------------------------------------------------------------------- 1 | [group] 2 | function.name = kmemdup 3 | trigger.code =>> 4 | const char *orig_data = "Some data"; 5 | void *result = NULL; 6 | result = kmemdup(&orig_data[0], 2, GFP_KERNEL); 7 | kfree(result); 8 | << 9 | -------------------------------------------------------------------------------- /sources/tests/global/call_int/mem_util/kstrdup.trigger: -------------------------------------------------------------------------------- 1 | [group] 2 | function.name = kstrdup 3 | trigger.code =>> 4 | const char *orig_str = "Some string"; 5 | char *result_str = NULL; 6 | result_str = kstrdup(orig_str, GFP_KERNEL); 7 | kfree(result_str); 8 | << 9 | -------------------------------------------------------------------------------- /sources/tests/global/call_int/mem_util/kstrndup.trigger: -------------------------------------------------------------------------------- 1 | [group] 2 | function.name = kstrndup 3 | trigger.code =>> 4 | const char *orig_str = "Some string"; 5 | char *result_str = NULL; 6 | result_str = kstrndup(orig_str, 2, GFP_KERNEL); 7 | kfree(result_str); 8 | << 9 | -------------------------------------------------------------------------------- /sources/tests/global/call_int/mem_util/match_strdup.trigger: -------------------------------------------------------------------------------- 1 | [group] 2 | function.name = match_strdup 3 | trigger.code =>> 4 | char orig_data[] = "Some data"; 5 | substring_t substr; 6 | char *result = NULL; 7 | 8 | substr.from = &orig_data[1]; 9 | substr.to = &orig_data[4]; 10 | 11 | result = match_strdup(&substr); 12 | kfree(result); 13 | << 14 | -------------------------------------------------------------------------------- /sources/tests/global/call_int/mem_util/posix_acl_alloc.trigger: -------------------------------------------------------------------------------- 1 | [group] 2 | function.name = posix_acl_alloc 3 | trigger.code =>> 4 | struct posix_acl *acl; 5 | acl = posix_acl_alloc(1, GFP_KERNEL); 6 | if (acl) 7 | posix_acl_release(acl); 8 | << 9 | -------------------------------------------------------------------------------- /sources/tests/global/call_int/mem_util/posix_acl_chmod.trigger: -------------------------------------------------------------------------------- 1 | [group] 2 | function.name = posix_acl_chmod 3 | trigger.code =>> 4 | struct posix_acl *acl; 5 | acl = posix_acl_from_mode(S_IRWXU, GFP_KERNEL); 6 | if (!IS_ERR(acl)) { 7 | int err; 8 | umode_t mode = S_IRWXU; 9 | err = posix_acl_chmod(&acl, GFP_KERNEL, mode); 10 | if (err >= 0 && acl != NULL) 11 | posix_acl_release(acl); 12 | } 13 | << 14 | -------------------------------------------------------------------------------- /sources/tests/global/call_int/mem_util/posix_acl_clone.trigger: -------------------------------------------------------------------------------- 1 | [group] 2 | function.name = posix_acl_clone 3 | trigger.code =>> 4 | struct posix_acl *acl; 5 | struct posix_acl *cloned_acl; 6 | acl = posix_acl_alloc(1, GFP_KERNEL); 7 | if (acl) { 8 | cloned_acl = posix_acl_clone(acl, GFP_KERNEL); 9 | posix_acl_release(acl); 10 | if (cloned_acl) 11 | posix_acl_release(cloned_acl); 12 | } 13 | << 14 | -------------------------------------------------------------------------------- /sources/tests/global/call_int/mem_util/posix_acl_create.trigger: -------------------------------------------------------------------------------- 1 | [group] 2 | function.name = posix_acl_create 3 | trigger.code =>> 4 | struct posix_acl *acl; 5 | acl = posix_acl_from_mode(S_IRWXU, GFP_KERNEL); 6 | if (!IS_ERR(acl)) { 7 | int err; 8 | umode_t mode = S_IRWXU; 9 | err = posix_acl_create(&acl, GFP_KERNEL, &mode); 10 | if (err >= 0 && acl != NULL) 11 | posix_acl_release(acl); 12 | } 13 | << 14 | -------------------------------------------------------------------------------- /sources/tests/global/call_int/mem_util/posix_acl_from_mode.trigger: -------------------------------------------------------------------------------- 1 | [group] 2 | function.name = posix_acl_from_mode 3 | trigger.code =>> 4 | struct posix_acl *acl; 5 | acl = posix_acl_from_mode(S_IRWXU, GFP_KERNEL); 6 | if (!IS_ERR(acl)) 7 | posix_acl_release(acl); 8 | << 9 | -------------------------------------------------------------------------------- /sources/tests/global/call_int/mem_util/triggers_header.data: -------------------------------------------------------------------------------- 1 | header =>> 2 | /* 'kedr_foo' and 'trigger_rcu_callback' are used when triggering 3 | * call_rcu*() functions. */ 4 | struct kedr_foo 5 | { 6 | int bar_not_used; 7 | void *baz_not_used; 8 | struct rcu_head rcu_head; 9 | }; 10 | 11 | typedef void (*kedr_test_rcu_callback_type)(struct rcu_head *); 12 | << 13 | -------------------------------------------------------------------------------- /sources/tests/global/call_int/mutexes/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | kedr_test_add_ci_test("mutexes" 2 | # Functions: 3 | "__mutex_init" 4 | "mutex_lock" 5 | "mutex_lock_interruptible" 6 | "mutex_lock_killable" 7 | "mutex_trylock" 8 | "mutex_unlock" 9 | ) -------------------------------------------------------------------------------- /sources/tests/global/call_int/mutexes/__mutex_init.trigger: -------------------------------------------------------------------------------- 1 | [group] 2 | function.name = __mutex_init 3 | trigger.code =>> 4 | struct mutex m; 5 | mutex_init(&m); 6 | mutex_destroy(&m); 7 | << 8 | -------------------------------------------------------------------------------- /sources/tests/global/call_int/mutexes/mutex_lock.trigger: -------------------------------------------------------------------------------- 1 | [group] 2 | function.name = mutex_lock 3 | trigger.code =>> 4 | struct mutex m; 5 | mutex_init(&m); 6 | mutex_lock(&m); 7 | mutex_unlock(&m); 8 | mutex_destroy(&m); 9 | << 10 | -------------------------------------------------------------------------------- /sources/tests/global/call_int/mutexes/mutex_lock_interruptible.trigger: -------------------------------------------------------------------------------- 1 | [group] 2 | function.name = mutex_lock_interruptible 3 | trigger.code =>> 4 | struct mutex m; 5 | mutex_init(&m); 6 | if(!mutex_lock_interruptible(&m)) 7 | mutex_unlock(&m); 8 | mutex_destroy(&m); 9 | << 10 | -------------------------------------------------------------------------------- /sources/tests/global/call_int/mutexes/mutex_lock_killable.trigger: -------------------------------------------------------------------------------- 1 | [group] 2 | function.name = mutex_lock_killable 3 | trigger.code =>> 4 | struct mutex m; 5 | mutex_init(&m); 6 | if(!mutex_lock_killable(&m)) 7 | mutex_unlock(&m); 8 | mutex_destroy(&m); 9 | << 10 | -------------------------------------------------------------------------------- /sources/tests/global/call_int/mutexes/mutex_trylock.trigger: -------------------------------------------------------------------------------- 1 | [group] 2 | function.name = mutex_trylock 3 | trigger.code =>> 4 | struct mutex m; 5 | mutex_init(&m); 6 | if(mutex_trylock(&m)) 7 | mutex_unlock(&m); 8 | mutex_destroy(&m); 9 | << 10 | -------------------------------------------------------------------------------- /sources/tests/global/call_int/mutexes/mutex_unlock.trigger: -------------------------------------------------------------------------------- 1 | [group] 2 | function.name = mutex_unlock 3 | trigger.code =>> 4 | struct mutex m; 5 | mutex_init(&m); 6 | mutex_lock(&m); 7 | mutex_unlock(&m); 8 | mutex_destroy(&m); 9 | << 10 | -------------------------------------------------------------------------------- /sources/tests/global/call_int/mutexes/triggers_header.data: -------------------------------------------------------------------------------- 1 | # mutexes: header is not used but newline is necessary 2 | -------------------------------------------------------------------------------- /sources/tests/global/call_int/schedule/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | kedr_test_add_ci_test("schedule" 2 | # Functions: 3 | "schedule" 4 | "preempt_schedule" 5 | "_cond_resched" 6 | "schedule_timeout" 7 | "schedule_timeout_uninterruptible" 8 | "schedule_timeout_interruptible" 9 | "io_schedule" 10 | "cond_resched_lock" 11 | "__cond_resched_lock" 12 | ) 13 | -------------------------------------------------------------------------------- /sources/tests/global/call_int/schedule/__cond_resched_lock.trigger: -------------------------------------------------------------------------------- 1 | [group] 2 | function.name = __cond_resched_lock 3 | trigger.code =>> 4 | spinlock_t lock; 5 | spin_lock_init(&lock); 6 | spin_lock(&lock); 7 | cond_resched_lock(&lock); 8 | spin_unlock(&lock); 9 | << 10 | -------------------------------------------------------------------------------- /sources/tests/global/call_int/schedule/_cond_resched.trigger: -------------------------------------------------------------------------------- 1 | [group] 2 | function.name = _cond_resched 3 | trigger.code =>> 4 | _cond_resched(); 5 | << 6 | -------------------------------------------------------------------------------- /sources/tests/global/call_int/schedule/cond_resched_lock.trigger: -------------------------------------------------------------------------------- 1 | [group] 2 | function.name = cond_resched_lock 3 | trigger.code =>> 4 | spinlock_t lock; 5 | spin_lock_init(&lock); 6 | spin_lock(&lock); 7 | cond_resched_lock(&lock); 8 | spin_unlock(&lock); 9 | << 10 | -------------------------------------------------------------------------------- /sources/tests/global/call_int/schedule/io_schedule.trigger: -------------------------------------------------------------------------------- 1 | [group] 2 | function.name = io_schedule 3 | trigger.code =>> 4 | io_schedule(); 5 | << 6 | -------------------------------------------------------------------------------- /sources/tests/global/call_int/schedule/preempt_schedule.trigger: -------------------------------------------------------------------------------- 1 | [group] 2 | function.name = preempt_schedule 3 | trigger.code =>> 4 | preempt_schedule(); 5 | << 6 | -------------------------------------------------------------------------------- /sources/tests/global/call_int/schedule/schedule.trigger: -------------------------------------------------------------------------------- 1 | [group] 2 | function.name = schedule 3 | trigger.code =>> 4 | schedule(); 5 | << 6 | -------------------------------------------------------------------------------- /sources/tests/global/call_int/schedule/schedule_timeout.trigger: -------------------------------------------------------------------------------- 1 | [group] 2 | function.name = schedule_timeout 3 | trigger.code =>> 4 | schedule_timeout(1000); 5 | << 6 | -------------------------------------------------------------------------------- /sources/tests/global/call_int/schedule/schedule_timeout_interruptible.trigger: -------------------------------------------------------------------------------- 1 | [group] 2 | function.name = schedule_timeout_interruptible 3 | trigger.code =>> 4 | schedule_timeout_interruptible(1000); 5 | << 6 | -------------------------------------------------------------------------------- /sources/tests/global/call_int/schedule/schedule_timeout_uninterruptible.trigger: -------------------------------------------------------------------------------- 1 | [group] 2 | function.name = schedule_timeout_uninterruptible 3 | trigger.code =>> 4 | schedule_timeout_uninterruptible(1000); 5 | << 6 | -------------------------------------------------------------------------------- /sources/tests/global/call_int/schedule/triggers_header.data: -------------------------------------------------------------------------------- 1 | header =>> 2 | #include /* useful constants, etc. */ 3 | << 4 | -------------------------------------------------------------------------------- /sources/tests/global/call_int/spinlocks/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | kedr_test_add_ci_test("spinlocks" 2 | # Functions: 3 | "_spin_lock" 4 | "_raw_spin_lock" 5 | "_spin_lock_irq" 6 | "_raw_spin_lock_irq" 7 | "_spin_lock_irqsave" 8 | "_raw_spin_lock_irqsave" 9 | "_spin_unlock" 10 | "_raw_spin_unlock" 11 | "_spin_unlock_irq" 12 | "_raw_spin_unlock_irq" 13 | "_spin_unlock_irqrestore" 14 | "_raw_spin_unlock_irqrestore" 15 | ) 16 | -------------------------------------------------------------------------------- /sources/tests/global/call_int/spinlocks/_raw_spin_lock.trigger: -------------------------------------------------------------------------------- 1 | [group] 2 | function.name = _raw_spin_lock 3 | trigger.code =>> 4 | spinlock_t lock; 5 | spin_lock_init(&lock); 6 | spin_lock(&lock); 7 | spin_unlock(&lock); 8 | << 9 | -------------------------------------------------------------------------------- /sources/tests/global/call_int/spinlocks/_raw_spin_lock_irq.trigger: -------------------------------------------------------------------------------- 1 | [group] 2 | function.name = _raw_spin_lock_irq 3 | trigger.code =>> 4 | spinlock_t lock; 5 | spin_lock_init(&lock); 6 | spin_lock_irq(&lock); 7 | spin_unlock_irq(&lock); 8 | << 9 | -------------------------------------------------------------------------------- /sources/tests/global/call_int/spinlocks/_raw_spin_lock_irqsave.trigger: -------------------------------------------------------------------------------- 1 | [group] 2 | function.name = _raw_spin_lock_irqsave 3 | trigger.code =>> 4 | spinlock_t lock; 5 | unsigned long flags; 6 | spin_lock_init(&lock); 7 | spin_lock_irqsave(&lock, flags); 8 | spin_unlock_irqrestore(&lock, flags); 9 | << 10 | -------------------------------------------------------------------------------- /sources/tests/global/call_int/spinlocks/_raw_spin_unlock.trigger: -------------------------------------------------------------------------------- 1 | [group] 2 | function.name = _raw_spin_unlock 3 | trigger.code =>> 4 | spinlock_t lock; 5 | spin_lock_init(&lock); 6 | spin_lock(&lock); 7 | spin_unlock(&lock); 8 | << 9 | -------------------------------------------------------------------------------- /sources/tests/global/call_int/spinlocks/_raw_spin_unlock_irq.trigger: -------------------------------------------------------------------------------- 1 | [group] 2 | function.name = _raw_spin_unlock_irq 3 | trigger.code =>> 4 | spinlock_t lock; 5 | spin_lock_init(&lock); 6 | spin_lock_irq(&lock); 7 | spin_unlock_irq(&lock); 8 | << 9 | -------------------------------------------------------------------------------- /sources/tests/global/call_int/spinlocks/_raw_spin_unlock_irqrestore.trigger: -------------------------------------------------------------------------------- 1 | [group] 2 | function.name = _raw_spin_unlock_irqrestore 3 | trigger.code =>> 4 | spinlock_t lock; 5 | unsigned long flags; 6 | spin_lock_init(&lock); 7 | spin_lock_irqsave(&lock, flags); 8 | spin_unlock_irqrestore(&lock, flags); 9 | << 10 | -------------------------------------------------------------------------------- /sources/tests/global/call_int/spinlocks/_spin_lock.trigger: -------------------------------------------------------------------------------- 1 | [group] 2 | function.name = _spin_lock 3 | trigger.code =>> 4 | spinlock_t lock; 5 | spin_lock_init(&lock); 6 | spin_lock(&lock); 7 | spin_unlock(&lock); 8 | << 9 | -------------------------------------------------------------------------------- /sources/tests/global/call_int/spinlocks/_spin_lock_irq.trigger: -------------------------------------------------------------------------------- 1 | [group] 2 | function.name = _spin_lock_irq 3 | trigger.code =>> 4 | spinlock_t lock; 5 | spin_lock_init(&lock); 6 | spin_lock_irq(&lock); 7 | spin_unlock_irq(&lock); 8 | << 9 | -------------------------------------------------------------------------------- /sources/tests/global/call_int/spinlocks/_spin_lock_irqsave.trigger: -------------------------------------------------------------------------------- 1 | [group] 2 | function.name = _spin_lock_irqsave 3 | trigger.code =>> 4 | spinlock_t lock; 5 | unsigned long flags; 6 | spin_lock_init(&lock); 7 | spin_lock_irqsave(&lock, flags); 8 | spin_unlock_irqrestore(&lock, flags); 9 | << 10 | -------------------------------------------------------------------------------- /sources/tests/global/call_int/spinlocks/_spin_unlock.trigger: -------------------------------------------------------------------------------- 1 | [group] 2 | function.name = _spin_unlock 3 | trigger.code =>> 4 | spinlock_t lock; 5 | spin_lock_init(&lock); 6 | spin_lock(&lock); 7 | spin_unlock(&lock); 8 | << 9 | -------------------------------------------------------------------------------- /sources/tests/global/call_int/spinlocks/_spin_unlock_irq.trigger: -------------------------------------------------------------------------------- 1 | [group] 2 | function.name = _spin_unlock_irq 3 | trigger.code =>> 4 | spinlock_t lock; 5 | spin_lock_init(&lock); 6 | spin_lock_irq(&lock); 7 | spin_unlock_irq(&lock); 8 | << 9 | -------------------------------------------------------------------------------- /sources/tests/global/call_int/spinlocks/_spin_unlock_irqrestore.trigger: -------------------------------------------------------------------------------- 1 | [group] 2 | function.name = _spin_unlock_irqrestore 3 | trigger.code =>> 4 | spinlock_t lock; 5 | unsigned long flags; 6 | spin_lock_init(&lock); 7 | spin_lock_irqsave(&lock, flags); 8 | spin_unlock_irqrestore(&lock, flags); 9 | << 10 | -------------------------------------------------------------------------------- /sources/tests/global/call_int/spinlocks/triggers_header.data: -------------------------------------------------------------------------------- 1 | # spinlocks: header is not used but newline is necessary 2 | -------------------------------------------------------------------------------- /sources/tests/global/call_int/test_common/trigger_common_info.data.in: -------------------------------------------------------------------------------- 1 | trigger_name = @trigger_name@ 2 | kedr_module_name=@KEDR_CORE_NAME@ 3 | kedr_module_load_command=@KEDR_CORE_LOAD_COMMAND@ 4 | test_current_install_dir = @this_install_dir@ 5 | 6 | insmod_command=@INSMOD@ 7 | rmmod_command=@RMMOD@ 8 | -------------------------------------------------------------------------------- /sources/tests/global/call_int/test_common/trigger_payload/templates_trigger_payload.c/block/arg_def.tpl: -------------------------------------------------------------------------------- 1 | <$arg.type$> <$arg.name$> -------------------------------------------------------------------------------- /sources/tests/global/call_int/test_common/trigger_payload/templates_trigger_payload.c/block/block.tpl: -------------------------------------------------------------------------------- 1 | static void 2 | post_<$function.name$>(void /* arguments are not used */) 3 | { 4 | is_intercepted = 1; 5 | } 6 | -------------------------------------------------------------------------------- /sources/tests/global/call_int/test_common/trigger_payload/templates_trigger_payload.c/document/interception.tpl: -------------------------------------------------------------------------------- 1 | {"<$function.name$>", <$function.name$>, post_<$function.name$>}, -------------------------------------------------------------------------------- /sources/tests/global/call_int/test_common/trigger_target/templates_trigger_target.c/document/trigger.tpl: -------------------------------------------------------------------------------- 1 | trigger_<$function.name$>, -------------------------------------------------------------------------------- /sources/tests/global/call_int/test_common/trigger_target/templates_trigger_target.c/document/user_space_access.tpl: -------------------------------------------------------------------------------- 1 | <$if concat(trigger.copy_from_user)$>1<$else$><$if concat(trigger.copy_to_user)$>1<$endif$><$endif$> -------------------------------------------------------------------------------- /sources/tests/global/call_int/test_common/trigger_test/templates_trigger_test.sh/block/block.tpl: -------------------------------------------------------------------------------- 1 | <$function.name$>) 2 | <$if trigger.copy_to_user$>copy_to_user="yes" 3 | user_buffer_size=<$trigger.copy_to_user.buffer_size$> 4 | <$else$><$if trigger.copy_from_user$>copy_from_user="yes" 5 | user_buffer_size=<$trigger.copy_from_user.buffer_size$> 6 | <$endif$><$endif$>;; 7 | -------------------------------------------------------------------------------- /sources/tests/global/call_int/uaccess/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | kedr_test_add_ci_test("uaccess" 2 | # Functions: 3 | "copy_to_user" 4 | "_copy_to_user" 5 | "copy_from_user" 6 | "_copy_from_user" 7 | "strndup_user" 8 | "memdup_user" 9 | ) 10 | -------------------------------------------------------------------------------- /sources/tests/global/call_int/uaccess/_copy_to_user.trigger: -------------------------------------------------------------------------------- 1 | [group] 2 | function.name = _copy_to_user 3 | 4 | trigger.copy_to_user = yes 5 | trigger.copy_to_user.buffer_size = 1 6 | 7 | trigger.code =>> 8 | int result; 9 | //user_area - external pointer to user data, type 'void* __user' 10 | char buf[1] = {'c'}; 11 | 12 | result = copy_to_user(user_area, buf, sizeof(buf)); 13 | printk(KERN_DEBUG "[Test] copy_to_user: %d\n", result); 14 | << 15 | -------------------------------------------------------------------------------- /sources/tests/global/call_int/uaccess/copy_from_user.trigger: -------------------------------------------------------------------------------- 1 | [group] 2 | function.name = copy_from_user 3 | 4 | trigger.copy_from_user = yes 5 | trigger.copy_from_user.buffer_size = 1 6 | 7 | trigger.code =>> 8 | int result; 9 | //user_area - external pointer to user data, type 'void* __user' 10 | char buf[1]; 11 | 12 | result = copy_from_user(buf, user_area, sizeof(buf)); 13 | printk(KERN_DEBUG "[Test] copy_from_user: %d\n", result); 14 | << 15 | -------------------------------------------------------------------------------- /sources/tests/global/call_int/uaccess/copy_to_user.trigger: -------------------------------------------------------------------------------- 1 | [group] 2 | function.name = copy_to_user 3 | 4 | trigger.copy_to_user = yes 5 | trigger.copy_to_user.buffer_size = 1 6 | 7 | trigger.code =>> 8 | int result; 9 | //user_area - external pointer to user data, type 'void* __user' 10 | char buf[1] = {'c'}; 11 | 12 | result = copy_to_user(user_area, buf, sizeof(buf)); 13 | printk(KERN_DEBUG "[Test] copy_to_user: %d\n", result); 14 | << 15 | -------------------------------------------------------------------------------- /sources/tests/global/call_int/uaccess/triggers_header.data: -------------------------------------------------------------------------------- 1 | header =>> 2 | #include 3 | #include 4 | << 5 | -------------------------------------------------------------------------------- /sources/tests/global/call_int/virtual_mm/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | kedr_test_add_ci_test("virtual_mm" 2 | # Functions: 3 | "vmalloc" 4 | "__vmalloc" 5 | "vmalloc_user" 6 | "vmalloc_node" 7 | "vmalloc_32" 8 | "vmalloc_32_user" 9 | "vfree" 10 | "vzalloc" 11 | "vzalloc_node" 12 | ) 13 | -------------------------------------------------------------------------------- /sources/tests/global/call_int/virtual_mm/__vmalloc.trigger: -------------------------------------------------------------------------------- 1 | [group] 2 | function.name = __vmalloc 3 | trigger.code =>> 4 | void *p = __vmalloc(100, GFP_KERNEL | __GFP_HIGHMEM, PAGE_KERNEL); 5 | vfree(p); 6 | << 7 | -------------------------------------------------------------------------------- /sources/tests/global/call_int/virtual_mm/triggers_header.data: -------------------------------------------------------------------------------- 1 | header =>> 2 | #include /* NUMA-related stuff */ 3 | << 4 | -------------------------------------------------------------------------------- /sources/tests/global/call_int/virtual_mm/vfree.trigger: -------------------------------------------------------------------------------- 1 | [group] 2 | function.name = vfree 3 | trigger.code =>> 4 | void *p = vmalloc(100); 5 | vfree(p); 6 | << 7 | -------------------------------------------------------------------------------- /sources/tests/global/call_int/virtual_mm/vmalloc.trigger: -------------------------------------------------------------------------------- 1 | [group] 2 | function.name = vmalloc 3 | trigger.code =>> 4 | void *p = vmalloc(100); 5 | vfree(p); 6 | << 7 | -------------------------------------------------------------------------------- /sources/tests/global/call_int/virtual_mm/vmalloc_32.trigger: -------------------------------------------------------------------------------- 1 | [group] 2 | function.name = vmalloc_32 3 | trigger.code =>> 4 | void *p = vmalloc_32(100); 5 | vfree(p); 6 | << 7 | -------------------------------------------------------------------------------- /sources/tests/global/call_int/virtual_mm/vmalloc_32_user.trigger: -------------------------------------------------------------------------------- 1 | [group] 2 | function.name = vmalloc_32_user 3 | trigger.code =>> 4 | void *p = vmalloc_32_user(100); 5 | vfree(p); 6 | << 7 | -------------------------------------------------------------------------------- /sources/tests/global/call_int/virtual_mm/vmalloc_node.trigger: -------------------------------------------------------------------------------- 1 | [group] 2 | function.name = vmalloc_node 3 | trigger.code =>> 4 | void *p = vmalloc_node(100, numa_node_id()); 5 | vfree(p); 6 | << 7 | -------------------------------------------------------------------------------- /sources/tests/global/call_int/virtual_mm/vmalloc_user.trigger: -------------------------------------------------------------------------------- 1 | [group] 2 | function.name = vmalloc_user 3 | trigger.code =>> 4 | void *p = vmalloc_user(100); 5 | vfree(p); 6 | << 7 | -------------------------------------------------------------------------------- /sources/tests/global/call_int/virtual_mm/vzalloc.trigger: -------------------------------------------------------------------------------- 1 | [group] 2 | function.name = vzalloc 3 | trigger.code =>> 4 | void *p = vzalloc(100); 5 | vfree(p); 6 | << 7 | -------------------------------------------------------------------------------- /sources/tests/global/call_int/virtual_mm/vzalloc_node.trigger: -------------------------------------------------------------------------------- 1 | [group] 2 | function.name = vzalloc_node 3 | trigger.code =>> 4 | void *p = vzalloc_node(100, numa_node_id()); 5 | vfree(p); 6 | << 7 | -------------------------------------------------------------------------------- /sources/tests/global/call_int/waitqueue/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | kedr_test_add_ci_test("waitqueue" 2 | # Functions: 3 | "__wake_up" 4 | "init_waitqueue_head" 5 | "__init_waitqueue_head" 6 | "prepare_to_wait" 7 | "finish_wait" 8 | "remove_wait_queue" 9 | "add_wait_queue" 10 | "add_wait_queue_exclusive" 11 | ) 12 | -------------------------------------------------------------------------------- /sources/tests/global/call_int/waitqueue/__init_waitqueue_head.trigger: -------------------------------------------------------------------------------- 1 | [group] 2 | function.name = __init_waitqueue_head 3 | trigger.code =>> 4 | wait_queue_head_t q; 5 | init_waitqueue_head(&q); 6 | << 7 | -------------------------------------------------------------------------------- /sources/tests/global/call_int/waitqueue/__wake_up.trigger: -------------------------------------------------------------------------------- 1 | [group] 2 | function.name = __wake_up 3 | trigger.code =>> 4 | wait_queue_head_t q; 5 | init_waitqueue_head(&q); 6 | wake_up(&q); 7 | << 8 | -------------------------------------------------------------------------------- /sources/tests/global/call_int/waitqueue/add_wait_queue.trigger: -------------------------------------------------------------------------------- 1 | [group] 2 | function.name = add_wait_queue 3 | trigger.code =>> 4 | wait_queue_head_t q; 5 | wait_queue_t wait; 6 | 7 | init_waitqueue_head(&q); 8 | init_wait(&wait); 9 | 10 | add_wait_queue(&q, &wait); 11 | remove_wait_queue(&q, &wait); 12 | << 13 | -------------------------------------------------------------------------------- /sources/tests/global/call_int/waitqueue/add_wait_queue_exclusive.trigger: -------------------------------------------------------------------------------- 1 | [group] 2 | function.name = add_wait_queue_exclusive 3 | trigger.code =>> 4 | wait_queue_head_t q; 5 | wait_queue_t wait; 6 | 7 | init_waitqueue_head(&q); 8 | init_wait(&wait); 9 | 10 | add_wait_queue_exclusive(&q, &wait); 11 | remove_wait_queue(&q, &wait); 12 | << 13 | -------------------------------------------------------------------------------- /sources/tests/global/call_int/waitqueue/finish_wait.trigger: -------------------------------------------------------------------------------- 1 | [group] 2 | function.name = finish_wait 3 | trigger.code =>> 4 | wait_queue_head_t q; 5 | wait_queue_t wait; 6 | 7 | init_waitqueue_head(&q); 8 | init_wait(&wait); 9 | 10 | prepare_to_wait(&q, &wait, TASK_RUNNING); 11 | finish_wait(&q, &wait); 12 | << 13 | -------------------------------------------------------------------------------- /sources/tests/global/call_int/waitqueue/init_waitqueue_head.trigger: -------------------------------------------------------------------------------- 1 | [group] 2 | function.name = init_waitqueue_head 3 | trigger.code =>> 4 | wait_queue_head_t q; 5 | init_waitqueue_head(&q); 6 | << 7 | -------------------------------------------------------------------------------- /sources/tests/global/call_int/waitqueue/prepare_to_wait.trigger: -------------------------------------------------------------------------------- 1 | [group] 2 | function.name = prepare_to_wait 3 | trigger.code =>> 4 | wait_queue_head_t q; 5 | wait_queue_t wait; 6 | 7 | init_waitqueue_head(&q); 8 | init_wait(&wait); 9 | 10 | prepare_to_wait(&q, &wait, TASK_RUNNING); 11 | finish_wait(&q, &wait); 12 | << 13 | -------------------------------------------------------------------------------- /sources/tests/global/call_int/waitqueue/remove_wait_queue.trigger: -------------------------------------------------------------------------------- 1 | [group] 2 | function.name = remove_wait_queue 3 | trigger.code =>> 4 | wait_queue_head_t q; 5 | wait_queue_t wait; 6 | 7 | init_waitqueue_head(&q); 8 | init_wait(&wait); 9 | 10 | add_wait_queue(&q, &wait); 11 | remove_wait_queue(&q, &wait); 12 | << 13 | -------------------------------------------------------------------------------- /sources/tests/global/call_int/waitqueue/triggers_header.data: -------------------------------------------------------------------------------- 1 | header =>> 2 | #include /* TASK_* macros */ 3 | << 4 | -------------------------------------------------------------------------------- /sources/tests/leak_check/alloc_impl_module/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(KMODULE_NAME ${KEDR_TEST_ALLOC_IMPL_MODULE}) 2 | 3 | kbuild_add_module(${KMODULE_NAME} 4 | "test_module.c" 5 | ) 6 | 7 | kedr_test_install_module (${KMODULE_NAME}) 8 | -------------------------------------------------------------------------------- /sources/tests/leak_check/cleaner_module/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # The module built here cleans up memory leaks left by the leaker module. 2 | # In addition, this allows to check how LeakCheck detects "unallocated" 3 | # frees. 4 | set(KMODULE_NAME ${KEDR_TEST_CLEANER_MODULE}) 5 | 6 | kbuild_add_module(${KMODULE_NAME} 7 | "test_module.c" 8 | ) 9 | 10 | kedr_test_install_module (${KMODULE_NAME}) 11 | -------------------------------------------------------------------------------- /sources/tests/leak_check/kasprintf_module/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # This module uses kasprintf() and kvasprintf(). 2 | set(KMODULE_NAME ${KEDR_TEST_KASPRINTF_MODULE}) 3 | 4 | kbuild_add_module(${KMODULE_NAME} 5 | "test_module.c" 6 | ) 7 | 8 | kedr_test_install_module (${KMODULE_NAME}) 9 | -------------------------------------------------------------------------------- /sources/tests/leak_check/kedr_test_lc_common.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Common definitions for "leaker" and "cleaner" modules. 3 | */ 4 | 5 | #ifndef COMMON_H_1252_INCLUDED 6 | #define COMMON_H_1252_INCLUDED 7 | 8 | #define KEDR_GFP_ORDER 3 9 | 10 | #endif /* COMMON_H_1252_INCLUDED */ 11 | -------------------------------------------------------------------------------- /sources/tests/leak_check/kfree_rcu_module/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # This module uses kfree_rcu() to free an RCU-protected structure 2 | set(KMODULE_NAME ${KEDR_TEST_KFREE_RCU_MODULE}) 3 | 4 | kbuild_add_module(${KMODULE_NAME} 5 | "test_module.c" 6 | ) 7 | 8 | kedr_test_install_module (${KMODULE_NAME}) 9 | -------------------------------------------------------------------------------- /sources/tests/leak_check/leaker_module/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # The module built here leaves memory leaks - to be detected by LeakCheck 2 | set(KMODULE_NAME ${KEDR_TEST_LEAKER_MODULE}) 3 | 4 | kbuild_add_module(${KMODULE_NAME} 5 | "test_module.c" 6 | ) 7 | 8 | kedr_test_install_module (${KMODULE_NAME}) 9 | -------------------------------------------------------------------------------- /sources/tests/modules/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_subdirectory(sample_target) 2 | add_subdirectory(payload_several_targets) -------------------------------------------------------------------------------- /sources/tests/modules/payload_several_targets/functions.data: -------------------------------------------------------------------------------- 1 | header =>> 2 | #include 3 | << 4 | 5 | [group] 6 | function.name = kfree 7 | 8 | arg.type = void * 9 | arg.name = p 10 | -------------------------------------------------------------------------------- /sources/tests/payloads_callm/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_subdirectory(caller_address) 2 | -------------------------------------------------------------------------------- /sources/tests/payloads_callm/caller_address/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | configure_file("${CMAKE_CURRENT_SOURCE_DIR}/test.sh.in" 2 | "${CMAKE_CURRENT_BINARY_DIR}/test.sh" 3 | @ONLY 4 | ) 5 | 6 | kedr_test_add_script("payload_template.caller_address.01" 7 | test.sh 8 | ) 9 | -------------------------------------------------------------------------------- /sources/tests/payloads_fsim/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_subdirectory(final_template) -------------------------------------------------------------------------------- /sources/tests/payloads_fsim/final_template/function_ellipsis/my_function.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Analogue to kasprintf, but without inclusion of 3 | * in header file. 4 | */ 5 | #ifndef MY_FUNCTION_H 6 | #define MY_FUNCTION_H 7 | 8 | char* my_kasprintf(const char* fmt, ...); 9 | 10 | #endif /* MY_FUNCTION_H */ 11 | -------------------------------------------------------------------------------- /sources/tests/payloads_fsim/final_template/indicators_module/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | kbuild_add_module(${indicators_module_name} indicator.c) 2 | kbuild_link_module(${indicators_module_name} kedr_fault_simulation) 3 | 4 | kedr_test_install_module(${indicators_module_name}) -------------------------------------------------------------------------------- /sources/tests/payloads_fsim/final_template/test_fpoint_with_params/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(kmodule_name "payload_fsim_fpoint_with_params") 2 | 3 | add_test_fsim_payload(${kmodule_name}) 4 | 5 | configure_file("${CMAKE_CURRENT_SOURCE_DIR}/test.sh.in" 6 | "${CMAKE_CURRENT_BINARY_DIR}/test.sh" 7 | @ONLY 8 | ) 9 | 10 | add_test_payload_fsim("payloads_fsim.final_template.fpoint_with_params.01" 11 | "test.sh" 12 | ) 13 | -------------------------------------------------------------------------------- /sources/tests/payloads_fsim/final_template/test_fsim_ellipsis/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(kmodule_name "payload_fsim_ellipsis") 2 | 3 | add_test_fsim_payload(${kmodule_name}) 4 | 5 | configure_file("${CMAKE_CURRENT_SOURCE_DIR}/test.sh.in" 6 | "${CMAKE_CURRENT_BINARY_DIR}/test.sh" 7 | @ONLY 8 | ) 9 | 10 | add_test_payload_fsim("payloads_fsim.final_template.fsim_ellipsis.01" 11 | "test.sh" 12 | ) 13 | -------------------------------------------------------------------------------- /sources/tests/payloads_fsim/final_template/test_fsim_va_arg/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(kmodule_name "payload_fsim_va_arg") 2 | 3 | add_test_fsim_payload(${kmodule_name}) 4 | 5 | configure_file("${CMAKE_CURRENT_SOURCE_DIR}/test.sh.in" 6 | "${CMAKE_CURRENT_BINARY_DIR}/test.sh" 7 | @ONLY 8 | ) 9 | 10 | add_test_payload_fsim("payloads_fsim.final_template.fsim_va_arg.01" 11 | "test.sh" 12 | ) 13 | -------------------------------------------------------------------------------- /sources/tests/payloads_fsim/final_template/test_no_fpoint_params/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(kmodule_name "payload_fsim_no_fpoint_params") 2 | 3 | add_test_fsim_payload(${kmodule_name}) 4 | 5 | configure_file("${CMAKE_CURRENT_SOURCE_DIR}/test.sh.in" 6 | "${CMAKE_CURRENT_BINARY_DIR}/test.sh" 7 | @ONLY 8 | ) 9 | 10 | add_test_payload_fsim("payloads_fsim.final_template.no_fpoint_params.01" 11 | "test.sh" 12 | ) 13 | -------------------------------------------------------------------------------- /sources/tests/payloads_fsim/final_template/test_rename_fpoint/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(kmodule_name "payload_fsim_rename_fpoint") 2 | 3 | add_test_fsim_payload(${kmodule_name}) 4 | 5 | configure_file("${CMAKE_CURRENT_SOURCE_DIR}/test.sh.in" 6 | "${CMAKE_CURRENT_BINARY_DIR}/test.sh" 7 | @ONLY 8 | ) 9 | 10 | add_test_payload_fsim("payloads_fsim.final_template.rename_fpoint.01" 11 | "test.sh" 12 | ) 13 | -------------------------------------------------------------------------------- /sources/tests/payloads_fsim/final_template/test_reuse_fpoint/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(kmodule_name "payload_fsim_reuse_point") 2 | 3 | add_test_fsim_payload(${kmodule_name}) 4 | 5 | configure_file("${CMAKE_CURRENT_SOURCE_DIR}/test.sh.in" 6 | "${CMAKE_CURRENT_BINARY_DIR}/test.sh" 7 | @ONLY 8 | ) 9 | 10 | add_test_payload_fsim("payloads_fsim.final_template.reuse_point.01" 11 | "test.sh" 12 | ) 13 | -------------------------------------------------------------------------------- /sources/tests/payloads_fsim/final_template/test_reuse_renamed_fpoint/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(kmodule_name "payload_fsim_reuse_renamed_point") 2 | 3 | add_test_fsim_payload(${kmodule_name}) 4 | 5 | configure_file("${CMAKE_CURRENT_SOURCE_DIR}/test.sh.in" 6 | "${CMAKE_CURRENT_BINARY_DIR}/test.sh" 7 | @ONLY 8 | ) 9 | 10 | add_test_payload_fsim("payloads_fsim.final_template.rename_point.02" 11 | "test.sh" 12 | ) 13 | -------------------------------------------------------------------------------- /sources/tests/payloads_fsim/final_template/test_several_functions/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(kmodule_name "payload_fsim_several_functions") 2 | 3 | add_test_fsim_payload(${kmodule_name}) 4 | 5 | configure_file("${CMAKE_CURRENT_SOURCE_DIR}/test.sh.in" 6 | "${CMAKE_CURRENT_BINARY_DIR}/test.sh" 7 | @ONLY 8 | ) 9 | 10 | add_test_payload_fsim("payloads_fsim.final_template.several_functions.01" 11 | "test.sh" 12 | ) 13 | -------------------------------------------------------------------------------- /sources/tests/payloads_fsim/final_template/trigger_target/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | kbuild_add_module(${trigger_target_module_name} target.c) 2 | 3 | kedr_test_install_module(${trigger_target_module_name}) -------------------------------------------------------------------------------- /sources/tests/run_tests_common.sh.in: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | @KEDR_INSTALL_TEST_DIR@/`uname -r`/run_tests.sh -------------------------------------------------------------------------------- /sources/tests/scripts/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Install auxiliary scripts 2 | kedr_test_install(PROGRAMS "do_commands.sh") 3 | -------------------------------------------------------------------------------- /sources/tests/tools/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_subdirectory(control) 2 | -------------------------------------------------------------------------------- /sources/tests/trace/cross_cpu_ordering/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | configure_file("${CMAKE_CURRENT_SOURCE_DIR}/test.sh.in" 2 | "${CMAKE_CURRENT_BINARY_DIR}/test.sh" 3 | @ONLY 4 | ) 5 | 6 | kedr_test_add_script("kedr_trace.cross_cpu_ordering.01" "test.sh") 7 | 8 | kedr_test_install(PROGRAMS "verify_trace.awk") -------------------------------------------------------------------------------- /sources/tests/trace/modules/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_subdirectory(trace_generator) 2 | add_subdirectory(trace_target) 3 | 4 | -------------------------------------------------------------------------------- /sources/tests/trace/modules/trace_generator/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(kmodule_name ${TRACE_TEST_GENERATOR_MODULE_NAME}) 2 | 3 | kbuild_add_module(${kmodule_name} "module.c") 4 | kbuild_link_module(${kmodule_name} kedr_trace) 5 | 6 | kedr_test_install_module(${kmodule_name}) -------------------------------------------------------------------------------- /sources/tests/trace/modules/trace_target/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(kmodule_name ${TRACE_TEST_TARGET_MODULE_NAME}) 2 | 3 | kbuild_add_module(${kmodule_name} "module.c") 4 | kbuild_link_module(${kmodule_name} kedr_trace ${TRACE_TEST_GENERATOR_MODULE_NAME}) 5 | 6 | kedr_test_install_module(${kmodule_name}) -------------------------------------------------------------------------------- /sources/tests/trace/simple_ordering/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | configure_file("${CMAKE_CURRENT_SOURCE_DIR}/test.sh.in" 2 | "${CMAKE_CURRENT_BINARY_DIR}/test.sh" 3 | @ONLY 4 | ) 5 | 6 | kedr_test_add_script("kedr_trace.simple_ordering.01" "test.sh") 7 | 8 | kedr_test_install(PROGRAMS "verify_trace.awk") -------------------------------------------------------------------------------- /sources/tests/trace/verify_trace_format.awk: -------------------------------------------------------------------------------- 1 | #!/bin/awk -f 2 | 3 | BEGIN { 4 | FS = "\t" 5 | timestamp = -1 6 | } 7 | # 8 | ($2 !~ "^\\[[0-9]+\\]") || ($3 !~ "^[0-9]+\\.[0-9]+") { 9 | print "Line '" $0 "' has incorrect format." 10 | exit 1 11 | } 12 | 13 | { 14 | if((timestamp != -1) && ($3 < timestamp)) 15 | { 16 | print "Line '" $0 "' has disordered timestamp." 17 | exit 1 18 | } 19 | timestamp = $3 20 | } 21 | 22 | -------------------------------------------------------------------------------- /sources/tests/util/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_subdirectory(stack_trace) -------------------------------------------------------------------------------- /sources/tests/util/stack_trace/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(kedr_stack_trace_source_dir "${CMAKE_CURRENT_SOURCE_DIR}/..") 2 | 3 | add_subdirectory(reliability) 4 | -------------------------------------------------------------------------------- /sources/tools/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_subdirectory(control) 2 | 3 | if (NOT CMAKE_CROSSCOMPILING) 4 | # Here "kedr_gen" will be built for standalone usage (rather than 5 | # to build KEDR itself) 6 | set (KEDR_GEN_INSTALL_PREFIX ${KEDR_INSTALL_PREFIX_EXEC_AUX}) 7 | add_subdirectory(kedr_gen) 8 | endif (NOT CMAKE_CROSSCOMPILING) 9 | -------------------------------------------------------------------------------- /sources/tools/kedr_gen/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required (VERSION 2.6) 2 | 3 | add_subdirectory(src) 4 | -------------------------------------------------------------------------------- /sources/tools/kedr_gen/src/mist_engine/AUTHORS: -------------------------------------------------------------------------------- 1 | MiST Engine is written by: 2 | 3 | Eugene Shatokhin 4 | --------------------------------------- -------------------------------------------------------------------------------- /sources/tools/kedr_gen/src/mist_engine/INSTALL: -------------------------------------------------------------------------------- 1 | See doc/html/mist-doc/install.html for installation instructions and other 2 | relevant information. 3 | -------------------------------------------------------------------------------- /sources/tools/kedr_gen/src/mist_engine/src/config.h.cmake: -------------------------------------------------------------------------------- 1 | // config.h 2 | // Configured settings for "MiST Engine" project 3 | #define PACKAGE_NAME "@PROJECT_NAME@" 4 | #define PACKAGE_VERSION "@MIST_ENGINE_VERSION@" 5 | #define PACKAGE_BUGREPORT "@MIST_ENGINE_BUGREPORT@" 6 | -------------------------------------------------------------------------------- /sources/tools/kedr_gen/src/mist_engine/src/mist_engine.rc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/euspectre/kedr/cc4f22330373f1de33ce0b7f771f097885bb4d6a/sources/tools/kedr_gen/src/mist_engine/src/mist_engine.rc -------------------------------------------------------------------------------- /sources/tools/kedr_gen/src/mist_engine/src/mist_engine.rc.in: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/euspectre/kedr/cc4f22330373f1de33ce0b7f771f097885bb4d6a/sources/tools/kedr_gen/src/mist_engine/src/mist_engine.rc.in -------------------------------------------------------------------------------- /sources/tools/kedr_gen/src/mist_engine/src/versions.ldscript: -------------------------------------------------------------------------------- 1 | MIST_1.0 { 2 | global: 3 | mist_engine_init; 4 | mist_tg_create; 5 | mist_tg_create_single; 6 | mist_tg_add_value; 7 | mist_tg_set_values; 8 | mist_tg_clear_values; 9 | mist_tg_evaluate; 10 | mist_tg_destroy; 11 | local: 12 | *; 13 | }; 14 | --------------------------------------------------------------------------------