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:   Wed, 5 Jan 2022 08:59:36 +0100
From:   Jan Beulich <jbeulich@...e.com>
To:     Boris Ostrovsky <boris.ostrovsky@...cle.com>
Cc:     "xen-devel@...ts.xenproject.org" <xen-devel@...ts.xenproject.org>,
        lkml <linux-kernel@...r.kernel.org>,
        Juergen Gross <jgross@...e.com>
Subject: Re: [PATCH] xen/x86: obtain upper 32 bits of video frame buffer
 address for Dom0

On 04.01.2022 18:03, Boris Ostrovsky wrote:
> 
> On 1/4/22 11:54 AM, Jan Beulich wrote:
>> On 04.01.2022 17:50, Boris Ostrovsky wrote:
>>> On 1/4/22 3:46 AM, Jan Beulich wrote:
>>>> The hypervisor has been supplying this information for a couple of major
>>>> releases. Make use of it. The need to set a flag in the capabilities
>>>> field also points out that the prior setting of that field from the
>>>> hypervisor interface's gbl_caps one was wrong, so that code gets deleted
>>>> (there's also no equivalent of this in native boot code).
>>>>
>>>> Signed-off-by: Jan Beulich <jbeulich@...e.com>
>>>>
>>>> --- a/arch/x86/xen/vga.c
>>>> +++ b/arch/x86/xen/vga.c
>>>> @@ -63,13 +63,17 @@ void __init xen_init_vga(const struct do
>>>>    		}
>>>>    
>>>>    		if (size >= offsetof(struct dom0_vga_console_info,
>>>> -				     u.vesa_lfb.gbl_caps)
>>>> -		    + sizeof(info->u.vesa_lfb.gbl_caps))
>>>> -			screen_info->capabilities = info->u.vesa_lfb.gbl_caps;
>>>> -		if (size >= offsetof(struct dom0_vga_console_info,
>>>>    				     u.vesa_lfb.mode_attrs)
>>>>    		    + sizeof(info->u.vesa_lfb.mode_attrs))
>>>
>>> Do we still need this test? All 4.0+ hypervisors will have mode_attrs.
>> Perhaps this could also be dropped, but unlike the capabilities part
>> I'd view this as an unrelated change.
> 
> 
> Right.
> 
> 
>>   Furthermore even a new hypervisor
>> would be free to omit the field, provided it also sets size low enough.
> 
> 
> If this is allowed, how would we deal with hypervisor dropping some other random field here?

Random fields can't be dropped, or very old Dom0 kernels might break.
It's only the "extensions" that have been added later which we can
expect consumers to properly deal with (by checking whether they're
covered by the supplied size).

> Have we had a precedent of this happening?

No. But doing so wouldn't violate the ABI.

Anyway - I'd appreciate if the patch at hand could be taken
independent of possible further adjustments here, as it addresses
an issue observed in the field.

Jan

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ