lkml.org 
[lkml]   [2023]   [Jul]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    SubjectRe: radeon.ko/i586: BUG: kernel NULL pointer dereference,address:00000004
    Date
    rostedt@goodmis.org sed in <20230717113623.41878887@gandalf.local.home>

    >> On Fri, 14 Jul 2023 14:34:04 +0900
    >> <kkabe@vega.pgw.jp> wrote:
    >>
    >> > Patch in
    >> > https://bugzilla.kernel.org/show_bug.cgi?id=217669#c4
    >> > fixed the problem in freedesktop.org kernel 5.18.0-rc2 .
    >> > This may explain that in kernel.org tree, the said commit is in kernel-5.19.
    >>
    >> You mean the patch that adds:
    >>
    >> #if defined(FTRACE_MCOUNT_MAX_OFFSET) && (FTRACE_MCOUNT_MAX_OFFSET)
    >>
    >> ?
    >>
    >> Nothing should be setting FTRACE_MCOUNT_MAX_OFFSET to anything but non
    >> zero. But doing a grep, I now see:
    >>
    >> # define FTRACE_MCOUNT_MAX_OFFSET ENDBR_INSN_SIZE
    >>
    >> Where it breaks that assumption if ENDBR_INSN_SIZE == 0 :-p
    >> (and that's my code!)
    >>
    >> OK, does this fix it? (I haven't tested nor compiled this)
    >>
    >> -- Steve
    >>
    >> diff --git a/arch/x86/include/asm/ftrace.h b/arch/x86/include/asm/ftrace.h
    >> index 897cf02c20b1..801f4414da3e 100644
    >> --- a/arch/x86/include/asm/ftrace.h
    >> +++ b/arch/x86/include/asm/ftrace.h
    >> @@ -13,7 +13,7 @@
    >> #ifdef CONFIG_HAVE_FENTRY
    >> # include <asm/ibt.h>
    >> /* Add offset for endbr64 if IBT enabled */
    >> -# define FTRACE_MCOUNT_MAX_OFFSET ENDBR_INSN_SIZE
    >> +# define FTRACE_MCOUNT_MAX_OFFSET (ENDBR_INSN_SIZE + MCOUNT_INSN_SIZE)
    >> #endif
    >>
    >> #ifdef CONFIG_DYNAMIC_FTRACE
    >>

    Above patch didn't work, but
    Does it matter that I am compiling with "gcc -fcf-protection=none"
    to not emit endbr32 instructions for i586?

    --
    kabe

    \
     
     \ /
      Last update: 2023-07-22 04:31    [W:8.781 / U:0.020 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site