Re: [tip: core/kprobes] arm/ftrace: Use __patch_text()
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- Subject: Re: [tip: core/kprobes] arm/ftrace: Use __patch_text()
- From: Dmitry Osipenko <digetx@xxxxxxxxx>
- Date: Fri, 7 Feb 2020 19:47:28 +0300
- Cc: linux-kernel@xxxxxxxxxxxxxxx, tip-bot2 for Peter Zijlstra <tip-bot2@xxxxxxxxxxxxx>, linux-tip-commits@xxxxxxxxxxxxxxx, Will Deacon <will@xxxxxxxxxx>, Thierry Reding <thierry.reding@xxxxxxxxx>, Jon Hunter <jonathanh@xxxxxxxxxx>, Andy Lutomirski <luto@xxxxxxxxxx>, Borislav Petkov <bp@xxxxxxxxx>, Brian Gerst <brgerst@xxxxxxxxx>, Denys Vlasenko <dvlasenk@xxxxxxxxxx>, "H. Peter Anvin" <hpa@xxxxxxxxx>, Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>, Mark Rutland <mark.rutland@xxxxxxx>, Thomas Gleixner <tglx@xxxxxxxxxxxxx>, ard.biesheuvel@xxxxxxxxxx, james.morse@xxxxxxx, rabin@xxxxxx, Ingo Molnar <mingo@xxxxxxxxxx>, x86 <x86@xxxxxxxxxx>, "linux-tegra@xxxxxxxxxxxxxxx" <linux-tegra@xxxxxxxxxxxxxxx>, "linux-arm-kernel@xxxxxxxxxxxxxxxxxxx" <linux-arm-kernel@xxxxxxxxxxxxxxxxxxx>
- In-reply-to: <20200207112720.GF14914@hirez.programming.kicks-ass.net>
- References: <20191113092636.GG4131@hirez.programming.kicks-ass.net> <157544841563.21853.2859696202562513480.tip-bot2@tip-bot2> <10cbfd9e-2f1f-0a0c-0160-afe6c2ccbebd@gmail.com> <20200207112720.GF14914@hirez.programming.kicks-ass.net>
- User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.3.0
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@xxxxxxxxx>
[Index of Archives]
[Linux Stable Commits]
[Linux Stable Kernel]
[Linux Kernel]
[Linux USB Devel]
[Linux Video &Media]
[Linux Audio Users]
[Yosemite News]
[Linux SCSI]