https://github.com/google/kmsan
Revision 26474d73fd4b42891fb1801fcce5cba7e7942fcd authored by Alexander Potapenko on 04 July 2018, 11:38:51 UTC, committed by Alexander Potapenko on 28 August 2018, 11:10:10 UTC
For the repro below: perf_event_open(&(0x7f0000000100)={0x2000000005, 0x70, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xffff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3, @perf_bp={&(0x7f0000000000), 0x1}}, 0x0, 0x0, 0xffffffffffffffff, 0x0) r0 = socket$inet_tcp(0x2, 0x1, 0x0) setsockopt$SO_ATTACH_FILTER(r0, 0x1, 0x1a, &(0x7f0000000000)={0x1, &(0x7f0000000040)=[{}]}, 0x10) the kernel used to crash while attempting to run on the stack belonging to the cpu_entry_area. There are no struct pages for cpu_entry_area, therefore we can't allocate metadata pages for it. Instead we create two per-CPU arrays, cpu_entry_area_shadow and cpu_entry_area_origin, which will serve as shadow/origin storage for the stacks in the cpu_entry_area. Also handle switches to the IST stacks by calling the kmsan_ist_enter() and kmsan_ist_exit() hooks in entry_64.S. Looks like this only happens for DEBUG_STACK at the moment.
1 parent 7eeb73f
Tip revision: 26474d73fd4b42891fb1801fcce5cba7e7942fcd authored by Alexander Potapenko on 04 July 2018, 11:38:51 UTC
kmsan: support cpu_entry_area
kmsan: support cpu_entry_area
Tip revision: 26474d7
File | Mode | Size |
---|---|---|
Documentation | ||
LICENSES | ||
arch | ||
block | ||
certs | ||
crypto | ||
drivers | ||
firmware | ||
fs | ||
include | ||
init | ||
ipc | ||
kernel | ||
lib | ||
mm | ||
net | ||
samples | ||
scripts | ||
security | ||
sound | ||
tools | ||
usr | ||
virt | ||
.clang-format | -rw-r--r-- | 12.8 KB |
.cocciconfig | -rw-r--r-- | 59 bytes |
.config.example | -rw-r--r-- | 118.3 KB |
.config.extended | -rw-r--r-- | 133.2 KB |
.get_maintainer.ignore | -rw-r--r-- | 31 bytes |
.gitattributes | -rw-r--r-- | 30 bytes |
.gitignore | -rw-r--r-- | 1.5 KB |
.mailmap | -rw-r--r-- | 9.7 KB |
COPYING | -rw-r--r-- | 423 bytes |
CREDITS | -rw-r--r-- | 96.4 KB |
Kbuild | -rw-r--r-- | 2.2 KB |
Kconfig | -rw-r--r-- | 563 bytes |
MAINTAINERS | -rw-r--r-- | 458.4 KB |
Makefile | -rw-r--r-- | 59.0 KB |
README | -rw-r--r-- | 800 bytes |
README.md | -rw-r--r-- | 2.1 KB |
false-kmsan-cfq_init_cfqq.txt | -rw-r--r-- | 6.3 KB |
kmsan-cfq_init_cfqq.txt | -rw-r--r-- | 6.0 KB |
kmsan-clang.patch | -rw-r--r-- | 8.5 KB |
kmsan-epoll_ctl.txt | -rw-r--r-- | 3.2 KB |
kmsan-first-bug-writeup.txt | -rw-r--r-- | 8.1 KB |
kmsan-llvm.patch | -rw-r--r-- | 38.7 KB |
kmsan-packet_bind_spkt.txt | -rw-r--r-- | 4.4 KB |
kmsan-radix_tree_insert.txt | -rw-r--r-- | 6.3 KB |
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...