Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Crash Utility (http://www.linux-archive.org/crash-utility/)
-   -   ARM: gcore, arm_regsets causes segfault (http://www.linux-archive.org/crash-utility/664792-arm-gcore-arm_regsets-causes-segfault.html)

Per Fransson 05-09-2012 04:01 PM

ARM: gcore, arm_regsets causes segfault
 
Hi,

The for loop in

libgcore/gcore_coredump.c:fill_thread_core_info()

does a

notesize(struct memelfnote *)

where memelfnote->name points to the name of the corresponding
arm_regset member (except REGSET_GPR).

But notesize calls strlen on those strings and

arm_regsets[REGSET_VFP]->name == 0x0

making it segfault.

Regards,
Per

--
Crash-utility mailing list
Crash-utility@redhat.com
https://www.redhat.com/mailman/listinfo/crash-utility

HATAYAMA Daisuke 05-10-2012 12:24 AM

ARM: gcore, arm_regsets causes segfault
 
From: Per Fransson <per.fransson.ml@gmail.com>
Subject: [Crash-utility] ARM: gcore, arm_regsets causes segfault
Date: Wed, 9 May 2012 18:01:56 +0200

> Hi,
>
> The for loop in
>
> libgcore/gcore_coredump.c:fill_thread_core_info()
>
> does a
>
> notesize(struct memelfnote *)
>
> where memelfnote->name points to the name of the corresponding
> arm_regset member (except REGSET_GPR).
>
> But notesize calls strlen on those strings and
>
> arm_regsets[REGSET_VFP]->name == 0x0
>
> making it segfault.
>
> Regards,
> Per
>

Hello Fransson,

Thanks for your report.

Lei, could you review and test attached patch?

Thanks.
HATAYAMA, Daisuke
--
Crash-utility mailing list
Crash-utility@redhat.com
https://www.redhat.com/mailman/listinfo/crash-utility

Per Fransson 05-10-2012 08:44 AM

ARM: gcore, arm_regsets causes segfault
 
> Hello Fransson,
>
> Thanks for your report.
>
> Lei, could you review and test attached patch?
>
> Thanks.
> HATAYAMA, Daisuke

Hi Daisuke,

Just to let you know that your patch is actually identical to what I
did and it worked for me.

Regards,
Per

--
Crash-utility mailing list
Crash-utility@redhat.com
https://www.redhat.com/mailman/listinfo/crash-utility

Dave Anderson 05-11-2012 02:28 PM

ARM: gcore, arm_regsets causes segfault
 
----- Original Message -----
> From: Per Fransson <per.fransson.ml@gmail.com>
> Subject: [Crash-utility] ARM: gcore, arm_regsets causes segfault
> Date: Wed, 9 May 2012 18:01:56 +0200
>
> > Hi,
> >
> > The for loop in
> >
> > libgcore/gcore_coredump.c:fill_thread_core_info()
> >
> > does a
> >
> > notesize(struct memelfnote *)
> >
> > where memelfnote->name points to the name of the corresponding
> > arm_regset member (except REGSET_GPR).
> >
> > But notesize calls strlen on those strings and
> >
> > arm_regsets[REGSET_VFP]->name == 0x0
> >
> > making it segfault.
> >
> > Regards,
> > Per
> >
>
> Hello Fransson,
>
> Thanks for your report.
>
> Lei, could you review and test attached patch?
>
> Thanks.
> HATAYAMA, Daisuke
>

Hi Daisuke,

Since the module is versioned, will you be creating an updated
version for the extensions page?

Dave
--
Crash-utility mailing list
Crash-utility@redhat.com
https://www.redhat.com/mailman/listinfo/crash-utility

Lei Wen 05-13-2012 03:06 PM

ARM: gcore, arm_regsets causes segfault
 
Hi HATAYAMA,

On Thu, May 10, 2012 at 8:24 AM, HATAYAMA Daisuke
<d.hatayama@jp.fujitsu.com> wrote:
> From: Per Fransson <per.fransson.ml@gmail.com>
> Subject: [Crash-utility] ARM: gcore, arm_regsets causes segfault
> Date: Wed, 9 May 2012 18:01:56 +0200
>
>> Hi,
>>
>> The for loop in
>>
>> * *libgcore/gcore_coredump.c:fill_thread_core_info()
>>
>> does a
>>
>> * *notesize(struct memelfnote *)
>>
>> where memelfnote->name points to the name of the corresponding
>> arm_regset member (except REGSET_GPR).
>>
>> But notesize calls strlen on those strings and
>>
>> * *arm_regsets[REGSET_VFP]->name == 0x0
>>
>> making it segfault.
>>
>> Regards,
>> Per
>>
>
> Hello Fransson,
>
> Thanks for your report.
>
> Lei, could you review and test attached patch?


I'm ok with this patch, and it pass my local test.

Thanks,
Lei

--
Crash-utility mailing list
Crash-utility@redhat.com
https://www.redhat.com/mailman/listinfo/crash-utility

HATAYAMA Daisuke 05-14-2012 05:49 AM

ARM: gcore, arm_regsets causes segfault
 
From: Lei Wen <adrian.wenl@gmail.com>
Subject: Re: [Crash-utility] ARM: gcore, arm_regsets causes segfault
Date: Sun, 13 May 2012 23:06:10 +0800

> Hi HATAYAMA,
>
> On Thu, May 10, 2012 at 8:24 AM, HATAYAMA Daisuke
> <d.hatayama@jp.fujitsu.com> wrote:
>> From: Per Fransson <per.fransson.ml@gmail.com>
>> Subject: [Crash-utility] ARM: gcore, arm_regsets causes segfault
>> Date: Wed, 9 May 2012 18:01:56 +0200
>>
>>> Hi,
>>>
>>> The for loop in
>>>
>>> * *libgcore/gcore_coredump.c:fill_thread_core_info()
>>>
>>> does a
>>>
>>> * *notesize(struct memelfnote *)
>>>
>>> where memelfnote->name points to the name of the corresponding
>>> arm_regset member (except REGSET_GPR).
>>>
>>> But notesize calls strlen on those strings and
>>>
>>> * *arm_regsets[REGSET_VFP]->name == 0x0
>>>
>>> making it segfault.
>>>
>>> Regards,
>>> Per
>>>
>>
>> Hello Fransson,
>>
>> Thanks for your report.
>>
>> Lei, could you review and test attached patch?
>
>
> I'm ok with this patch, and it pass my local test.
>
> Thanks,
> Lei
>

Thanks, Lei. I'll post fixed version soon.

Thanks.
HATAYAMA, Daisuke


--
Crash-utility mailing list
Crash-utility@redhat.com
https://www.redhat.com/mailman/listinfo/crash-utility


All times are GMT. The time now is 01:11 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.