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: <aFEfVX1GKDa6QHox@intel.com>
Date: Tue, 17 Jun 2025 15:55:01 +0800
From: Chao Gao <chao.gao@...el.com>
To: Sagi Shahar <sagis@...gle.com>
CC: <linux-coco@...ts.linux.dev>, <x86@...nel.org>, <kvm@...r.kernel.org>,
	<seanjc@...gle.com>, <pbonzini@...hat.com>, <eddie.dong@...el.com>,
	<kirill.shutemov@...el.com>, <dave.hansen@...el.com>,
	<dan.j.williams@...el.com>, <kai.huang@...el.com>,
	<isaku.yamahata@...el.com>, <elena.reshetova@...el.com>,
	<rick.p.edgecombe@...el.com>, Farrah Chen <farrah.chen@...el.com>, "Thomas
 Gleixner" <tglx@...utronix.de>, Ingo Molnar <mingo@...hat.com>, "Borislav
 Petkov" <bp@...en8.de>, Dave Hansen <dave.hansen@...ux.intel.com>, "H. Peter
 Anvin" <hpa@...or.com>, "Kirill A. Shutemov"
	<kirill.shutemov@...ux.intel.com>, <linux-kernel@...r.kernel.org>
Subject: Re: [RFC PATCH 08/20] x86/virt/seamldr: Implement FW_UPLOAD sysfs
 ABI for TD-Preserving Updates

On Mon, Jun 16, 2025 at 05:55:50PM -0500, Sagi Shahar wrote:
>> diff --git a/arch/x86/virt/vmx/tdx/tdx.c b/arch/x86/virt/vmx/tdx/tdx.c
>> index aa6a23d46494..22ffc15b4299 100644
>> --- a/arch/x86/virt/vmx/tdx/tdx.c
>> +++ b/arch/x86/virt/vmx/tdx/tdx.c
>> @@ -1178,6 +1178,10 @@ static void tdx_subsys_init(void)
>>                 goto err_bus;
>>         }
>>
>> +       struct device *dev_root __free(put_device) = bus_get_dev_root(&tdx_subsys);
>
>dev_root definition here causes compilation error:
>
>arch/x86/virt/vmx/tdx/tdx.c:1181:3: error: cannot jump from this goto
>statement to its label
>                goto err_bus;
>                ^
>arch/x86/virt/vmx/tdx/tdx.c:1184:17: note: jump bypasses
>initialization of variable with __attribute__((cleanup))
>        struct device *dev_root __free(put_device) =
>bus_get_dev_root(&tdx_subsys);

Thank you for reporting this. The goto label is unnecessary, and I'll remove it
from patch 4 (which adds this goto).

I'm curious about which compiler you are using because I don't encounter this
error with "gcc version 11.5.0 20240719 (Red Hat 11.5.0-5) (GCC)".

>
>> +       if (dev_root)
>> +               seamldr_init(dev_root);
>> +
>>         return;
>>
>>  err_bus:
>> --
>> 2.47.1
>>
>>
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ