Re: [PATCHv4 3/3] x86/tdx: Handle load_unaligned_zeropad() page-cross to a shared page

From: Dave Hansen
Date: Wed Jun 15 2022 - 17:55:20 EST


On 6/15/22 10:10, Kirill A. Shutemov wrote:
>> I thought this whole exercise was kicked off by hitting this in testing.
>> Am I remembering this wrong?
>>
>>> https://lore.kernel.org/all/20220517153444.11195-10-kirill.shutemov@xxxxxxxxxxxxxxx/
>> Says:
>>
>>> This is an actual, real-world problem which was discovered during TDX
>>> testing.
>> Or were you considering this a different problem somehow?
> They are different.
>
> The patch by the link addresses issue of load_unaligned_zeropad() stepping
> onto unaccepted memory. This was triggered in practice.

OK, so we've got two problems both triggered by
load_unaligned_zeropad(), but where the fixes are different. We
actually hit the "unaccepted memory one" in testing, but that made us
think about other problems in the area and that's where this one came up.