Peter Zijlstra
2018-Jun-11 07:45 UTC
[PATCH v3 6/9] x86: prevent inline distortion by paravirt ops
On Sun, Jun 10, 2018 at 07:19:08AM -0700, Nadav Amit wrote:> +/* > + * This generates an indirect call based on the operation type number. > + * The type number, computed in PARAVIRT_PATCH, is derived from the > + * offset into the paravirt_patch_template structure, and can therefore be > + * freely converted back into a structure offset. > + */ > +.macro PARAVIRT_ALT type:req clobber:req pv_opptr:reqUnlike the marcro maze you replaced, this has the CALL hardcoded in. So maybe name this PARAVIRT_CALL instead of PARAVIRT_ALT ?> +771: ANNOTATE_RETPOLINE_SAFE > + call *\pv_opptr > +772: .pushsection .parainstructions,"a" > + _ASM_ALIGN > + _ASM_PTR 771b > + .byte \type > + .byte 772b-771b > + .short \clobber > + .popsection > +.endm
Reasonably Related Threads
- [PATCH v3 04/12] Revert "x86/paravirt: Work around GCC inlining bugs when compiling paravirt ops"
- [PATCH v2] x86, kbuild: revert macrofying inline assembly code
- [PATCH] kbuild, x86: revert macros in extended asm workarounds
- [PATCH] kbuild, x86: revert macros in extended asm workarounds
- [PATCH 08/13] x86/paravirt: Clean up paravirt_types.h