Commit Graph

11 Commits

Author SHA1 Message Date
ligd cb94f825af kasan: add builtin_return_address(0) to kasan
Signed-off-by: ligd <liguiding1@xiaomi.com>
2023-09-24 03:48:39 +08:00
chao an f10b54a081 cmake: fix CMake build break
Signed-off-by: chao an <anchao@xiaomi.com>
2023-07-15 23:32:36 +08:00
chao an 6ee9ec7656 build: add initial cmake build system
1. Update all CMakeLists.txt to adapt to new layout
2. Fix cmake build break
3. Update all new file license
4. Fully compatible with current compilation environment(use configure.sh or cmake as you choose)

------------------

How to test

From within nuttx/. Configure:

cmake -B build -DBOARD_CONFIG=sim/nsh -GNinja
cmake -B build -DBOARD_CONFIG=sim:nsh -GNinja
cmake -B build -DBOARD_CONFIG=sabre-6quad/smp -GNinja
cmake -B build -DBOARD_CONFIG=lm3s6965-ek/qemu-flat -GNinja

(or full path in custom board) :
cmake -B build -DBOARD_CONFIG=$PWD/boards/sim/sim/sim/configs/nsh -GNinja

This uses ninja generator (install with sudo apt install ninja-build). To build:

$ cmake --build build

menuconfig:

$ cmake --build build -t menuconfig

--------------------------

2. cmake/build: reformat the cmake style by cmake-format

https://github.com/cheshirekow/cmake_format

$ pip install cmakelang

$ for i in `find -name CMakeLists.txt`;do cmake-format $i -o $i;done
$ for i in `find -name *\.cmake`;do cmake-format $i -o $i;done

Co-authored-by: Matias N <matias@protobits.dev>
Signed-off-by: chao an <anchao@xiaomi.com>
2023-07-08 13:50:48 +08:00
chao an a2c4027da6 mm/kasan: replace load/store methods to marco
Signed-off-by: chao an <anchao@xiaomi.com>
2023-06-28 15:18:04 +08:00
chao.an ac8918345b mm/kasan: bypass link-time optimizer
To avoid lto alias with override __asan_* symbols

undefined reference to `__asan_load4_noabort'
undefined reference to `__asan_load1_noabort'
undefined reference to `__asan_store1_noabort'
undefined reference to `__asan_load1_noabort'
undefined reference to `__asan_store1_noabort'
undefined reference to `__asan_load4_noabort'
undefined reference to `__asan_store4_noabort'

Signed-off-by: chao.an <anchao@xiaomi.com>
2023-01-28 23:21:02 +02:00
ligd 8be4bca3eb kasan: fix kasan race-condition
Change-Id: I1c729b8a85422a1f4326785e5d52cb0fc60d4822
Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-11-03 08:58:16 +08:00
anjiahao d1d46335df Replace nxsem API when used as a lock with nxmutex API
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-10-17 15:59:46 +09:00
ligd a1c9598fff kasan: use init value to avoid kasan used before bss clear
Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-09-10 10:31:16 +08:00
Fotis Panagiotopoulos 484bdc54d3 Fixed warnings in various prints. 2022-08-30 22:53:01 +08:00
Huang Qi 559f831005 sim: Enable ubsan in sim:kasan
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2022-08-23 17:51:20 +08:00
chenwei23 39cdd99d77 mm: Support the kernel address sanitizer
Signed-off-by: chenwei23 <chenwei23@xiaomi.com>
2021-11-02 13:32:47 -03:00