Comments (6)
I think you might be right, there is nothing in the decode path that says that the VCPU must be currently associated with a TCB, and therefore vcpu->vcpuTCB
could be NULL
.
That means invokeVCPUInjectIRQ
should definitely guard against this case, and write to the VCPU object register instead of doing a remote call when there is no TCB (same as in the unicore case).
I.e. it should be:
exception_t invokeVCPUInjectIRQ(vcpu_t *vcpu, unsigned long index, virq_t virq)
{
if (likely(ARCH_NODE_STATE(armHSCurVCPU) == vcpu)) {
set_gic_vcpu_ctrl_lr(index, virq);
#ifdef ENABLE_SMP_SUPPORT
} else if (vcpu->vcpuTCB != NULL && vcpu->vcpuTCB->tcbAffinity != getCurrentCPUIndex()) {
doRemoteOp3Arg(IpiRemoteCall_VCPUInjectInterrupt, (word_t)vcpu, index, virq.words[0], vcpu->vcpuTCB->tcbAffinity);
#endif /* CONFIG_ENABLE_SMP */
} else {
vcpu->vgic.lr[index] = virq;
}
return EXCEPTION_NONE;
}
Well spotted. Goes to show that the SMP kernel really is not that mature yet esp with HYP features or MCS.
Did you run into a crash with that or did you see it in the code?
from sel4.
Did you run into a crash with that or did you see it in the code?
Code inspection.
from sel4.
If it can really trigger a NULL pointer access in the kernel, that would definitely be a major bug, yes. That should not be possible. Since it is the unverified SMP config of the kernel, there is no proof that this doesn't happen and we should definitely investigate.
from sel4.
A reproducible test is here, Ivan-Velickovic/sel4test@49d1aab (tested with ../init-build.sh -DPLATFORM=odroidc4 -DSMP=1 -DARM_HYP=1
).
I believe Jorge's claim is correct.
from sel4.
@andybui01 also helped to find this one, so we can assign it to him, he can fix it I believe :)
from sel4.
Fix should be up here now: #1200. Will wait to confirm that the test now passes.
from sel4.
Related Issues (20)
- Can uart_drv_getchar(void) be removed from the serial drivers HOT 3
- Assessment of the difficulty in porting CPU architecture for seL4 HOT 1
- Rework ipi_send_target HOT 7
- Please help to create a repo manifest including toolchains and all these verified os services and componets. HOT 3
- x86 VM + SMP Issue HOT 24
- Are there measures in seL4 to deal with Meltdown and Specter vulnerabilities? HOT 1
- is MAX_IRQ correct for tqma8xqp1gb? HOT 2
- Adding baseline Morello support HOT 1
- SMP with clang hangs on hifive in release config HOT 2
- seL4 doesn't boot with GICv3 on QEMU HOT 3
- Support full 48-bit PA on AArch64 HOT 2
- Should IRQHandler caps have a way to set whether Acknowledgement happens automatically? HOT 16
- `physBase` isn't aligned properly on `ARM_HYP` HOT 1
- Should we add `-Wconversion` to compiler flags? HOT 5
- document `cmake install` target in CHANGES HOT 2
- arm64: silent asserts before mapping the kernel window HOT 3
- Generated platform descriptions (.yaml and .json) do not describe final device regions HOT 4
- How to build standalone kernel and simulate HOT 1
- Is it possible to port musl directly from libsel4? HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sel4.