search for: paravirt_typenum

Displaying 20 results from an estimated 58 matches for "paravirt_typenum".

2018 Dec 17
0
[PATCH v3 04/12] Revert "x86/paravirt: Work around GCC inlining bugs when compiling paravirt ops"
..." .byte " type "\n" \ + " .byte 772b-771b\n" \ + " .short " clobber "\n" \ + ".popsection\n" + /* Generate patchable code, with the default asm parameters. */ -#define paravirt_call \ - "PARAVIRT_CALL type=\"%c[paravirt_typenum]\"" \ - " clobber=\"%c[paravirt_clobber]\"" \ - " pv_opptr=\"%c[paravirt_opptr]\";" +#define paravirt_alt(insn_string) \ + _paravirt_alt(insn_string, "%c[paravirt_typenum]", "%c[paravirt_clobber]") /* Simple instructi...
2017 Oct 04
0
[PATCH 08/13] x86/paravirt: Clean up paravirt_types.h
...clude/asm/paravirt_types.h @@ -331,33 +331,6 @@ extern struct pv_irq_ops pv_irq_ops; extern struct pv_mmu_ops pv_mmu_ops; extern struct pv_lock_ops pv_lock_ops; -#define PARAVIRT_PATCH(x) \ - (offsetof(struct paravirt_patch_template, x) / sizeof(void *)) - -#define paravirt_type(op) \ - [paravirt_typenum] "i" (PARAVIRT_PATCH(op)), \ - [paravirt_opptr] "i" (&(op)) -#define paravirt_clobber(clobber) \ - [paravirt_clobber] "i" (clobber) - -/* - * Generate some code, and mark it as patchable by the - * apply_paravirt() alternate instruction patcher. - */ -#define _par...
2018 Jun 20
0
[PATCH v5 6/9] x86: prevent inline distortion by paravirt ops
On Tue, Jun 19, 2018 at 12:48:51PM -0700, Nadav Amit wrote: > +#define paravirt_alt \ > + "PARAVIRT_CALL type=\"%c[paravirt_typenum]\"" \ > + " clobber=\"%c[paravirt_clobber]\"" \ > + " pv_opptr=\"%c[paravirt_opptr]\"" That wants to be: + " pv_opptr=\"%c[paravirt_opptr]\";" And other than that I would suggest: 's/paravirt_alt/paravirt_ca...
2019 May 20
0
[PATCH v7 11/12] x86/paravirt: Adapt assembly for PIE support
...ruct paravirt_patch_template, x) / sizeof(void *)) +#ifdef CONFIG_X86_PIE +#define paravirt_opptr_call "a" +#define paravirt_opptr_type "p" +#else +#define paravirt_opptr_call "c" +#define paravirt_opptr_type "i" +#endif + #define paravirt_type(op) \ [paravirt_typenum] "i" (PARAVIRT_PATCH(op)), \ - [paravirt_opptr] "i" (&(pv_ops.op)) + [paravirt_opptr] paravirt_opptr_type (&(pv_ops.op)) #define paravirt_clobber(clobber) \ [paravirt_clobber] "i" (clobber) @@ -393,7 +401,7 @@ int paravirt_disable_iospace(void); */ #de...
2019 Jul 30
0
[PATCH v9 10/11] x86/paravirt: Adapt assembly for PIE support
...onal nop to the call + * instruction to ensure patching is possible. + */ +#define PARAVIRT_CALL_POST "nop;" +#else +#define paravirt_opptr_call "c" +#define paravirt_opptr_type "i" +#define PARAVIRT_CALL_POST "" +#endif + #define paravirt_type(op) \ [paravirt_typenum] "i" (PARAVIRT_PATCH(op)), \ - [paravirt_opptr] "i" (&(pv_ops.op)) + [paravirt_opptr] paravirt_opptr_type (&(pv_ops.op)) #define paravirt_clobber(clobber) \ [paravirt_clobber] "i" (clobber) @@ -379,9 +395,10 @@ int paravirt_disable_iospace(void); * offs...
2019 Dec 05
0
[PATCH v10 10/11] x86/paravirt: Adapt assembly for PIE support
...5 fa d9 ff 00 callq *0xffd9fa(%rip) # <pv_ops+0x30> + * + */ +#define PARAVIRT_CALL_POST "nop;" +#else +#define paravirt_opptr_call "c" +#define paravirt_opptr_type "i" +#define PARAVIRT_CALL_POST "" +#endif + #define paravirt_type(op) \ [paravirt_typenum] "i" (PARAVIRT_PATCH(op)), \ - [paravirt_opptr] "i" (&(pv_ops.op)) + [paravirt_opptr] paravirt_opptr_type (&(pv_ops.op)) #define paravirt_clobber(clobber) \ [paravirt_clobber] "i" (clobber) @@ -377,9 +400,10 @@ int paravirt_disable_iospace(void); * offs...
2019 Jul 30
5
[PATCH v9 00/11] x86: PIE support to extend KASLR randomization
Minor changes based on feedback and rebase from v8. Splitting the previous serie in two. This part contains assembly code changes required for PIE but without any direct dependencies with the rest of the patchset. Changes: - patch v9 (assembly): - Moved to relative reference for sync_core based on feedback. - x86/crypto had multiple algorithms deleted, removed PIE changes to them. -
2019 Jul 30
5
[PATCH v9 00/11] x86: PIE support to extend KASLR randomization
Minor changes based on feedback and rebase from v8. Splitting the previous serie in two. This part contains assembly code changes required for PIE but without any direct dependencies with the rest of the patchset. Changes: - patch v9 (assembly): - Moved to relative reference for sync_core based on feedback. - x86/crypto had multiple algorithms deleted, removed PIE changes to them. -
2007 Apr 19
1
[RFC, PATCH 5/5] Paravirt_ops export.patch
...odules, generate a bogus BUG, which leaves enough space for + * the patch to a direct call to be made and eliminates the need to + * export paravirt_ops to modules. */ +#ifdef MODULE +#define PARAVIRT_CALL "ud2a; nop; nop; nop;" +#else #define PARAVIRT_CALL "call *(paravirt_ops+%c[paravirt_typenum]*4);" +#endif /* * These macros are intended to wrap calls into a paravirt_ops
2007 Apr 19
1
[RFC, PATCH 5/5] Paravirt_ops export.patch
...odules, generate a bogus BUG, which leaves enough space for + * the patch to a direct call to be made and eliminates the need to + * export paravirt_ops to modules. */ +#ifdef MODULE +#define PARAVIRT_CALL "ud2a; nop; nop; nop;" +#else #define PARAVIRT_CALL "call *(paravirt_ops+%c[paravirt_typenum]*4);" +#endif /* * These macros are intended to wrap calls into a paravirt_ops
2017 Oct 04
0
[PATCH 04/13] x86/paravirt: Convert DEF_NATIVE macro to GCC extended asm syntax
...x86/include/asm/paravirt_types.h b/arch/x86/include/asm/paravirt_types.h index e99e5ac3e036..ab7aabe6b668 100644 --- a/arch/x86/include/asm/paravirt_types.h +++ b/arch/x86/include/asm/paravirt_types.h @@ -359,11 +359,15 @@ extern struct pv_lock_ops pv_lock_ops; _paravirt_alt(insn_string, "%c[paravirt_typenum]", "%c[paravirt_clobber]") /* Simple instruction patching code. */ -#define NATIVE_LABEL(a,x,b) "\n\t.globl " a #x "_" #b "\n" a #x "_" #b ":\n\t" +#define NATIVE_LABEL(a,x,b) "\n" a #x "_" #b ":\n\t"...
2019 May 20
3
[PATCH v7 00/12] x86: PIE support to extend KASLR randomization
Splitting the previous serie in two. This part contains assembly code changes required for PIE but without any direct dependencies with the rest of the patchset. Changes: - patch v7 (assembly): - Split patchset and reorder changes. - patch v6: - Rebase on latest changes in jump tables and crypto. - Fix wording on couple commits. - Revisit checkpatch warnings. - Moving to
2019 Jul 31
2
[PATCH v9 10/11] x86/paravirt: Adapt assembly for PIE support
...9;native' sequence we seem to have is also 6 bytes (.cpu_usergs_sysret64). > +#else > +#define paravirt_opptr_call "c" > +#define paravirt_opptr_type "i" > +#define PARAVIRT_CALL_POST "" > +#endif > + > #define paravirt_type(op) \ > [paravirt_typenum] "i" (PARAVIRT_PATCH(op)), \ > - [paravirt_opptr] "i" (&(pv_ops.op)) > + [paravirt_opptr] paravirt_opptr_type (&(pv_ops.op)) > #define paravirt_clobber(clobber) \ > [paravirt_clobber] "i" (clobber) > > @@ -379,9 +395,10 @@ int paravirt_d...
2019 Jul 31
2
[PATCH v9 10/11] x86/paravirt: Adapt assembly for PIE support
...9;native' sequence we seem to have is also 6 bytes (.cpu_usergs_sysret64). > +#else > +#define paravirt_opptr_call "c" > +#define paravirt_opptr_type "i" > +#define PARAVIRT_CALL_POST "" > +#endif > + > #define paravirt_type(op) \ > [paravirt_typenum] "i" (PARAVIRT_PATCH(op)), \ > - [paravirt_opptr] "i" (&(pv_ops.op)) > + [paravirt_opptr] paravirt_opptr_type (&(pv_ops.op)) > #define paravirt_clobber(clobber) \ > [paravirt_clobber] "i" (clobber) > > @@ -379,9 +395,10 @@ int paravirt_d...
2018 Dec 17
3
[PATCH v3 00/12] x86, kbuild: revert macrofying inline assembly code
This series reverts the in-kernel workarounds for inlining issues. The commit description of 77b0bf55bc67 mentioned "We also hope that GCC will eventually get fixed,..." Now, GCC provides a solution. https://gcc.gnu.org/onlinedocs/gcc/Extended-Asm.html explains the new "asm inline" syntax. The performance issue will be eventually solved. [About Code cleanups] I know Nadam
2018 Dec 17
3
[PATCH v3 00/12] x86, kbuild: revert macrofying inline assembly code
This series reverts the in-kernel workarounds for inlining issues. The commit description of 77b0bf55bc67 mentioned "We also hope that GCC will eventually get fixed,..." Now, GCC provides a solution. https://gcc.gnu.org/onlinedocs/gcc/Extended-Asm.html explains the new "asm inline" syntax. The performance issue will be eventually solved. [About Code cleanups] I know Nadam
2007 Apr 18
23
[patch 00/20] paravirt_ops updates
Hi Andi, Here's a repost of the paravirt_ops update series I posted the other day. Since then, I found a few potential bugs with patching clobbering, cleaned up and documented paravirt.h and the patching machinery. Overview: add-MAINTAINERS.patch obvious remove-CONFIG_DEBUG_PARAVIRT.patch No longer meaningful or needed. paravirt-nop.patch Clean up nop paravirt_ops functions, mainly to
2007 Apr 18
23
[patch 00/20] paravirt_ops updates
Hi Andi, Here's a repost of the paravirt_ops update series I posted the other day. Since then, I found a few potential bugs with patching clobbering, cleaned up and documented paravirt.h and the patching machinery. Overview: add-MAINTAINERS.patch obvious remove-CONFIG_DEBUG_PARAVIRT.patch No longer meaningful or needed. paravirt-nop.patch Clean up nop paravirt_ops functions, mainly to
2018 Dec 16
1
[PATCH v2] x86, kbuild: revert macrofying inline assembly code
..." .byte " type "\n" \ + " .byte 772b-771b\n" \ + " .short " clobber "\n" \ + ".popsection\n" + /* Generate patchable code, with the default asm parameters. */ -#define paravirt_call \ - "PARAVIRT_CALL type=\"%c[paravirt_typenum]\"" \ - " clobber=\"%c[paravirt_clobber]\"" \ - " pv_opptr=\"%c[paravirt_opptr]\";" +#define paravirt_alt(insn_string) \ + _paravirt_alt(insn_string, "%c[paravirt_typenum]", "%c[paravirt_clobber]") /* Simple instructi...
2023 Jun 08
3
[RFC PATCH 0/3] x86/paravirt: Get rid of paravirt patching
This is a small series getting rid of paravirt patching by switching completely to alternative patching for the same functionality. The basic idea is to add the capability to switch from indirect to direct calls via a special alternative patching option. This removes _some_ of the paravirt macro maze, but most of it needs to stay due to the need of hiding the call instructions from the compiler