In Hardware We Trust: Gains and Pains of Hardware-assisted Security