1. Use always_inline_function instead of inline, inline does not take effect
2. Activate Kasan acceleration by 1/7
Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
1. The shadow area of global variables is different from heap
2. This modification has little impact on performance under O3 optimization
Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
The following situations cannot be detected by Kasan:
On a 32-bit machine, only 12 bytes were poisoned, but 13 bytes were accessed. Due to the lack of upward alignment, only 3 bits were detected
Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
PANIC never returns and abort is called to exit the process after calling assert
When BOARD_RESET_ON_ASSERT < 2, the second kasan_report will not be executed.
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
When size is less than or equal to KASAN_SHADOW_SCALE, no check will be performed
We need to check whether the memory is accessible based on bit
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
In function kasan_set_poison:
{
...
while (size--)
{
p[size] = value;
}
}
This will optimize to 'memset' function when compile option > O2.
But the memset must be instrument by kasan, so there is recursive
Signed-off-by: ligd <liguiding1@xiaomi.com>
mmap/fs_rammap.c:81:39: error: expected ‘)’ before ‘PRIdOFF’
81 | ferr("ERRORL Seek to position %"PRIdOFF" failed\n", fpos);
| ^~~~~~~
mmap/fs_rammap.c:81:12: warning: spurious trailing ‘%’ in format [-Wformat=]
81 | ferr("ERRORL Seek to position %"PRIdOFF" failed\n", fpos);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
mmap/fs_rammap.c:81:37: note: format string is defined here
81 | ferr("ERRORL Seek to position %"PRIdOFF" failed\n", fpos);
| ^
In file included from mmap/fs_rammap.c:30:
mmap/fs_rammap.c:98:51: error: expected ‘)’ before ‘PRIdOFF’
98 | ferr("ERROR: Write failed: offset=%"PRIdOFF" nwrite=%zd\n",
| ^~~~~~~
mmap/fs_rammap.c:98:20: warning: spurious trailing ‘%’ in format [-Wformat=]
98 | ferr("ERROR: Write failed: offset=%"PRIdOFF" nwrite=%zd\n",
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
mmap/fs_rammap.c:98:49: note: format string is defined here
98 | ferr("ERROR: Write failed: offset=%"PRIdOFF" nwrite=%zd\n",
Signed-off-by: zhangshoukui <zhangshoukui@xiaomi.com>
Summary:
In rammap:
1.0 - User
2.1 - Kernel
3.2 - XIP
Therefore we need to use 2 bits to represent the type
Signed-off-by: chenrun1 <chenrun1@xiaomi.com>
Summary:
1.Added msync callback in struct mm_map_entry_s
2.Added msync API in fs_msync.c
3.Added static msync_rammap for rammap.
Signed-off-by: chenrun1 <chenrun1@xiaomi.com>
Make sure that interrups are disabled during initialization.
This is a proper fix for an unexpected MSI interrupt for PCI serial driver.
Signed-off-by: p-szafonimateusz <p-szafonimateusz@xiaomi.com>
detail: Add g_ prefix to can_dlc_to_len and len_to_can_dlc to
follow NuttX coding style conventions for global symbols,
improving code readability and maintainability.
Signed-off-by: zhaohaiyang1 <zhaohaiyang1@xiaomi.com>
The number of exception for risc-v is 16 (0 ~ 15)
for the machine ISA version 1.12 or earlier, the number of exception is 20
(0 ~ 19) from the ISA version 1.13. And maybe changed in the future.
Using a dedicated option to control the exception number to allow the earlier
version chip with customized exception number (e.g. 16 ~ 19 used) to define
the exception reason string correctly.
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
Fix an issue of driver open failure caused by the following commit
that changes the initial value of inode reference.
43d0d95f81 fs/inode: using inode reference to indicate unlink and simply code
The interaction between the shell service in adb and adbd occurs through a pseudo-terminal (pty).
so, when a command is launched through adb shell from a PC, users now have the ability to pause
or kill the launched,application by inputting specific commands CONFIG_TTY_SIGTSTP_CHAR or
CONFIG_TTY_SIGTINT_CHAR, akin to the capabilities provided by nsh.
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>