[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <039eac1a-cafe-b20b-77c8-bad019d4320c@gmail.com>
Date: Fri, 7 Feb 2020 19:47:28 +0300
From: Dmitry Osipenko <digetx@...il.com>
To: Peter Zijlstra <peterz@...radead.org>
Cc: linux-kernel@...r.kernel.org,
tip-bot2 for Peter Zijlstra <tip-bot2@...utronix.de>,
linux-tip-commits@...r.kernel.org, Will Deacon <will@...nel.org>,
Thierry Reding <thierry.reding@...il.com>,
Jon Hunter <jonathanh@...dia.com>,
Andy Lutomirski <luto@...nel.org>,
Borislav Petkov <bp@...en8.de>,
Brian Gerst <brgerst@...il.com>,
Denys Vlasenko <dvlasenk@...hat.com>,
"H. Peter Anvin" <hpa@...or.com>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Mark Rutland <mark.rutland@....com>,
Thomas Gleixner <tglx@...utronix.de>,
ard.biesheuvel@...aro.org, james.morse@....com, rabin@....in,
Ingo Molnar <mingo@...nel.org>, x86 <x86@...nel.org>,
"linux-tegra@...r.kernel.org" <linux-tegra@...r.kernel.org>,
"linux-arm-kernel@...ts.infradead.org"
<linux-arm-kernel@...ts.infradead.org>
Subject: Re: [tip: core/kprobes] arm/ftrace: Use __patch_text()
07.02.2020 14:27, Peter Zijlstra пишет:
>> NVIDIA Tegra20/30 are not booting with CONFIG_FTRACE=y, but even with
>> CONFIG_FTRACE=n things are not working well.
>
> Ooh, I think I see. Can you try this:
>
> diff --git a/arch/arm/kernel/ftrace.c b/arch/arm/kernel/ftrace.c
> index 2a5ff69c28e6..10499d44964a 100644
> --- a/arch/arm/kernel/ftrace.c
> +++ b/arch/arm/kernel/ftrace.c
> @@ -78,13 +78,10 @@ static int ftrace_modify_code(unsigned long pc, unsigned long old,
> {
> unsigned long replaced;
>
> - if (IS_ENABLED(CONFIG_THUMB2_KERNEL)) {
> + if (IS_ENABLED(CONFIG_THUMB2_KERNEL))
> old = __opcode_to_mem_thumb32(old);
> - new = __opcode_to_mem_thumb32(new);
> - } else {
> + else
> old = __opcode_to_mem_arm(old);
> - new = __opcode_to_mem_arm(new);
> - }
>
> if (validate) {
> if (probe_kernel_read(&replaced, (void *)pc, MCOUNT_INSN_SIZE))
>
Hello Peter,
It fixes the problem, at least kernel is booting fine now and I can't
notice any problems. Thank you very much! :)
Tested-by: Dmitry Osipenko <digetx@...il.com>
Powered by blists - more mailing lists