[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <549A85DE.1040006@amd.com>
Date: Wed, 24 Dec 2014 11:22:38 +0200
From: Oded Gabbay <oded.gabbay@....com>
To: Rusty Russell <rusty@...tcorp.com.au>,
Andi Kleen <ak@...ux.intel.com>,
Alex Deucher <alexdeucher@...il.com>
CC: Dana Elifaz <Dana.Elifaz@....com>,
LKML <linux-kernel@...r.kernel.org>,
Maling list - DRI developers
<dri-devel@...ts.freedesktop.org>,
"Alexander Deucher" <Alexander.Deucher@....com>,
LKP ML <lkp@...org>
Subject: Re: [LKP] [PATCH] drm/radeon: Try to init amdkfd only if 64 bit kernel
On 12/24/2014 01:01 AM, Rusty Russell wrote:
> Oded Gabbay <oded.gabbay@....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.
>
Hi Rusty,
Attached is the bad config file. (config-bad)
I have narrowed the changes you need to do to the config file in order to
reproduce this bug.
The base assumption is a 32-bit kernel and without modules support. Rest of the
config file is pretty standard, IMO.
Then, its not enough to enable CONFIG_RANDOMIZE_BASE like I wrote in my original
post. You need also to unset CONFIG_HIBERNATION.
If you do only one of the changes above, it isn't sufficient to trigger the problem.
I also attached a config-good file, which is almost the same as config-bad,
except the changes I mentioned above that reproduces the problem.
To quickly reproduce it, I run the following command:
qemu-system-i386 -enable-kvm -kernel arch/x86/boot/bzImage -initrd
~/tmp/test32.cpio.gz
The kernel is 3.19-rc1 from Linus' tree. No additional patches on top of that.
I appreciate your help.
Oded
View attachment "config-bad" of type "text/plain" (84361 bytes)
View attachment "config-good" of type "text/plain" (84426 bytes)
Powered by blists - more mailing lists