-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Something seems wrong with ktrr #1
Comments
I think what you don't see is that, for ttbr1_el1, when you change T1SZ, you also change the base address for translation. Imagine if you had only 16-bit addresses - 14 bits for the page, and 2 bits for the page table index. That would give you a single L3 table with four entries, and under ttbr0_el1 it would be mapped like this:
And under ttbr1_el1 it would look like this:
So now when you reduce the address size to 15 bits (by adding one to T0SZ/T1SZ), with ttbr0 you just cut off the upper half of the address space:
But with ttbr1, you cut off the upper half and move the lower half to higher addresses:
So with the Spectre mitigation, in EL0 you have an address space that only has the vbar page mapped, at Hope that answers your question. |
But in your post:
I mean here is the vbar should be the second not the first. Do we agree? |
And it's seem's wrong for meltdown with krtt https://siguza.github.io/KTRR/
at el1 T1SZ is set to 25 :
first range from 0xffffff8000000000 eg:vbar_el1?
second range from 0xffffffc000000000 the rest_kernel ?
at el0 T1SZ is increased to 26:
ttbr_el1 from 0xffffffc000000000 to 0xffffffffffffffff
So at el0 it can meltdown to 0xffffffc000000000
Does this is the truth?
Seems vbar at 0xffffffc000000000 ~ 0xffffffffffffffff
and reset_kernel at 0xffffff8000000000 ~ 0xffffffc000000000
makes more sense?
Thanks
The text was updated successfully, but these errors were encountered: