Re: [GIT pull] x86/pti for 5.4-rc1

From: Linus Torvalds
Date: Tue Sep 17 2019 - 14:13:42 EST


On Mon, Sep 16, 2019 at 6:38 AM Thomas Gleixner <tglx@xxxxxxxxxxxxx> wrote:
>
> - Handle unaligned addresses gracefully in pti_clone_pagetable(). Not an
> issue with current callers, but a correctness problem. Adds a warning
> so any caller which hands in an unaligned address gets pointed out
> clearly.

Hmm. I actually thing this one is incomplete.

Yes, it does it correctly now for the "those addresses are missing" cases.

But if somebody passes in an unaligned address, it still does the
wrong thing for the

if (pmd_large(*pmd) || level == PTI_CLONE_PMD) {

case. No?

I've pulled this, since the change is not _wrong_, but it does look
incomplete to me. Am I missing something?

Also, it would have been lovely to have some background on how this
was even noticed. The link in the commit message goes to the
development thread, but that one doesn't have the original report from
Song either.

Linus