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

Re: [PATCH v9] common: honor CONFIG_CC_SPLIT_SECTIONS also for assembly functions


  • To: Jason Andryuk <jason.andryuk@xxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Alejandro Vallejo <alejandro.garciavallejo@xxxxxxx>
  • Date: Thu, 12 Feb 2026 19:29:55 +0100
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=suse.com smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0)
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=YNKkKIyYpWFFC41c+bUZedvXnny+kAmHMsF6G5Ou5rw=; b=GNHWE9ZGVTZ3Mhm7N/NXEJLl4F/U6yAHQhcD8W1nIKWsbyQRw0bToCdOt/h4gJ5fdzjIuRSOEosHST1Meto41tmW9S4nlYsDdx2aSGlp3aFRRHnx/f2M/NjUxwvTM6DQ5cb8AYCSd6LM4CHp8v8T8x7gDvubsmjCGEx+8i28dqjjqEqzIHazyXMwa83RmqIHSHLF8B0L7mMXn+iFA5P+4N87ThKB6+gmf8IuogATIXfcj8GO1thLUbmTh8O55Ds5dTzdzPocDnXZsNti95GcEITjDh6MfQ3ZCexHifp5c10ccP8MZorLwEU5Me51ZijwOzDIcMKy4r3qJ4Pttrc5VA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=o3Dlbk2k5lnegglSS8YAykS+fBTxIO+UPtp5k06GscSVx9DtTJtolbvL/ZN/O4DViFE8nLQTZJXGFrRDvmPhs9RIV2xN+HsLkfnaruxH0Fgj+NOaPpRqZDl6S+7pUIn+uEk+XbEFl9MC3ALHiPxxs5XYQwWaYxk4fvuiZ4dEeeI9eKpebzByUskTYV03nX/j1GLuBycK7rq67qxXJ7kybCecCebDXUke+bLLtvgNHyGKRhTjP7a9Fb+my0Ka0bNPFJR6QKKuOwVOtUCpxyT2D4c4+4TtEIzXsFLbKKXZb6LcsMnA6wjTq+spoEX7FlBcGMemJm0mpqVFgMPtfPgCDA==
  • Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>, Michal Orzel <michal.orzel@xxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Volodymyr Babchuk <volodymyr_babchuk@xxxxxxxx>, Oleksii Kurochko <oleksii.kurochko@xxxxxxxxx>, Xen-devel <xen-devel-bounces@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Thu, 12 Feb 2026 18:30:18 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On Wed Jan 28, 2026 at 3:35 PM CET, Jason Andryuk wrote:
> On 2025-04-01 06:58, Jan Beulich wrote:
>> Leverage the new infrastructure in xen/linkage.h to also switch to per-
>> function sections (when configured), deriving the specific name from the
>> "base" section in use at the time FUNC() is invoked.
>> 
>> Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
>> Tested-by: Luca Fancellu <luca.fancellu@xxxxxxx> # arm

I don't seem to have the original patch in my inbox, so I'll just answer here.

About the assembly modifications on the exception entry points:

With split sections the linker is free to reorder all of them as it sees fit,
which probably means we want int3 after every jump to prevent straight-line
speculation from allocating an XSA number for us. It's possible the linker might
inject them, but it might also not. Better to err on the side of caution.

Though more generally, I'd just keep all exception entry points in the same
section. They'd never get GC'ed anyway and we're paying an extra branch in the
#PF path for no reason.

Cheers,
Alejandro



 


Rackspace

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