W-M-R opened a new pull request, #15461:
URL: https://github.com/apache/nuttx/pull/15461

   *Note: Please adhere to [Contributing 
Guidelines](https://github.com/apache/nuttx/blob/master/CONTRIBUTING.md).*
   
   ## Summary
   
       mte/kasan: Implementing KASAN memory protection for ARM64 hardware MTE
       
       1. Add mte_tags.c, which will call arm64_mte to implement tagging of 
memory blocks by operating registers
       2. please use arm64/mte, it default enable MM_KASAN_MTE_TAGS, run log:
       
   ```
       ➜  NX git:(mm) ✗ qemu-system-aarch64 -cpu max -nographic \
               -machine virt,virtualization=on,gic-version=3,mte=on \
               -chardev stdio,id=con,mux=on, -serial chardev:con \
               -mon chardev=con,mode=readline  -kernel ./nuttx/nuttx -s
       - Ready to Boot Primary CPU
       - Boot from EL2
       - Boot from EL1
       - Boot to C runtime for OS Initialize
       mm_initialize: Heap: name=Umem, start=0x403f2000 size=130080768
       mm_addregion: [Umem] Region 1: base=0x403f23a0 size=130079840
       mm_malloc: Allocated 0xf8000000403f23e0, size 144
       mm_malloc: Allocated 0xfe000000403f2470, size 80
       mm_malloc: Allocated 0xfe000000403f24c0, size 64
       mm_malloc: Allocated 0xfe000000403f2500, size 96
       mm_malloc: Allocated 0xff000000403f2560, size 96
       mm_malloc: Allocated 0xf7000000403f25c0, size 96
       mm_malloc: Allocated 0xff000000403f2620, size 96
       mm_malloc: Allocated 0xfe000000403f2680, size 96
       mm_malloc: Allocated 0xfe000000403f26e0, size 64
       mm_malloc: Allocated 0xf1000000403f2720, size 64
       mm_malloc: Allocated 0xf9000000403f2760, size 336
       mm_malloc: Allocated 0xf6000000403f28b0, size 8208
       mm_malloc: Allocated 0xf4000000403f48c0, size 1584
       mm_malloc: Allocated 0xfa000000403f4ef0, size 64
       mm_malloc: Allocated 0xf8000000403f4f30, size 64
       mm_malloc: Allocated 0xfe000000403f4f70, size 8208
       mm_malloc: Allocated 0xfe000000403f6f80, size 80
       mm_malloc: Allocated 0xfe000000403f6fd0, size 96
       mm_malloc: Allocated 0xf7000000403f7030, size 96
       mm_malloc: Allocated 0xf7000000403f7090, size 336
       mm_malloc: Allocated 0xfc000000403f71e0, size 96
       mm_malloc: Allocated 0xfd000000403f7240, size 912
       
       NuttShell (NSH)
       nsh>
       nsh> mtetest
       mm_malloc: Allocated 0xf4000000403f75d0, size 1584
       mm_malloc: Allocated 0xfd000000403f7c00, size 64
       mm_malloc: Allocated 0xff000000403f7c40, size 64
       mm_malloc: Allocated 0xfe000000403f7c80, size 8208
       Spawning process for test: mtetest1
       mm_malloc: Allocated 0xf4000000403f9c90, size 1584
       mm_malloc: Allocated 0xfb000000403fa2c0, size 64
       mm_malloc: Allocated 0xf5000000403fa300, size 64
       mm_malloc: Allocated 0xfd000000403fa340, size 8208
       Running test: mtetest1
       mm_free: Freeing 0xf5000000403fa300
       mm_free: Freeing 0xfb000000403fa2c0
       mm_free: Freeing 0xfd000000403fa340
       mm_free: Freeing 0xf4000000403f9c90
       Test 'mtetest1' completed
       Spawning process for test: mtetest2
       mm_malloc: Allocated 0xf9000000403f9c90, size 1584
       mm_malloc: Allocated 0xfd000000403fa2c0, size 64
       mm_malloc: Allocated 0xfd000000403fa300, size 64
       mm_malloc: Allocated 0xfb000000403fa340, size 8208
       Running test: mtetest2
       mm_free: Freeing 0xfd000000403fa300
       mm_free: Freeing 0xfd000000403fa2c0
       mm_free: Freeing 0xfb000000403fa340
       mm_free: Freeing 0xf9000000403f9c90
       Test 'mtetest2' completed
       Spawning process for test: mtetest3
       mm_malloc: Allocated 0xf5000000403f9c90, size 1584
       mm_malloc: Allocated 0xf7000000403fa2c0, size 64
       mm_malloc: Allocated 0xfd000000403fa300, size 64
       mm_malloc: Allocated 0xf4000000403fa340, size 8208
       Running test: mtetest3
       mm_free: Freeing 0xfd000000403fa300
       mm_free: Freeing 0xf7000000403fa2c0
       mm_free: Freeing 0xf4000000403fa340
       mm_free: Freeing 0xf5000000403f9c90
       Test 'mtetest3' completed
       Spawning process for test: mtetest4
       mm_malloc: Allocated 0xf8000000403f9c90, size 1584
       mm_malloc: Allocated 0xfb000000403fa2c0, size 64
       mm_malloc: Allocated 0xf4000000403fa300, size 64
       mm_malloc: Allocated 0xfe000000403fa340, size 8208
       Running test: mtetest4
       mm_free: Freeing 0xf4000000403fa300
       mm_free: Freeing 0xfb000000403fa2c0
       mm_free: Freeing 0xfe000000403fa340
       mm_free: Freeing 0xf8000000403f9c90
       Test 'mtetest4' completed
       Spawning process for test: mtetest5
       mm_malloc: Allocated 0xf2000000403f9c90, size 1584
       mm_malloc: Allocated 0xf5000000403fa2c0, size 64
       mm_malloc: Allocated 0xf8000000403fa300, size 64
       mm_malloc: Allocated 0xfb000000403fa340, size 8208
       Running test: mtetest5
       mm_free: Freeing 0xf8000000403fa300
       mm_free: Freeing 0xf5000000403fa2c0
       mm_free: Freeing 0xfb000000403fa340
       mm_free: Freeing 0xf2000000403f9c90
       Test 'mtetest5' completed
       Spawning process for test: Thread switch MTE test
       mm_malloc: Allocated 0xf4000000403f9c90, size 1584
       mm_malloc: Allocated 0xff000000403fa2c0, size 64
       mm_malloc: Allocated 0xfe000000403fa300, size 64
       mm_malloc: Allocated 0xfb000000403fa340, size 8208
       Running test: Thread switch MTE test
       mm_malloc: Allocated 0xf2000000403fc350, size 352
       mm_malloc: Allocated 0xf4000000403fc4b0, size 8208
       mm_malloc: Allocated 0xf4000000403fe4c0, size 352
       mm_malloc: Allocated 0xfa000000403fe620, size 8208
       Process 1 holding lock
       Process 2 holding lock
       Process 1 holding lock again
       default_fatal_handler: (IFSC/DFSC) for Data/Instruction aborts: 
synchronous tag check fault
       arm64_exception_handler: CurrentEL: MODE_EL1
       arm64_exception_handler: ESR_ELn: 0x96000011
       arm64_exception_handler: FAR_ELn: 0x6000000403ee2f0
       arm64_exception_handler: ELR_ELn: 0x402b3e98
       print_ec_cause: DABT (current EL)
       print_ec_cause: Data Abort taken without a change in Exception level
   ```
   
   ## Impact
   
   *Update this section, where applicable, on how change affects users,
    build process, hardware, documentation, security, compatibility, etc.*
   
   ## Testing
   
   *Update this section with details on how did you verify the change,
    what Host was used for build (OS, CPU, compiler, ..), what Target was
    used for verification (arch, board:config, ..), etc. Providing build
    and runtime logs from before and after change is highly appreciated.*
   
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to