lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <YgDtxR0V7cqOZSe3@kroah.com>
Date:   Mon, 7 Feb 2022 11:00:37 +0100
From:   Greg KH <gregkh@...uxfoundation.org>
To:     Borislav Petkov <bp@...en8.de>
Cc:     luofei <luofei@...cloud.com>, stable@...r.kernel.org,
        tony.luck@...el.com, tglx@...utronix.de, mingo@...hat.com,
        hpa@...or.com, x86@...nel.org, linux-edac@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] x86/mm, mm/hwpoison: fix unmap kernel 1:1 pages

On Mon, Feb 07, 2022 at 10:35:41AM +0100, Borislav Petkov wrote:
> On Mon, Feb 07, 2022 at 09:14:23AM +0100, Greg KH wrote:
> > On Mon, Feb 07, 2022 at 02:52:42AM -0500, luofei wrote:
> > > Only unmap the page when the memory error is properly handled
> > > by calling memory_failure(), not the other way around.
> > > 
> > > Fixes: 26f8c38bb466("x86/mm, mm/hwpoison: Don't unconditionally unmap kernel 1:1 pages")
> > 
> > This commit is not in Linus's tree.  Please use the correct commit id.
> 
> I think he's trying to fix the backport:
> 
> see 26f8c38bb466c1a2d232d7609fb4bfb4bc121678 which is the stable tree backport:
> 
> @@ -582,7 +586,8 @@ static int srao_decode_notifier(struct notifier_block *nb, unsigned long val,
>  
>         if (mce_usable_address(mce) && (mce->severity == MCE_AO_SEVERITY)) {
>                 pfn = mce->addr >> PAGE_SHIFT;
> -               memory_failure(pfn, MCE_VECTOR, 0);
> +               if (memory_failure(pfn, MCE_VECTOR, 0))
> +                       mce_unmap_kpfn(pfn);
>         }
> 
> 
> vs the upstream commit:
> 
> fd0e786d9d09024f67bd71ec094b110237dc3840
> 
> @@ -590,7 +594,8 @@ static int srao_decode_notifier(struct notifier_block *nb, unsigned long val,
>  
>         if (mce_usable_address(mce) && (mce->severity == MCE_AO_SEVERITY)) {
>                 pfn = mce->addr >> PAGE_SHIFT;
> -               memory_failure(pfn, 0);
> +               if (!memory_failure(pfn, 0))
> +                       mce_unmap_kpfn(pfn);
>         }
>  
>         return NOTIFY_OK;
> 

Ah, ok, if so, this needs to be documented really really well in the
changelog text so no one is confused.  Like me :)

thanks,

greg k-h

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ