Re: [PATCH] x86: efi: avoid BUILD_BUG_ON() for non-constant p4d_index

From
Arvind Sankar <hidden>
Date
2021-02-05 00:09:11
Also in
lkml, platform-driver-x86
Reply to
Borislav Petkov, 2021-02-04
On Thu, Feb 04, 2021 at 11:13:18PM +0100, Borislav Petkov wrote:
On Thu, Feb 04, 2021 at 04:43:58PM -0500, Arvind Sankar wrote:
quoted
This should check EFI_VA_END instead of EFI_VA_START, and maybe throw in
a BUG_ON if EFI_VA_END >= EFI_VA_START.
No need:

        if (efi_va < EFI_VA_END) {
                pr_warn(FW_WARN "VA address range overflow!\n");
                return;
        }

We already check we're not going over at map time. And our runtime
services range is hardcoded. And we're switching to that PGD on each
runtime services call.

So I don't see the point for keeping any of the assertions.

Unless you have other valid arguments for keeping them...
No, I don't have any objections to removing them altogether. All the
comments other than the one about changing the #define's only apply if
it's decided to keep them.
Thread (35 messages) 35 messages, 8 authors, last reply 2021-02-05
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help