Commit Graph

17 Commits

Author SHA1 Message Date
Fedora Release Engineering
72eb8eec04 Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2023-01-19 00:38:46 +00:00
HATAYAMA Daisuke
d89fb62d37 Version 1.6.3-3
Signed-off-by: HATAYAMA Daisuke <d.hatayama@fujitsu.com>
2022-07-26 15:15:19 +09:00
HATAYAMA Daisuke
b8f9895ea3 gcore.mk: fix mismatch of _FILE_OFFSET_BITS when building gcore.so
Backport from the upstream crash-gcore.

commit d2795659986dacc51e98a3d1dbc8b673582c20fe
Author: HATAYAMA Daisuke <d.hatayama@fujitsu.com>
Date:   Tue Jun 28 03:54:46 2022 +0900

    gcore.mk: fix mismatch of _FILE_OFFSET_BITS when building gcore.so

    On arm and mips, while _FILE_OFFSET_BITS=64 is used when building
    gcore.so by make extensions, it is not used by gcore.mk.

    Fix this inconsistency by using _FILE_OFFSET_BITS=64 in gcore.mk on
    arm and mips.

    Signed-off-by: HATAYAMA Daisuke <d.hatayama@fujitsu.com>

Signed-off-by: HATAYAMA Daisuke <d.hatayama@fujitsu.com>
2022-07-26 15:13:51 +09:00
HATAYAMA Daisuke
9f16f6a487 coredump: fix unexpected truncation of generated core files
Backport from the upstream crash-gcore.

commit dbb542e10bfe1b2e21c7927bda9be1d301cfef65
Author: HATAYAMA Daisuke <d.hatayama@fujitsu.com>
Date:   Fri Jun 17 20:38:19 2022 +0900

    coredump: fix unexpected truncation of generated core files

    Core files generated by crash gcore command are sometimes unexpectedly
    truncated. Then, we can get aware of this from the following warning
    message output by gdb:

        BFD: warning: /root/./core.1.systemd is truncated: expected core file size >= 43606016, found: 43597824

    From the investigation, it turned out that this truncation is
    occurring when there is no write() operation after the area skipped by
    lseek(). Holes are generated only when there is write() operation.

    To fix this issue, use ftruncate() to allocate holes explicitly.

    Signed-off-by: HATAYAMA Daisuke <d.hatayama@fujitsu.com>

Signed-off-by: HATAYAMA Daisuke <d.hatayama@fujitsu.com>
2022-07-26 15:13:49 +09:00
HATAYAMA Daisuke
44392dfce6 elf: fix warning message caused by type mismatch of offset types
Backport from the upstream crash-gcore.

commit 8ff3de974aa9fdf8934797122dc55428ef571ab2
Author: Vincent Whitchurch <vincent.whitchurch@axis.com>
Date:   Tue Jun 21 09:15:34 2022 +0000

    elf: fix warning message caused by type mismatch of offset types

    Use loff_t consistently to fix these warnings on -m32 builds on 64-bit:

     libgcore/gcore_coredump.c: In function ‘writenote’:
     libgcore/gcore_coredump.c:701:58: warning: passing argument 3 of
     ‘gcore->elf->ops->write_note_header’ from incompatible pointer type
     [-Wincompatible-pointer-types]

       if (!gcore->elf->ops->write_note_header(gcore->elf, fp, foffset))
                                                               ^~~~~~~
     libgcore/gcore_coredump.c:701:58: note: expected ‘off_t *’ {aka ‘long
     int *’} but argument is of type ‘loff_t *’ {aka ‘long long int *’}

    Signed-off-by: Vincent Whitchurch <vincent.whitchurch@axis.com>

Signed-off-by: HATAYAMA Daisuke <d.hatayama@fujitsu.com>
2022-07-26 15:13:47 +09:00
HATAYAMA Daisuke
a0cea9fcec coredump: fix segmentation fault caused by type mismatch
Backport from the upstream crash-gcore.

commit 1ba701c1d7bd94cc5a02f51652712acdcbf0875c
Author: Vincent Whitchurch <vincent.whitchurch@axis.com>
Date:   Tue Jun 21 09:15:33 2022 +0000

    coredump: fix segmentation fault caused by type mismatch

    crash gcore command on ARM sometimes results in segmentation fault:

        crash> gcore -v 0
        Segmentation fault (core dumped)

    This is caused by type mismatch of a variable paddr in function
    gcore_readmem_user() to hold a physical address, which is indicated by
    the following warning message:

     libgcore/gcore_coredump.c: In function ‘gcore_readmem_user’:
     libgcore/gcore_coredump.c:85:26: warning: passing argument 2 of
     ‘uvtop_quiet’ from incompatible pointer type
     [-Wincompatible-pointer-types]

        if (!uvtop_quiet(addr, &paddr)) {
                               ^~~~~~
     libgcore/gcore_coredump.c:71:49: note: expected ‘physaddr_t *’ {aka
     ‘long long unsigned int *’} but argument is of type ‘ulong *’ {aka ‘long
     unsigned int *’}

      static int uvtop_quiet(ulong vaddr, physaddr_t *paddr);
                                          ~~~~~~~~~~~~^~~~~

    On ARM, long unsigned int has 4 byte length, while physaddr_t has 8
    byte length. The mismatch causes overwriting of stack variables.

    Fix this by changing the type of the variable paddr to physaddr_t.

    Signed-off-by: Vincent Whitchurch <vincent.whitchurch@axis.com>

Signed-off-by: HATAYAMA Daisuke <d.hatayama@fujitsu.com>
2022-07-26 15:13:44 +09:00
HATAYAMA Daisuke
ae4ad4d495 x86: Fix failure of collecting vsyscall mapping due to change of enum type of vsyscall_mode
Backport from the upstream crash-gcore.

commit 03f9360715731f18e4fdae7b30aa34b30dddcd57
Author: HATAYAMA Daisuke <d.hatayama@fujitsu.com>
Date:   Sat Mar 26 21:42:02 2022 +0900

    x86: Fix failure of collecting vsyscall mapping due to change of enum type of vsyscall_mode

    vsyscall mapping fails to get collected because the commit
    bd49e16e3339 (x86/vsyscall: Add a new vsyscall=xonly mode) merged at
    kernel v5.2-rc7 added constant XONLY to the anonymous enumeration type
    of variable vsyscall_mode, which made the value of constant NONE
    change from 1 to 2.

    This commit fixes the issue by checking the value of constant NONE
    using gdb's print command and typeof operator since there's no utility
    function to handle such anonymous enumeration type currently in crash
    utility.

    Signed-off-by: HATAYAMA Daisuke <d.hatayama@fujitsu.com>

Signed-off-by: HATAYAMA Daisuke <d.hatayama@fujitsu.com>
2022-07-26 15:13:42 +09:00
HATAYAMA Daisuke
5f7e55f54c gcore: fix memory allocation failure during processing NT_AUXV note
Backport from the upstream crash-gcore.

commit 4cb65a0d9168778d120920418b968d05da10989f
Author: HATAYAMA Daisuke <d.hatayama@fujitsu.com>
Date:   Fri Feb 25 04:59:48 2022 -0500

    gcore: fix memory allocation failure during processing NT_AUXV note

    For crash dumps generated using kernel-4.18.0-365.el8 or later on
    CentOS stream 8, crash gcore command fails as follows:

        crash> gcore -v 7 -f 128 10604
        gcore: Opening file core.10604.test-dumpfilter ...
        gcore: done.
        gcore: Writing ELF header ...
        gcore:  done.
        gcore: Retrieving and writing note information ...
        gcore: zero-size memory allocation! (called from 7fd558ce1e05)
        Failed.

    This memory allocation failure occurs in fill_auxv_note() that creates
    NT_AUXV note due to saved_auxv entries of size and offset tables are
    somehow 0.

    This is because during the merge of the upstream kernel commit
    1c33bb0507508af24fd754dd7123bd8e997fab2f (x86/elf: Support a new ELF
    aux vector AT_MINSIGSTKSZ), location of saved_auxv of struct mm_struct
    has been moved as workaround in order to avoid kABI breakage.

    Fix this by using RHEL-specific location for saved_auxv if there is
    member rh_reserved_saved_auxv in struct mm_struct.

    Signed-off-by: HATAYAMA Daisuke <d.hatayama@fujitsu.com>

Signed-off-by: HATAYAMA Daisuke <d.hatayama@fujitsu.com>
2022-07-26 15:13:40 +09:00
HATAYAMA Daisuke
fa82591a3b gcore, defs: remove definitions and initializations for saved_auxv entries of offset and size tables
Backport from the upstream crash-gcore.

commit 6f4357340807f70bd1999f0b88435361c583f0b9
Author: HATAYAMA Daisuke <d.hatayama@fujitsu.com>
Date:   Fri Feb 25 04:51:06 2022 -0500

    gcore, defs: remove definitions and initializations for saved_auxv entries of offset and size tables

    saved_auxv entries of offset and size tables are now not used in the
    source code by the previous commit. Let's remove definitions and
    initializations for them.

    Signed-off-by: HATAYAMA Daisuke <d.hatayama@fujitsu.com>

Signed-off-by: HATAYAMA Daisuke <d.hatayama@fujitsu.com>
2022-07-26 15:13:38 +09:00
HATAYAMA Daisuke
bf661e7ba2 coredump: use MEMBER_{OFFSET, SIZE} instead of GCORE_{OFFSET, SIZE}
Backport from the upstream crash-gcore.

commit 4731ebf085fe6322ba8c7ca14918d3cab2186cf0
Author: HATAYAMA Daisuke <d.hatayama@fujitsu.com>
Date:   Fri Feb 25 04:45:37 2022 -0500

    coredump: use MEMBER_{OFFSET, SIZE} instead of GCORE_{OFFSET, SIZE}

    fill_auxv_note() and compat_fill_auxv_note() is called just once each
    time gcore command is invoked because each process has just one
    NT_AUXV. This means using MEMBER_{OFFSET, SIZE} is enough; using
    GCORE_{OFFSET, SIZE} is overkill.

    Signed-off-by: HATAYAMA Daisuke <d.hatayama@fujitsu.com>

Signed-off-by: HATAYAMA Daisuke <d.hatayama@fujitsu.com>
2022-07-26 15:13:32 +09:00
Fedora Release Engineering
403d800813 Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2022-07-20 23:43:32 +00:00
Fedora Release Engineering
c5784ea2f6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2022-01-19 23:58:26 +00:00
HATAYAMA Daisuke
3a9436d775 Update to latest upstream release v2
This commit retries the update to the latest upstream release because
the previous commit didn't update the tarball.

Signed-off-by: HATAYAMA Daisuke <d.hatayama@fujitsu.com>

Signed-off-by: HATAYAMA Daisuke <d.hatayama@fujitsu.com>
2021-12-20 06:18:09 +09:00
HATAYAMA Daisuke
b010f0dba0 Update to latest upstream release
Signed-off-by: HATAYAMA Daisuke <d.hatayama@fujitsu.com>
2021-12-16 23:18:15 +09:00
Fedora Release Engineering
0768ae21c6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2021-07-21 20:05:43 +00:00
HATAYAMA Daisuke
e0ed466213 Initial import (#1919347). 2021-02-18 19:17:20 +09:00
Mohan Boddu
54a85ce760 Added the README 2021-02-17 14:38:01 +00:00