Re: [PATCH 4.19 84/86] efi/x86: Handle by-ref arguments covering multiple pages in mixed mode

From: Arvind Sankar
Date: Wed Mar 11 2020 - 23:52:43 EST


On Wed, Mar 11, 2020 at 02:01:07PM +0100, Pavel Machek wrote:
> We don't really need to do this computation on pa, it would work on va
> as well, right? It does not matter much, but old code worked that way.
>
> Plus, strictly speaking, pa + size can overflow for huge sizes, and
> test will return false negatives.

This is 64-bit code, overflow would need pa + size to be bigger than
2^64, and even then a false negative would need size to be around 2^64.