add patch from Ard Biesheuvel

Change-Id: Id34f1b9529e7b686908d141480fd462d3cb1918b