If an illegal instruction is encountered on a process running on a
powerpc64 kernel it would attempt to sync the cache before retrying the
instruction "just in case". However, since curpmap is not set, when
moea64_sync_icache() attempts to lock the pmap, it's locking on a NULL pointer,
triggering a panic. Fix this by adding a (assumed unnecessary) fallback to curthread's pmap in moea64_sync_icache().
Details
Details
- Reviewers
luporl bdragon nwhitehorn alfredo - Commits
- rS349960: Set pcpu curpmap for powerpc64
Diff Detail
Diff Detail
- Repository
- rS FreeBSD src repository - subversion
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
Comment Actions
Thank you @jhibbits, this patch works fine for me:
# ./mksnapshot Illegal instruction (core dumped)
And kernel doesn't panic.
Just for the record, the illegal instruction was:
Thread 1 received signal SIGILL, Illegal instruction. 0x000000deaf7432e0 in ?? () (gdb) bt #0 0x000000deaf7432e0 in ?? () #1 0x0000000010815298 in v8::internal::(anonymous namespace)::Invoke(v8::internal::Isolate*, bool, v8::internal::Handle<v8::internal::Object>, v8::internal::Handle<v8::internal::Object>, int, v8::internal::Handle<v8::internal::Object>*, v8::internal::Handle<v8::internal::Object>, v8::internal::Execution::MessageHandling, v8::internal::Execution::Target) () #2 0x000000001081557c in v8::internal::Execution::TryCall(v8::internal::Isolate*, v8::internal::Handle<v8::internal::Object>, v8::internal::Handle<v8::internal::Object>, int, v8::internal::Handle<v8::internal::Object>*, v8::internal::Execution::MessageHandling, v8::internal::MaybeHandle<v8::internal::Object>*, v8::internal::Execution::Target) () #3 0x0000000010445970 in v8::internal::Bootstrapper::CompileNative(v8::internal::Isolate*, v8::internal::Vector<char const>, v8::internal::Handle<v8::internal::String>, int, v8::internal::Handle<v8::internal::Object>*, v8::internal::NativesFlag) () #4 0x0000000010445774 in v8::internal::Bootstrapper::CompileBuiltin(v8::internal::Isolate*, int) () #5 0x0000000010449bf0 in v8::internal::Genesis::InstallNatives(v8::internal::GlobalContextType) () #6 0x000000001044dc0c in v8::internal::Genesis::Genesis(v8::internal::Isolate*, v8::internal::MaybeHandle<v8::internal::JSGlobalProxy>, v8::Local<v8::ObjectTemplate>, unsigned long, v8::DeserializeInternalFieldsCallback, v8::internal::GlobalContextType) () #7 0x0000000010430aa8 in v8::internal::Bootstrapper::CreateEnvironment(v8::internal::MaybeHandle<v8::internal::JSGlobalProxy>, v8::Local<v8::ObjectTemplate>, v8::ExtensionConfiguration*, unsigned long, v8::DeserializeInternalFieldsCallback, v8::internal::GlobalContextType) () #8 0x00000000103fbd10 in v8::NewContext(v8::Isolate*, v8::ExtensionConfiguration*, v8::MaybeLocal<v8::ObjectTemplate>, v8::MaybeLocal<v8::Value>, unsigned long, v8::DeserializeInternalFieldsCallback) () #9 0x00000000103d37f8 in v8::Context::New(v8::Isolate*, v8::ExtensionConfiguration*, v8::MaybeLocal<v8::ObjectTemplate>, v8::MaybeLocal<v8::Value>, v8::DeserializeInternalFieldsCallback) () #10 0x00000000103d06c8 in main () (gdb) disass *$pc,+4 Dump of assembler code from 0xdeaf7432e0 to 0xdeaf7432e4: => 0x000000deaf7432e0: .long 0xde End of assembler dump. (gdb)