[PATCH 0/2] x86: adjustments to .fixup section handling

Jan Beulich posted 2 patches 1 year, 2 months ago
Failed in applying to current master (apply log)
[PATCH 0/2] x86: adjustments to .fixup section handling
Posted by Jan Beulich 1 year, 2 months ago
1: macroize switches to/from .fixup section
2: split .fixup section with new enough gas

Jan
Re: [PATCH 0/2] x86: adjustments to .fixup section handling
Posted by Andrew Cooper 1 year, 2 months ago
On 05/01/2023 11:10 am, Jan Beulich wrote:
> 1: macroize switches to/from .fixup section
> 2: split .fixup section with new enough gas
>
> Jan

Honestly, I was planning to make another effort to up the minimum
compiler versions to something which supports asm goto, and delete
.fixup entirely.

This is a prerequisite for taking objtool and using ORC unwinding.  The
use of the fixup section in the first place actually interferes with
backtraces; most uses can be removed with some tweaks (and tightening
overall) to the extable handling mechanism, but the VMX VM* instructions
(needing jae err) in particular can't use extable.

Given that we want to do this for several reasons anyway, I'm not sure
the added complexity here is useful.


As for extable size note, splitting into two tables will complicate the
lookup logic at runtime.  And even by splitting the table, you're only
reducing the search length by less than 1 step.

I don't see splitting the tables turning out to be a win, but there is a
far simpler option I think.  Table is sorted by address, so all we need
to do is make extable_end[] variable, and move it forward when we free
.init, at which point we only binary search through the first part of
the table.

~Andrew