1 #!/bin/sh 2 3 # Print out the KASAN_SHADOW_OFFSETS required to place the KASAN SHADOW 4 # start address at the top of the linear region 5 6 print_kasan_offset () { 7 printf "%02d\t" $1 8 printf "0x%08x00000000\n" $(( (0xffffffff & (-1 << ($1 - 1 - 32))) \ 9 - (1 << (64 - 32 - $2)) )) 10 } 11 12 echo KASAN_SHADOW_SCALE_SHIFT = 3 13 printf "VABITS\tKASAN_SHADOW_OFFSET\n" 14 print_kasan_offset 48 3 15 print_kasan_offset 47 3 16 print_kasan_offset 42 3 17 print_kasan_offset 39 3 18 print_kasan_offset 36 3 19 echo 20 echo KASAN_SHADOW_SCALE_SHIFT = 4 21 printf "VABITS\tKASAN_SHADOW_OFFSET\n" 22 print_kasan_offset 48 4 23 print_kasan_offset 47 4 24 print_kasan_offset 42 4 25 print_kasan_offset 39 4 26 print_kasan_offset 36 4
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.