Oopenvela-robotkasan/unregister: Modify the logic of unpoison
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
kasan: Support asan poison memory The instrumentation is retained, and the sim asan global variables, stack and other checks can still be used Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com> | 2 个月前 | |
Renaming "modlib" to "libelf" is more in line with the implementation content, which makes it easier for individual developers to understand the capabilities of this module. CONFIG_LIBC_MODLIB -> CONFIG_LIBC_ELF Signed-off-by: chao an <anchao.archer@bytedance.com> | 2 个月前 | |
kasan: Support asan poison memory The instrumentation is retained, and the sim asan global variables, stack and other checks can still be used Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com> | 2 个月前 | |
kasan/unregister: Modify the logic of unpoison 1. When a region is not included in other regions, we will remove it from g_region. Unpoison is not needed afterward because mm->shadow will no longer be mapped after removal. 2. When a region is contained within other regions, we will unpoison it, The size passed in at this point is also complete. It will not be subtracted from the header of the Kasan region structure in the Kasan register. Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com> | 2 个月前 | |
nxgdb: avoid using macro to speed up script loading Macro is used mainly to determine if some module is enabled or not. But it can be achieved by checking if corresponding symbol or type exists. This patch modifies most of the macro parsing to significantly improve script loading speed. Testing shows loading time is reduced from 10.8s to 2.4s for a 437MB elf, including GDB's startup time. The main methods are: 1. Check if some type exists: utils.lookup_type('some_type') is not None 2. Check if symbol exists: utils.get_static_symbol('symbol_name') 3. Check if struct field exists: utils.has_field('struct_name', 'field') 4. Use hardcoded constants for standard values (e.g., TCB flags, AF_INET) 5. Detect feature by checking source file names where functions are defined 6. Count struct field array items: utils.get_field_nitems() Key changes: - critmon.py: Check struct critmon_state_s existence - dmesg.py: Check for g_ramlog_channel_ops and g_rpmsg_channel_ops symbols - kasan.py: Detect kasan mode by source filename and type checking - mm.py: Use default alignment constant instead of config macro - net.py: Detect IPv4/IPv6 by checking struct fields, use standard AF_INET values - pm.py: Get PM_COUNT by counting wakelock array items - rpmsg.py: Check struct rpmsg_s existence - thread.py: Define all TCB flag constants, implement get_task_state_desc(), lazy-load registers, remove macro dictionary - utils.py: Simplify SMP detection, use constant for PID0_REPLACE - global.c: Add g_kasan_global_align const variable for debugging - Hardcode stack color to 0xdeadbeef for all arch, except avr Signed-off-by: xuxingliang <xuxingliang@xiaomi.com> | 2 个月前 | |
mm/kasan: add spinlock for kasan_report Disable scheduling and interrupts before kasan_repoft to prevent it from being switched out. Signed-off-by: wangzhi16 <wangzhi16@xiaomi.com> | 2 个月前 | |
kasan/unregister: Modify the logic of unpoison 1. When a region is not included in other regions, we will remove it from g_region. Unpoison is not needed afterward because mm->shadow will no longer be mapped after removal. 2. When a region is contained within other regions, we will unpoison it, The size passed in at this point is also complete. It will not be subtracted from the header of the Kasan region structure in the Kasan register. Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com> | 2 个月前 | |
kasan/unregister: Modify the logic of unpoison 1. When a region is not included in other regions, we will remove it from g_region. Unpoison is not needed afterward because mm->shadow will no longer be mapped after removal. 2. When a region is contained within other regions, we will unpoison it, The size passed in at this point is also complete. It will not be subtracted from the header of the Kasan region structure in the Kasan register. Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com> | 2 个月前 | |
kasan/unregister: Modify the logic of unpoison 1. When a region is not included in other regions, we will remove it from g_region. Unpoison is not needed afterward because mm->shadow will no longer be mapped after removal. 2. When a region is contained within other regions, we will unpoison it, The size passed in at this point is also complete. It will not be subtracted from the header of the Kasan region structure in the Kasan register. Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com> | 2 个月前 |