diff mbox

kernel BUG at kernel/kallsyms.c:222!

Message ID CACVXFVPQfUtrc4r4cS9J+6q5Z6hGZDgafH=M_6JfrzrAUGJOHw@mail.gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Ming Lei Nov. 12, 2013, 3:22 a.m. UTC
On Tue, Nov 12, 2013 at 3:32 AM, Russell King - ARM Linux
<linux@arm.linux.org.uk> wrote:
> On Mon, Nov 11, 2013 at 05:15:29PM +0000, Jonathan Austin wrote:
>> I've tested the patch below and it solves the ARM side of things - so
>> gives you an option other than a complete revert. Happy to put this in to
>> RMK's patch system if you'd prefer not to have to revert and he's happy
>> with the patch.
>
> I think this is the right solution because it then means that this symbol
> has the same meaning whether on MMU or !MMU - and getting rid of these
> kinds of gratuitous variances are the only way that !MMU is going to
> become less fragile.

The patch only fixes problem on arm, and other !MMU&&!ARM archs
should be affected too.

Also there is no CONFIG_PAGE_OFFSET defined for some ARCHs,
such as 64bit ARCHs.

Currently, I suggest to filter only on ARM as attachment patch if we plan
to merge Jonathan's patch, otherwise a more complicated approach has
to be figured out  to do the filter(such as, define a readonly symbol in
kernel to store PAGE_OFFSET, and let scripts/kallsyms use it for
filtering).



Thanks,

Comments

Jonathan Austin Nov. 12, 2013, 5:36 p.m. UTC | #1
On 12/11/13 03:22, Ming Lei wrote:
> On Tue, Nov 12, 2013 at 3:32 AM, Russell King - ARM Linux
> <linux@arm.linux.org.uk> wrote:
>> On Mon, Nov 11, 2013 at 05:15:29PM +0000, Jonathan Austin wrote:
>>> I've tested the patch below and it solves the ARM side of things - so
>>> gives you an option other than a complete revert. Happy to put this in to
>>> RMK's patch system if you'd prefer not to have to revert and he's happy
>>> with the patch.
>>
>> I think this is the right solution because it then means that this symbol
>> has the same meaning whether on MMU or !MMU - and getting rid of these
>> kinds of gratuitous variances are the only way that !MMU is going to
>> become less fragile.
>
> The patch only fixes problem on arm, and other !MMU&&!ARM archs
> should be affected too.
>
> Also there is no CONFIG_PAGE_OFFSET defined for some ARCHs,
> such as 64bit ARCHs.
>
> Currently, I suggest to filter only on ARM as attachment patch if we plan
> to merge Jonathan's patch, otherwise a more complicated approach has
> to be figured out  to do the filter(such as, define a readonly symbol in
> kernel to store PAGE_OFFSET, and let scripts/kallsyms use it for
> filtering).

I'm happy with that approach, though allowing only ARM seems a bit
conservative - is it the only architecture we actually expect to work?

Jonny
>
>
>
> Thanks,
>


-- IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium.  Thank you.

ARM Limited, Registered office 110 Fulbourn Road, Cambridge CB1 9NJ, Registered in England & Wales, Company No:  2557590
ARM Holdings plc, Registered office 110 Fulbourn Road, Cambridge CB1 9NJ, Registered in England & Wales, Company No:  2548782
Ming Lei Nov. 13, 2013, 4:41 a.m. UTC | #2
On Wed, Nov 13, 2013 at 1:36 AM, Jonathan Austin
<Jonathan.Austin@arm.com> wrote:
>> Currently, I suggest to filter only on ARM as attachment patch if we plan
>> to merge Jonathan's patch, otherwise a more complicated approach has
>> to be figured out  to do the filter(such as, define a readonly symbol in
>> kernel to store PAGE_OFFSET, and let scripts/kallsyms use it for
>> filtering).
>
>
> I'm happy with that approach, though allowing only ARM seems a bit
> conservative - is it the only architecture we actually expect to work?

Yes, the problem is only reported on ARM, so let's do it.


Thanks,
Axel Lin Nov. 13, 2013, 9:58 a.m. UTC | #3
2013/11/12 Ming Lei <tom.leiming@gmail.com>:
> On Tue, Nov 12, 2013 at 3:32 AM, Russell King - ARM Linux
> <linux@arm.linux.org.uk> wrote:
>> On Mon, Nov 11, 2013 at 05:15:29PM +0000, Jonathan Austin wrote:
>>> I've tested the patch below and it solves the ARM side of things - so
>>> gives you an option other than a complete revert. Happy to put this in to
>>> RMK's patch system if you'd prefer not to have to revert and he's happy
>>> with the patch.
>>
>> I think this is the right solution because it then means that this symbol
>> has the same meaning whether on MMU or !MMU - and getting rid of these
>> kinds of gratuitous variances are the only way that !MMU is going to
>> become less fragile.
>
> The patch only fixes problem on arm, and other !MMU&&!ARM archs
> should be affected too.
>
> Also there is no CONFIG_PAGE_OFFSET defined for some ARCHs,
> such as 64bit ARCHs.
>
> Currently, I suggest to filter only on ARM as attachment patch if we plan
> to merge Jonathan's patch, otherwise a more complicated approach has
> to be figured out  to do the filter(such as, define a readonly symbol in
> kernel to store PAGE_OFFSET, and let scripts/kallsyms use it for
> filtering).

Hi Ming,
You missed "; then" in the end of if statement in your patch.

So I got below error with your patch:
scripts/link-vmlinux.sh: line 87: syntax error near unexpected token `fi'
make: *** [vmlinuxclean] Error 2

Regards,
Axel
Ming Lei Nov. 13, 2013, 11:30 a.m. UTC | #4
Hi Axel,

On Wed, Nov 13, 2013 at 5:58 PM, Axel Lin <axel.lin@ingics.com> wrote:
>
> Hi Ming,
> You missed "; then" in the end of if statement in your patch.
>
> So I got below error with your patch:
> scripts/link-vmlinux.sh: line 87: syntax error near unexpected token `fi'
> make: *** [vmlinuxclean] Error 2

Thanks for your test, and I have fixed it and post a formal one for merge,
and you can find these two patches on arm list, but forget to Cc you, sorry
for that.


Thanks,
Axel Lin Dec. 2, 2013, 1:57 a.m. UTC | #5
2013/11/13 Ming Lei <tom.leiming@gmail.com>:
> Hi Axel,
>
> On Wed, Nov 13, 2013 at 5:58 PM, Axel Lin <axel.lin@ingics.com> wrote:
>>
>> Hi Ming,
>> You missed "; then" in the end of if statement in your patch.
>>
>> So I got below error with your patch:
>> scripts/link-vmlinux.sh: line 87: syntax error near unexpected token `fi'
>> make: *** [vmlinuxclean] Error 2
>
> Thanks for your test, and I have fixed it and post a formal one for merge,
> and you can find these two patches on arm list, but forget to Cc you, sorry
> for that.

Hi Ming,
Both your patch and Jonathan's patch are still not in linux-next.
Any chance to resend the patchs to RMK's patch system?

Thanks,
Axel
Ming Lei Dec. 2, 2013, 2:08 a.m. UTC | #6
Hi Axel,

I am fine to resend it to RMK's patch system, but I am not sure
if Russell would like to host it.

Maybe it is better to push it via Rusty's tree since the change is only
on scripts/, and it doesn't depend on the 1st one.

Rusty, could you pick up the patch with title of
"scripts/link-vmlinux.sh: only filter kernel symbols for arm"?


Thanks,
--
Ming Lei

On Mon, Dec 2, 2013 at 9:57 AM, Axel Lin <axel.lin@ingics.com> wrote:
> 2013/11/13 Ming Lei <tom.leiming@gmail.com>:
>> Hi Axel,
>>
>> On Wed, Nov 13, 2013 at 5:58 PM, Axel Lin <axel.lin@ingics.com> wrote:
>>>
>>> Hi Ming,
>>> You missed "; then" in the end of if statement in your patch.
>>>
>>> So I got below error with your patch:
>>> scripts/link-vmlinux.sh: line 87: syntax error near unexpected token `fi'
>>> make: *** [vmlinuxclean] Error 2
>>
>> Thanks for your test, and I have fixed it and post a formal one for merge,
>> and you can find these two patches on arm list, but forget to Cc you, sorry
>> for that.
>
> Hi Ming,
> Both your patch and Jonathan's patch are still not in linux-next.
> Any chance to resend the patchs to RMK's patch system?
>
> Thanks,
> Axel
Rusty Russell Dec. 10, 2013, 6:17 a.m. UTC | #7
Ming Lei <tom.leiming@gmail.com> writes:

> Hi Axel,
>
> I am fine to resend it to RMK's patch system, but I am not sure
> if Russell would like to host it.
>
> Maybe it is better to push it via Rusty's tree since the change is only
> on scripts/, and it doesn't depend on the 1st one.
>
> Rusty, could you pick up the patch with title of
> "scripts/link-vmlinux.sh: only filter kernel symbols for arm"?

OK, and I added the correct Fixes: line so the stable people can track
it properly:

Cc: <stable@vger.kernel.org>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Fixes: f6537f2f0eba4eba3354e48dbe3047db6d8b6254
Singed-off-by: Ming Lei <tom.leiming@gmail.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>

BTW, you misspelled Signed-off-by :)

Applied,
Rusty.


>
> Thanks,
> --
> Ming Lei
>
> On Mon, Dec 2, 2013 at 9:57 AM, Axel Lin <axel.lin@ingics.com> wrote:
>> 2013/11/13 Ming Lei <tom.leiming@gmail.com>:
>>> Hi Axel,
>>>
>>> On Wed, Nov 13, 2013 at 5:58 PM, Axel Lin <axel.lin@ingics.com> wrote:
>>>>
>>>> Hi Ming,
>>>> You missed "; then" in the end of if statement in your patch.
>>>>
>>>> So I got below error with your patch:
>>>> scripts/link-vmlinux.sh: line 87: syntax error near unexpected token `fi'
>>>> make: *** [vmlinuxclean] Error 2
>>>
>>> Thanks for your test, and I have fixed it and post a formal one for merge,
>>> and you can find these two patches on arm list, but forget to Cc you, sorry
>>> for that.
>>
>> Hi Ming,
>> Both your patch and Jonathan's patch are still not in linux-next.
>> Any chance to resend the patchs to RMK's patch system?
>>
>> Thanks,
>> Axel
>
>
>
> -- 
> Ming Lei
diff mbox

Patch

diff --git a/scripts/link-vmlinux.sh b/scripts/link-vmlinux.sh
index 32b10f5..2dca94a 100644
--- a/scripts/link-vmlinux.sh
+++ b/scripts/link-vmlinux.sh
@@ -82,7 +82,9 @@  kallsyms()
 		kallsymopt="${kallsymopt} --all-symbols"
 	fi
 
-	kallsymopt="${kallsymopt} --page-offset=$CONFIG_PAGE_OFFSET"
+	if [ -n "${CONFIG_ARM}" ]
+		kallsymopt="${kallsymopt} --page-offset=$CONFIG_PAGE_OFFSET"
+	fi
 
 	local aflags="${KBUILD_AFLAGS} ${KBUILD_AFLAGS_KERNEL}               \
 		      ${NOSTDINC_FLAGS} ${LINUXINCLUDE} ${KBUILD_CPPFLAGS}"