similar to: [PATCH] x86/paravirt: convert simple paravirt functions to asm

Displaying 20 results from an estimated 400 matches similar to: "[PATCH] x86/paravirt: convert simple paravirt functions to asm"

2023 Mar 17
0
[PATCH v2] x86/paravirt: convert simple paravirt functions to asm
All functions referenced via __PV_IS_CALLEE_SAVE() need to be assembler functions, as those functions calls are hidden from gcc. In case the kernel is compiled with "-fzero-call-used-regs" the compiler will clobber caller-saved registers at the end of C functions, which will result in unexpectedly zeroed registers at the call site of the related paravirt functions. Replace the C
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
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
2020 Jul 15
2
[PATCH v4 63/75] x86/sev-es: Handle #DB Events
On Wed, Jul 15, 2020 at 11:13:37AM +0200, Joerg Roedel wrote: > On Wed, Jul 15, 2020 at 10:47:52AM +0200, Peter Zijlstra wrote: > > On Tue, Jul 14, 2020 at 02:09:05PM +0200, Joerg Roedel wrote: > > > > > @@ -1028,6 +1036,16 @@ DEFINE_IDTENTRY_VC_SAFE_STACK(exc_vmm_communication) > > > struct ghcb *ghcb; > > > > > >
2020 Jul 15
2
[PATCH v4 63/75] x86/sev-es: Handle #DB Events
On Wed, Jul 15, 2020 at 11:13:37AM +0200, Joerg Roedel wrote: > On Wed, Jul 15, 2020 at 10:47:52AM +0200, Peter Zijlstra wrote: > > On Tue, Jul 14, 2020 at 02:09:05PM +0200, Joerg Roedel wrote: > > > > > @@ -1028,6 +1036,16 @@ DEFINE_IDTENTRY_VC_SAFE_STACK(exc_vmm_communication) > > > struct ghcb *ghcb; > > > > > >
2023 Mar 10
1
[PATCH] x86/paravirt: convert simple paravirt functions to asm
On 09.03.23 14:39, Borislav Petkov wrote: > On Wed, Mar 08, 2023 at 04:42:10PM +0100, Juergen Gross wrote: >> All functions referenced via __PV_IS_CALLEE_SAVE() need to be assembler >> functions, as those functions calls are hidden from gcc. In case the >> kernel is compiled with "-fzero-call-used-regs" the compiler will >> clobber caller-saved registers at the
2020 Jul 15
2
[PATCH v4 45/75] x86/sev-es: Adjust #VC IST Stack on entering NMI handler
On Tue, Jul 14, 2020 at 02:08:47PM +0200, Joerg Roedel wrote: > @@ -489,6 +490,9 @@ DEFINE_IDTENTRY_RAW(exc_nmi) > this_cpu_write(nmi_cr2, read_cr2()); > nmi_restart: > > + /* Needs to happen before DR7 is accessed */ > + sev_es_ist_enter(regs); > + > this_cpu_write(nmi_dr7, local_db_save()); > > nmi_enter(); > @@ -502,6 +506,8 @@
2020 Jul 15
2
[PATCH v4 45/75] x86/sev-es: Adjust #VC IST Stack on entering NMI handler
On Tue, Jul 14, 2020 at 02:08:47PM +0200, Joerg Roedel wrote: > @@ -489,6 +490,9 @@ DEFINE_IDTENTRY_RAW(exc_nmi) > this_cpu_write(nmi_cr2, read_cr2()); > nmi_restart: > > + /* Needs to happen before DR7 is accessed */ > + sev_es_ist_enter(regs); > + > this_cpu_write(nmi_dr7, local_db_save()); > > nmi_enter(); > @@ -502,6 +506,8 @@
2020 Jul 15
1
[PATCH v4 63/75] x86/sev-es: Handle #DB Events
On Wed, Jul 15, 2020 at 12:08:08PM +0200, Joerg Roedel wrote: > On Wed, Jul 15, 2020 at 11:51:36AM +0200, Peter Zijlstra wrote: > > On Wed, Jul 15, 2020 at 11:13:37AM +0200, Joerg Roedel wrote: > > > Then my understanding of intrumentation_begin/end() is wrong, I thought > > > that the kernel will forbid setting breakpoints before > > > instrumentation_begin(),
2020 Mar 03
4
[PATCH v11 00/11] x86: PIE support to extend KASLR randomization
On Thu, Feb 27, 2020 at 04:00:45PM -0800, Thomas Garnier wrote: > Minor changes based on feedback and rebase from v10. > > 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. > > Note: Using objtool to detect non-compliant PIE relocations is not yet > possible
2020 Mar 03
4
[PATCH v11 00/11] x86: PIE support to extend KASLR randomization
On Thu, Feb 27, 2020 at 04:00:45PM -0800, Thomas Garnier wrote: > Minor changes based on feedback and rebase from v10. > > 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. > > Note: Using objtool to detect non-compliant PIE relocations is not yet > possible
2020 Jun 23
2
Should SEV-ES #VC use IST? (Re: [PATCH] Allow RDTSC and RDTSCP from userspace)
On Tue, Jun 23, 2020 at 03:59:16PM +0200, Peter Zijlstra wrote: > So basically when your exception frame points to your own IST, you die. > That sounds like something we should have in generic IST code. Something like this... #DF already dies and NMI is 'magic' --- arch/x86/entry/common.c | 7 +++++++ arch/x86/include/asm/idtentry.h | 12 +++++++++++- 2 files changed, 18
2020 Jun 23
2
Should SEV-ES #VC use IST? (Re: [PATCH] Allow RDTSC and RDTSCP from userspace)
On Tue, Jun 23, 2020 at 02:52:01PM +0200, Peter Zijlstra wrote: > On Tue, Jun 23, 2020 at 02:04:33PM +0200, Joerg Roedel wrote: > > No, the recursion check is fine, because overwriting an already used IST > > stack doesn't matter (as long as it can be detected) if we are going to > > panic anyway. It doesn't matter because the kernel will not leave the > >
2020 Jun 23
6
Should SEV-ES #VC use IST? (Re: [PATCH] Allow RDTSC and RDTSCP from userspace)
On Tue, Jun 23, 2020 at 04:59:14PM +0200, Joerg Roedel wrote: > On Tue, Jun 23, 2020 at 04:53:44PM +0200, Peter Zijlstra wrote: > > +noinstr void idtentry_validate_ist(struct pt_regs *regs) > > +{ > > + if ((regs->sp & ~(EXCEPTION_STKSZ-1)) == > > + (_RET_IP_ & ~(EXCEPTION_STKSZ-1))) > > + die("IST stack recursion", regs, 0); > > +}
2020 Jul 15
2
[PATCH v4 63/75] x86/sev-es: Handle #DB Events
On Tue, Jul 14, 2020 at 02:09:05PM +0200, Joerg Roedel wrote: > @@ -1028,6 +1036,16 @@ DEFINE_IDTENTRY_VC_SAFE_STACK(exc_vmm_communication) > struct ghcb *ghcb; > > lockdep_assert_irqs_disabled(); > + > + /* > + * #DB is special and needs to be handled outside of the intrumentation_begin()/end(). > + * Otherwise the #VC handler could be raised recursivly. > +
2020 Jul 15
2
[PATCH v4 63/75] x86/sev-es: Handle #DB Events
On Tue, Jul 14, 2020 at 02:09:05PM +0200, Joerg Roedel wrote: > @@ -1028,6 +1036,16 @@ DEFINE_IDTENTRY_VC_SAFE_STACK(exc_vmm_communication) > struct ghcb *ghcb; > > lockdep_assert_irqs_disabled(); > + > + /* > + * #DB is special and needs to be handled outside of the intrumentation_begin()/end(). > + * Otherwise the #VC handler could be raised recursivly. > +
2020 Aug 05
0
[PATCH] x86/paravirt: Add missing noinstr to arch_local*() helpers
On Wed, Aug 05, 2020 at 03:26:29PM +0200, Marco Elver wrote: > Add missing noinstr to arch_local*() helpers, as they may be called from > noinstr code. > > On a KCSAN config with CONFIG_PARAVIRT=y, syzbot stumbled across corrupt Cute, so I've been working on adding objtool support for this a little: https://lkml.kernel.org/r/20200803143231.GE2674 at
2017 Jun 06
3
llvm-objcopy proposal
Fantastic! Thanks for all of the input! I'll be considering all of it going forward. The plan right now is just to worry about ELF executables and nothing else. I'm very sympathetic to the "llvm-objtool" change. If everyone is cool with it I'll change the name in the next CL to "llvm-objtool". To start out I implemented a very basic ELF64LE specific bit of code.
2020 Aug 11
3
[PATCH] x86/paravirt: Add missing noinstr to arch_local*() helpers
On Tue, Aug 11, 2020 at 11:20:54AM +0200, peterz at infradead.org wrote: > On Tue, Aug 11, 2020 at 10:38:50AM +0200, J?rgen Gro? wrote: > > In case you don't want to do it I can send the patch for the Xen > > variants. > > I might've opened a whole new can of worms here. I'm not sure we > can/want to fix the entire fallout this release :/ > > Let me
2020 Aug 11
3
[PATCH] x86/paravirt: Add missing noinstr to arch_local*() helpers
On Tue, Aug 11, 2020 at 11:20:54AM +0200, peterz at infradead.org wrote: > On Tue, Aug 11, 2020 at 10:38:50AM +0200, J?rgen Gro? wrote: > > In case you don't want to do it I can send the patch for the Xen > > variants. > > I might've opened a whole new can of worms here. I'm not sure we > can/want to fix the entire fallout this release :/ > > Let me