Principled approaches for mitigating micro-architectural side-channel attacks