PATCH: Add x32_corenote.c
H.J. Lu
hjl.tools at gmail.com
Tue Mar 31 19:55:45 UTC 2015
On Tue, Mar 31, 2015 at 7:44 AM, Mark Wielaard <mjw at redhat.com> wrote:
> Hi,
>
> On Mon, Mar 30, 2015 at 05:27:30AM -0700, H.J. Lu wrote:
>> On Thu, Mar 26, 2015 at 9:36 AM, H.J. Lu <hjl.tools at gmail.com> wrote:
>> > Here are 5 x32 patches I put a line:
>> >
>> > # Created by H.J. Lu <hjl.tools at gmail.com>, 2015.
>
> Lets just use Copyright (C) H.J. Lu <hjl.tools at gmail.com>, 2015.
>
> Also the patches still contain:
> - Copyright (C) 2008-2010, 2013 Red Hat, Inc.
> + Copyright (C) 2008-2010, 2013, 2015 Red Hat, Inc.
>
> That is not really factual correct. If you modify a file just add
> your own Copyright line instead.
I changed it to
Copyright (C) H.J. Lu <hjl.tools at gmail.com>, 2015.
>> > in the new file I copied from the existing one.
>>
>> I updated my x32 patch set to 7 patches. They replaced the old 5
>> patch set.
>
> The patches look good. Thanks.
> BTW I don't mind the ChangeLog entries being in the patch itself.
> Whatever is more convenient for you.
>
> One question about the new run-readelf-mixed-corenote.sh test.
>
>> +# To reproduce this core dump, do this on x86_64 machine with Linux
>> +# 3.7 or later:
>> +# $ gcc -mx32 -x c <(echo 'int main () { return *(int *)0x12345678; }')
>> +# $ ./a.out
>> +testfiles testfile-x32-core
>> +testrun_compare ${abs_top_builddir}/src/readelf -n testfile-x32-core <<\EOF
>> +
>> +Note segment of 2548 bytes at offset 0x234:
>> + Owner Data size Type
>> + CORE 296 PRSTATUS
>> + info.si_signo: 11, info.si_code: 0, info.si_errno: 0, cursig: 11
>> + sigpend: <>
>> + sighold: <33,35,38-40,42,44-45>
>> + pid: 6885, ppid: 2792, pgrp: 6885, sid: 2792
>> + utime: 0.4294967296000, stime: 4294967296000.000000, cutime: 0.000000
>> + cstime: 0.000000
>
> Are these timeval fields correct?
>
>> + orig_rax: -1, fpvalid: 1
>> + r15: 0 r14: 0
>> + r13: 4290830656 r12: 4194960
>> + rbp: 0x00000000ffc0e070 rbx: 0
>> + r11: 4145779200 r10: 0
>> + r9: 4149627024 r8: 4149551744
>> + rax: 305419896 rcx: 4195216
>> + rdx: 4290830668 rsi: 4290830660
>> + rdi: 1 rip: 0x0000000000400380
>> + rflags: 0x0000000000010246 rsp: 0x00000000ffc0e070
>> + fs.base: 0x00000000f7754700 gs.base: 0x0000000000000000
>> + cs: 0x0033 ss: 0x002b ds: 0x002b es: 0x002b fs: 0x0063 gs: 0x0000
>> + CORE 124 PRPSINFO
>> + state: 0, sname: R, zomb: 0, nice: 0, flag: 0x03e803e800406600
>> + uid: 65537000, gid: 451216360, pid: 6885, ppid: 2792, pgrp: 6885
>> + sid: 2792
>
> The uid and gid seem odd given that in the AUXV we see them being 1000:
>
I missed a few TYPE_XXX. It is fixed now.
Here is the new set of patches.
Thanks.
--
H.J.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Add-x32_corenote.c.patch
Type: text/x-patch
Size: 7552 bytes
Desc: not available
URL: <https://lists.fedorahosted.org/pipermail/elfutils-devel/attachments/20150331/d09a6a8e/attachment-0007.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-Add-testfile-x32-core.bz2-to-run-readelf-mixed-coren.patch
Type: text/x-patch
Size: 30875 bytes
Desc: not available
URL: <https://lists.fedorahosted.org/pipermail/elfutils-devel/attachments/20150331/d09a6a8e/attachment-0008.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0003-Add-testfile-x32-core-to-run-allregs.sh.patch
Type: text/x-patch
Size: 3436 bytes
Desc: not available
URL: <https://lists.fedorahosted.org/pipermail/elfutils-devel/attachments/20150331/d09a6a8e/attachment-0009.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0004-Add-testfile-x32-to-run-addrcfi.sh.patch
Type: text/x-patch
Size: 7761 bytes
Desc: not available
URL: <https://lists.fedorahosted.org/pipermail/elfutils-devel/attachments/20150331/d09a6a8e/attachment-0010.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0005-Add-run-backtrace-core-x32.sh.patch
Type: text/x-patch
Size: 541148 bytes
Desc: not available
URL: <https://lists.fedorahosted.org/pipermail/elfutils-devel/attachments/20150331/d09a6a8e/attachment-0011.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0006-Add-run-strip-test9.sh.patch
Type: text/x-patch
Size: 5117 bytes
Desc: not available
URL: <https://lists.fedorahosted.org/pipermail/elfutils-devel/attachments/20150331/d09a6a8e/attachment-0012.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0007-Add-run-strip-test10.sh.patch
Type: text/x-patch
Size: 8564 bytes
Desc: not available
URL: <https://lists.fedorahosted.org/pipermail/elfutils-devel/attachments/20150331/d09a6a8e/attachment-0013.bin>
More information about the elfutils-devel
mailing list