Commit Graph

10 Commits

Author SHA1 Message Date
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