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:
 <BL1PR12MB58499172314E76D9A9278746E77A2@BL1PR12MB5849.namprd12.prod.outlook.com>
Date: Sat, 12 Oct 2024 02:22:21 +0000
From: "Chen, Jiqian" <Jiqian.Chen@....com>
To: Juergen Gross <jgross@...e.com>
CC: Stefano Stabellini <sstabellini@...nel.org>, Oleksandr Tyshchenko
	<oleksandr_tyshchenko@...m.com>, "xen-devel@...ts.xenproject.org"
	<xen-devel@...ts.xenproject.org>, "linux-kernel@...r.kernel.org"
	<linux-kernel@...r.kernel.org>,
	Marek Marczykowski-Górecki
	<marmarek@...isiblethingslab.com>, "Chen, Jiqian" <Jiqian.Chen@....com>
Subject: Re: [PATCH v3] xen: Remove dependency between pciback and privcmd

On 2024/10/11 20:06, Juergen Gross wrote:
> On 11.10.24 05:42, Jiqian Chen wrote:
>> Commit 2fae6bb7be32 ("xen/privcmd: Add new syscall to get gsi from dev")
>> adds a weak reverse dependency to the config XEN_PRIVCMD definition, that
>> dependency causes xen-privcmd can't be loaded on domU, because dependent
>> xen-pciback isn't always be loaded successfully on domU.
>>
>> To solve above problem, remove that dependency, and do not call
>> pcistub_get_gsi_from_sbdf() directly, instead add a hook in
>> drivers/xen/apci.c, xen-pciback register the real call function, then in
>> privcmd_ioctl_pcidev_get_gsi call that hook.
>>
>> Fixes: 2fae6bb7be32 ("xen/privcmd: Add new syscall to get gsi from dev")
>> Reported-by: Marek Marczykowski-Górecki <marmarek@...isiblethingslab.com>
>> Signed-off-by: Jiqian Chen <Jiqian.Chen@....com>
> 
> Unfortunately I'm seeing a build breakage for the 32-bit x86 build.
> 
> Reason is that drivers/xen/acpi.c is being built for Dom0 only, so having
> CONFIG_XEN_ACPI defined is not enough for ensuring the new functions are
> present.
> 
> I suggest to add a new CONFIG item CONFIG_XEN_DOM0_ACPI like
> 
> config XEN_DOM0_ACPI
>     def_bool y
>     depends on XEN_ACPI && XEN_DOM0
> 
> and then replace all CONFIG_XEN_ACPI instances in your patch with
> CONFIG_XEN_DOM0_ACPI. This includes the use case in
> privcmd_ioctl_pcidev_get_gsi().

How about add stubs for xen_acpi_register_get_gsi_func and xen_acpi_get_gsi_from_sbdf when "!CONFIG_XEN_DOM0" in acpi.h, like the other functions in that file do.

> 
> 
> Juergen

-- 
Best regards,
Jiqian Chen.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ