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]
Date:   Fri, 18 Mar 2022 17:56:07 +0100
From:   Juergen Gross <jgross@...e.com>
To:     David Laight <David.Laight@...LAB.COM>,
        "xen-devel@...ts.xenproject.org" <xen-devel@...ts.xenproject.org>,
        "platform-driver-x86@...r.kernel.org" 
        <platform-driver-x86@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "Dell.Client.Kernel@...l.com" <Dell.Client.Kernel@...l.com>
Cc:     Stuart Hayes <stuart.w.hayes@...il.com>,
        Hans de Goede <hdegoede@...hat.com>,
        Mark Gross <markgross@...nel.org>,
        "stable@...r.kernel.org" <stable@...r.kernel.org>
Subject: Re: [PATCH] platform/x86/dell: add buffer allocation/free functions
 for SMI calls

On 18.03.22 16:22, David Laight wrote:
> From: Juergen Gross
>> Sent: 18 March 2022 15:10
>>
>> The dcdbas driver is used to call SMI handlers for both, dcdbas and
>> dell-smbios-smm. Both drivers allocate a buffer for communicating
>> with the SMI handler. The physical buffer address is then passed to
>> the called SMI handler via %ebx.
>>
>> Unfortunately this doesn't work when running in Xen dom0, as the
>> physical address obtained via virt_to_phys() is only a guest physical
>> address, and not a machine physical address as needed by SMI.
> 
> The physical address from virt_to_phy() is always wrong.
> That is the physical address the cpu has for the memory.
> What you want is the address the dma master interface needs to use.
> That can be different for a physical system - no need for virtualisation.
> 
> On x86 they do usually match, but anything with a full iommu
> will need completely different addresses.

Yes, thanks for reminding me of that.

The SMI handler is running on the cpu, right? So using the DMA
address is wrong in case of an IOMMU. I really need the machine
physical address.


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