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] [thread-next>] [day] [month] [year] [list]
Message-ID: <21e1f36c-3c2f-d1e6-e1ba-6f86316a262a@suse.com>
Date:   Mon, 6 Feb 2023 10:54:43 +0100
From:   Juergen Gross <jgross@...e.com>
To:     Linus Torvalds <torvalds@...ux-foundation.org>,
        Borislav Petkov <bp@...en8.de>
Cc:     Christian Kujau <lists@...dbynature.de>,
        Michael Kelley <mikelley@...rosoft.com>,
        linux-kernel@...r.kernel.org, Greg KH <gregkh@...uxfoundation.org>,
        Linux regressions mailing list <regressions@...ts.linux.dev>
Subject: Re: External USB disks not recognized with v6.1.8 when using Xen

On 06.02.23 07:33, Juergen Gross wrote:
> I still don't see why the original report of Christian is making sense:
> 
> According to the error message, the _requested_ memory type was UC-, but
> the reverted patch only affects cases where the requested type is WB. So
> why does a revert of 90b926e68f50 is helping to make this message go away?
> The message was:
> 
>    ioremap error for 0xf2520000-0xf2530000, requested 0x2, got 0x0
> 
> Meanwhile I've found a system which is issuing such a message under Xen.
> I'll investigate further _why_ a request of UC- ends up to get WB.

Okay, here the result of my investigation:

During ACPI initialization ACPI code seems to try mapping a memory area
being marked as "reserved" in the memory map with type WB (this happens
in acpi_os_map_iomem()).

With commit 90b926e68f50 this is now accepted, resulting in this memory
area being registered with the WB type.

Much later the driver for the device owning this reserved memory area
tries to map the area as UC-, but it gets WB due to the much earlier
mapping via acpi_os_map_iomem().

Before commit 72cbc8f04fe2 (which 90b926e68f50 tried to fix) this whole
mess worked, because memtype_reserve() took the early exit due to
pat_enabled() returning false.

Just reverting 90b926e68f50 will reintroduce the TDX guest issue Michael
reported (massive slow down due to getting memory areas mapped as UC-).

I believe the most promising way out of this mess would be to let
interested parties (Xen guests, Hyper-V TDX guests) set the MTRR memory
type they want to get back from mtrr_type_lookup() for the cases it
returns MTRR_TYPE_INVALID today.

I guess Xen Dom0 would specify MTRR_TYPE_UNCACHABLE, while Hyper-V TDX
guests could set it to MTRR_TYPE_WRBACK.

Any thoughts?


Juergen

Download attachment "OpenPGP_0xB0DE9DD628BF132F.asc" of type "application/pgp-keys" (3099 bytes)

Download attachment "OpenPGP_signature" of type "application/pgp-signature" (496 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ