Giter VIP home page Giter VIP logo

crash-extensions's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

crash-extensions's Issues

Problem getting process arguments: "fill_psinfo: pr_psargs"

Crash: 7.2.9
Gcore extension: 1.6.1

I'm trying to extract the current user-space application's core file from a kernel dump (vmcore) using crash + gcore extension. But user-space core file generation is failing:

crash> gcore
gcore: seek error: physical address: 7ec56eab  type: "fill_psinfo: pr_psargs"
Failed.

Interestingly, applying the following patch to the gcore extension code makes this problem go away and the generated core dump also seems to work. The path basically comments out the specified block of code (which seems to be trying to get the process's command line arguments?).

diff --git a/home/ishraq/git/crash-utility/crash-extensions/crash-gcore-command-1.6.1/libgcore/gcore_coredump.c b/home/ishraq/git/crash-utility/crash/extensions/libgcore/gcore_coredump.c
index 318539f..ddbf20b 100644
--- a/home/ishraq/git/crash-utility/crash-extensions/crash-gcore-command-1.6.1/libgcore/gcore_coredump.c
+++ b/home/ishraq/git/crash-utility/crash/extensions/libgcore/gcore_coredump.c
@@ -312,6 +312,7 @@ fill_psinfo_note(struct elf_note_info *info, struct task_context *tc,
         /* first copy the parameters from user space */
        BZERO(psinfo, sizeof(struct elf_prpsinfo));
 
+       /*
        mm_cache = fill_mm_struct(task_mm(tc->task, FALSE));
 
        arg_start = ULONG(mm_cache + GCORE_OFFSET(mm_struct_arg_start));
@@ -330,6 +331,7 @@ fill_psinfo_note(struct elf_note_info *info, struct task_context *tc,
                 if (psinfo->pr_psargs[i] == 0)
                         psinfo->pr_psargs[i] = ' ';
         psinfo->pr_psargs[len] = 0;
+       */
 
        readmem(tc->task + GCORE_OFFSET(task_struct_real_parent), KVADDR,
                &parent, sizeof(parent), "fill_psinfo: real_parent",

To me it appears that there is something wrong while getting the arguments passed to the process when it was launched? I was also thinking, could this be something related to stack randomisation?

Thanks in advance.

Cheers.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.