lkml.org 
[lkml]   [2014]   [Dec]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    SubjectRe: [LKP] [PATCH] drm/radeon: Try to init amdkfd only if 64 bit kernel
    Date
    Oded Gabbay <oded.gabbay@amd.com> writes:
    > I didn't say it doesn't always work.
    > The actual thing that doesn't work is the define symbol_get and only in a
    > specific case of 32bit kernel AND CONFIG_MODULES is unset AND
    > CONFIG_RANDOMIZE_BASE is set.
    > The define in that case is:
    > #define symbol_get(x) ({ extern typeof(x) x __attribute__((weak)); &(x); })
    >
    > Why it doesn't work (doesn't return NULL when symbol doesn't exists) ?

    Hmm, I'd guess CONFIG_RANDOMIZE_BASE is relocating NULL symbols...

    No, I can't reproduce this. Please send your .config privately.

    Here's my test case:

    diff --git a/init/main.c b/init/main.c
    index 61b993767db5..a3ee1ec97ec3 100644
    --- a/init/main.c
    +++ b/init/main.c
    @@ -683,6 +683,12 @@ asmlinkage __visible void __init start_kernel(void)

    ftrace_init();

    + {
    + extern void nonexistent_fn(void);
    + printk("symbol_get(nonexistent_fn) = %p\n",
    + symbol_get(nonexistent_fn));
    + }
    +
    /* Do the rest non-__init'ed, we're now alive */
    rest_init();
    }
    Thanks,
    Rusty.


    \
     
     \ /
      Last update: 2014-12-24 00:41    [W:2.542 / U:0.684 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site