All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@siemens.com>
To: Richard Weinberger <richard.weinberger@gmail.com>
Cc: xenomai@xenomai.org
Subject: Re: Enable/Disable of ftrace events crashes kernel
Date: Thu, 11 Jul 2019 20:30:55 +0200	[thread overview]
Message-ID: <fb2a4587-5180-663b-1dee-e2b7b114fc63@siemens.com> (raw)
In-Reply-To: <CAFLxGvzgCuoaG+O9EyiJZG_YD-2KQxVWd1LG-FepiEAjebqJnQ@mail.gmail.com>

On 11.07.19 12:25, Richard Weinberger wrote:
> On Thu, Jul 11, 2019 at 12:21 PM Jan Kiszka <jan.kiszka@siemens.com> wrote:
>> Can't reproduce so far, even with a while-true loop. Can you share your .config?
> 
> Sure, see attachment.
> 

This seems to fix the issue here:

diff --git a/arch/x86/entry/entry_64.S b/arch/x86/entry/entry_64.S
index 119fd66d111e..8f647c208cf2 100644
--- a/arch/x86/entry/entry_64.S
+++ b/arch/x86/entry/entry_64.S
@@ -997,8 +997,8 @@ apicinterrupt IRQ_WORK_VECTOR			irq_work_interrupt		smp_irq_work_interrupt
 \skip_label:
 	UNWIND_HINT_REGS
 	DISABLE_INTERRUPTS(CLBR_ANY)
-	testl	%ebx, %ebx	/* %ebx: return to kernel mode */
-	jnz	retint_kernel_early
+	testb	$3, CS(%rsp)
+	jz	retint_kernel_early
 	jmp	retint_user_early
 	.endif
 1001:

Tests welcome!

Interestingly, 4.14 should have the same problem, but I failed to
reproduce there so far.

Jan

-- 
Siemens AG, Corporate Technology, CT RDA IOT SES-DE
Corporate Competence Center Embedded Linux


  reply	other threads:[~2019-07-11 18:30 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-10 22:29 Enable/Disable of ftrace events crashes kernel Richard Weinberger
2019-07-11 10:21 ` Jan Kiszka
2019-07-11 10:25   ` Richard Weinberger
2019-07-11 18:30     ` Jan Kiszka [this message]
2019-07-11 18:49       ` Jan Kiszka
2019-07-11 20:48       ` Richard Weinberger
2019-07-11 21:20         ` Jan Kiszka
2019-07-12  7:17           ` Richard Weinberger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=fb2a4587-5180-663b-1dee-e2b7b114fc63@siemens.com \
    --to=jan.kiszka@siemens.com \
    --cc=richard.weinberger@gmail.com \
    --cc=xenomai@xenomai.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.