From mboxrd@z Thu Jan 1 00:00:00 1970 Subject: Re: Enable/Disable of ftrace events crashes kernel References: <3b8bf95c-5170-d229-b27f-1577a2e0942b@siemens.com> From: Jan Kiszka Message-ID: Date: Thu, 11 Jul 2019 20:30:55 +0200 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit List-Id: Discussions about the Xenomai project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Richard Weinberger Cc: xenomai@xenomai.org On 11.07.19 12:25, Richard Weinberger wrote: > On Thu, Jul 11, 2019 at 12:21 PM Jan Kiszka 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