search for: all_ones

Displaying 3 results from an estimated 3 matches for "all_ones".

Did you mean: all_done
2019 Sep 17
2
Spectre V1 Mitigation - Internals?
...is computed, then we mask pointers with all_zeros_mask if there is a mis-prediction. But I understand that as soon as the condition value is available, the processor can check about it's assumptions and revert back. That is, If the branch prediction is correct during speculation, we mask with all_ones, the processor can follow the predicted branch to retire. But if the processor mispredicted the branch, it will revert back as soon as condition become available if this is the case then we don't execute speculatively the operations : pointer1 &= predicate_state - (if branch) and *pointer2...
2019 Sep 17
2
Spectre V1 Mitigation - Internals?
...;> there is a mis-prediction. But I understand that as soon as the condition >> value is available, the processor can check about it's assumptions and >> revert back. >> >> That is, >> If the branch prediction is correct during speculation, we mask with >> all_ones, the processor can follow the predicted branch to retire. >> But if the processor mispredicted the branch, it will revert back as soon >> as condition become available if this is the case then we don't execute >> speculatively the operations : pointer1 &= predicate_state -...
2019 Sep 16
2
Spectre V1 Mitigation - Internals?
...Example: void leak(int data);void example(int* pointer1, int* pointer2) { if (condition) leak(*pointer1); else leak(*pointer2);} After the applying the mitigation the code resembles like: void leak(int data); void example(int* pointer1, int* pointer2) { uintptr_t predicate_state = all_ones_mask; if (condition) { predicate_state = !condition ? all_zeros_mask : predicate_state; pointer1 &= predicate_state; leak(*pointer1); } else { int value2 = *pointer2 & predicate_state; leak(value2); } } Let's assume that the branch is mispredicted and if body...