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

Re: [PATCH v8 RESEND 6/6] common: honor CONFIG_CC_SPLIT_SECTIONS also for assembly functions



Hi Jan,

I am not very familiar with CC_SPLIT_SECTIONS. But I will try to answer the Arm questions.

On 13/03/2025 08:10, 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
---
TBD: Since we use .subsection in UNLIKELY_START(), a perhaps not really
      wanted side effect of this change is that respective out-of-line
      code now moves much closer to its original (invoking) code.

TBD: Of course something with the same overall effect, but less
      impactful might do in Config.mk. E.g. $(filter-out -D%,$(3))
      instead of $(firstword (3)). In fact Roger wants the detection to
      be in Kconfig, for LIVEPATCH to depend on it. Yet the whole
      underlying discussion there imo would first need settling (and
      therefore reviving).

Note that we'd need to split DATA() in order to separate r/w, r/o, and
BSS contributions. Further splitting might be needed to also support
more advanced attributes (e.g. merge), hence why this isn't done right
here. Sadly while a new section's name can be derived from the presently
in use, its attributes cannot be. Perhaps the only thing we can do is
give DATA() a 2nd mandatory parameter. Then again I guess most data
definitions could be moved to C anyway.

An alternative to the "override" in arm64/head.S would be to use
LABEL{,_LOCAL}() instead of FUNC{,_LOCAL}() there. Yet that would also
lose the type information then. Question is whether the annotated ranges
> really are "functions" in whichever wide or narrow sense.

They are functions. So I would prefer if we keep FUNC{,_LOCAL} and do the override as proposed in this patch..

Also, I think you want to move some of the override from the previous patches to this patch.

Cheers,

--
Julien Grall




 


Rackspace

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