[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v1] xen/arm: align *(.proc.info) in the linker script


  • To: Julien Grall <julien@xxxxxxx>, Oleksii <oleksii.kurochko@xxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Thu, 2 Mar 2023 10:45:25 +0100
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=cz+96J6RnzvmNBwoSS02Fr1es7UJweyPgt6Qr541iGk=; b=Ee081kzj085mvIEwbY4kbfqX+u+ICcS1u7C3tGwp/2dgQR2xVPWrxLcYHileQ0RU3JTv689H3pL1ub0gkADPhRdzirJseBYqZtCW7B0tQ6eG4Q4vMihEc93bmwgWxkTADM8X0GXG/c5RuQOqPsNT6MjVtWV0tHJaM5uRwPEhx9E5sSMvEXR33bgkDGowjreoIrU5ikZezgy5NUIuvEfyYVjIdWPceKwdoWovdhsuVXA3vCPvpxmM9lUVEwunWl/mrvnioC6KdNi5L07s83Zg86pwVEtVPeBWVwzllw2iiI5H0HwWQWdkWbaG7DNZGayPYiTPfTz05qY7n4CqGsWm/A==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=iaT5G/kKzrI3Cm31QPmfRWkDmW50/Mpz6MG0DWkSEAdjMzEGIqMcygtcxfKLDl4TXvAVmWTOiTqFribCDUKJ7+o+2i4p8O1sChb2WPmTFIrjmtG33wtwVeTs4xb6kGeEDMmMddMLqmgo9pYjerVXzHy6NWHwCKnCnRb2Qo+745K1Ih0zik7okkV77UyMnelUiU+b8mC2oztzT+iEcXAMccWC/EXdbN81ujomsUVKyNi3+rDbg1/X8/XAbsEXws0Ganu8v/TYdJCgudanwE0vKU2/7CaGFKrNnLoQXVi06EXG3OWDwovERAXG7/x6q66pleXUwRz3YkDR0EVWMuvdAw==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Stefano Stabellini <sstabellini@xxxxxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Thu, 02 Mar 2023 09:45:39 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 01.03.2023 21:38, Julien Grall wrote:
> On 01/03/2023 17:50, Julien Grall wrote:
>> I got the answer. The problem now is gitlab only keep the artifact for 
>> the latest build and it only provide a zImage (having the ELF would be 
>> easier).
>>
>> I will try to reproduce the error on my end.
> 
> I managed to reproduce it. It looks like that after your bug patch, 
> *(.rodata.*) will not be end on a 4-byte boundary. Before your patch, 
> all the messages will be in .rodata.str. Now they are in .bug_frames.*, 
> so there some difference in .rodata.*.

Strings in .bug_frames.*? This sounds like a mistake, which - if indeed
the case - will want investigating before the conversion series is
actually considered for committing.

> That said, it is not entirely clear why we never seen the issue before 
> because my guessing there are no guarantee that .rodata.* will be 
> suitably aligned.
> 
> Anyway, here a proposal for the commit message:
> 
> "
> xen/arm: Ensure the start *(.proc.info) of is 4-byte aligned
> 
> The entries in *(.proc.info) are expected to be 4-byte aligned and the 
> compiler will access them using 4-byte load instructions. On Arm32, the 
> alignment is strictly enforced by the processor and will result to a 
> data abort if it is not correct.
> 
> However, the linker script doesn't encode this requirement. So we are at 
> the mercy of the compiler/linker to have aligned the previous sections 
> suitably.

May I suggest "aligned/padded", because it's really the tail of the
previous section which matters?

Jan

> This was spotted when trying to use the upcoming generic bug 
> infrastructure with the compiler provided by Yocto.
> 
> Link: 
> https://lore.kernel.org/xen-devel/6735859208c6dcb7320f89664ae298005f70827b.camel@xxxxxxxxx/
> "
> 
> If you are happy with the proposed commit message, then I can update it 
> while committing.
> 
> Cheers,
> 




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.