Skip to content
Snippets Groups Projects
  1. Nov 25, 2019
    • Shivendra Pratap's avatar
      lrdp_v2 : Fix VA translations for kernel versions > v4.20 · 10b7d1f5
      Shivendra Pratap authored
      
      Since kernel v5.0, there is a dedicated region of size 128MB
      kept aside for BPF programs(BPF_JIT_REGION) which were
      previously using module region. Also in v5.4, kernel VA space
      was flipped to accomodate support for kasan shadow and 52bit VA.
      Hence we are updating the VA space calculations in parser to make
      it work on newer kernel.
      
      Adding few changes on linux banner read and match for cleanup.
      
      There was an unmonitored variable ramdump.version being used in
      debug_image_v2 cauing version check failure. Adding a change to
      use kernel_version.
      Fix intend in debug_image_v2.
      
      Briefly, the calculations are updated as below:
      
      _PAGE_END(va)		= (-(UL(1) << ((va) - 1))) = 0xffffffc000000000
      KASAN_SHADOW_END	= (_PAGE_END(VA_BITS_MIN)) = 0xffffffc000000000
      BPF_JIT_REGION_START	= (KASAN_SHADOW_END)
      BPF_JIT_REGION_SIZE	= (SZ_128M)
      BPF_JIT_REGION_END	= (BPF_JIT_REGION_START + BPF_JIT_REGION_SIZE) = 0xffffffc000000000 + 0x8000000
      MODULES_VADDR		= (BPF_JIT_REGION_END)
      MODULES_END		= (MODULES_VADDR + MODULES_VSIZE) = 0xffffffc000000000 + 0x8000000 + 0x8000000 = 0xffffffc010000000
      KIMAGE_VADDR		= (MODULES_END) = 0xffffffc010000000
      
      Change-Id: I5a65b327e015970d68c41210fc813105fd6cb4b8
      Signed-off-by: default avatarSai Prakash Ranjan <saiprakash.ranjan@codeaurora.org>
      Signed-off-by: default avatarShivendra Pratap <spratap@codeaurora.org>
      10b7d1f5
  2. Sep 07, 2019
  3. Sep 05, 2019
  4. Aug 22, 2019
  5. Aug 21, 2019
    • wadesong's avatar
      lrdp-v2: Change the cmd used to enable MMU · 9c6c65fb
      wadesong authored
      With some newer versions of Trace32, cmd PER.S.F cannot be used
      to setup the MMU related registers.
      
      Use PER.S.simple instead when enabling MMU support on 32-bit
      ARM platforms.
      
      Change-Id: I692ce4a2edaf1ff575e1df247ae51ab332d74166
      9c6c65fb
  6. Aug 19, 2019
    • wadesong's avatar
      lrdp-v2: Fix a corner case for kernel module symbol parsing · 74e69847
      wadesong authored
      When parsing kernel module symbols retrieved from kallsyms
      nodes, lrdp-v2 will unconditionally add address 0x0 when seeing
      it, which causes task stack unwinding showing a particular
      module's name for address 0x0.
      
      Add symbol address checking when parsing info retrieved from
      module specific kallsyms nodes, to avoid adding address 0x0 as
      undefined symbol for a particular module.
      
      Change-Id: I36cc8e6a3ffa3b76bf24fd881f26845983059472
      74e69847
  7. Aug 01, 2019
  8. Jul 22, 2019
    • wadesong's avatar
      lrdp-v2: Add support for symbol retrieving from kallsyms · e3c3f38c
      wadesong authored
      Add code to retrieve module specific symbol info from per-module
      kallsyms nodes when CONFIG_KALLSYMS is defined. Symbols retrieved
      from kallsyms nodes will be more accurate because relocation
      has already been done when the per-module kallsyms nodes are
      formed.
      
      Add the following options to control how the symbol info will
      be recorded in lrdp-v2 output files:
      
      --dump_mod_sym_tbl: dump per-module symbol info retrieved from
                          module specific symbol files.
      --dump_krnl_sym_tbl: dump Linux kernel symbol info retrieved
                           from the kernel symbol file.
      --dump_mod_kallsyms: dump per-module symbol info retrieved from
                           per-module kallsyms node.
      --dump_glb_sym_tbl: dump everything in the global symbol lookup
                          table.
      
      Change-Id: Ic137eaf64a5e1f7203946d323efcd7527e3f1968
      e3c3f38c
  9. May 17, 2019
  10. Feb 20, 2019
  11. Nov 29, 2018
    • Patrick Daly's avatar
      lrdpv2: Fix unwind_lookup · 9363afde
      Patrick Daly authored
      Remove symbols which are not between _head and _end from the
      symbol lookup table.
      
      Change-Id: I785d6bac029162dd012717e61f927fd64df87514
      9363afde
  12. Oct 29, 2018
  13. Sep 28, 2018
    • Soumen Ghosh's avatar
      lrdp-v2: setting kimage_voffset to null · fc7860ef
      Soumen Ghosh authored
              In case of 32bit ramdump kimage_voffset will not be used in ramparser.
              In upstream kernel 4.14 this variable got added and set to some address.
              Due to that in case of 32 bit all calculation went worng. So forcefully setting to null if it is 32 bit dump
      
      Change-Id: Ia341074ebfd0811543cc3a2e77d2b23ade43d520
      fc7860ef
  14. Sep 25, 2018
    • Kumar Harsh's avatar
      ldrp_V2 : Support increased length in Linux banner string · a2583fc2
      Kumar Harsh authored
      
      This patch fixes the need for a hard coded value
      to specify upper limit on length of the Linux Banner.
      
      get_version() inside ramdump.py has been renamed to
      get_matched_version() to reflect the true nature of
      the function.
      
      Added a variable banner_len in get_matched_version()
      which is the length of linux_banner returned by
      gdbmi.get_value_of_string('linux_banner').
      This variable is further passed to read_cstring()
      function to specify the max limit of characters to
      be read. We are dynamically calculating the length
      using gdb to read linux banner.
      
      Change-Id: I571882a5999c26ccd8accd90b26d0149c839633b
      Signed-off-by: default avatarKumar Harsh <harkumar@codeaurora.org>
      a2583fc2
  15. Sep 07, 2018
  16. Aug 10, 2018
    • wadesong's avatar
      lrdp-v2: Fix some symbol loading issues on ARM-32 platforms · 208182ad
      wadesong authored
      1) When lrdp-v2 is parsing RAM dumps generated on ARM-32 platforms,
         the Trace32 startup script will not contain any instructions
         to enable MMU support, which causes Linux kernel symbol loading
         failure on some newer Trace32 simulators.
      
         Add Trace32 startup instruction to set bit 0 of P15:0x1 if
         lrdp-v2 detects MMU support within the RAM dump.
      
      2) Use task.symbol.loadmod instead of data.load.elf to load all
         the kernel moduels' symbols to avoid symbol loading failures.
      
      Change-Id: Ibae79e3c80279788d7cccd28080d2cecd5432a4b
      208182ad
  17. Mar 15, 2018
    • wadesong's avatar
      lrdp-v2: Add support for linux-3.x on ARM 32-bit platforms · 8b74e9de
      wadesong authored
      Currently LRDP-v2 will only add linux.t32 and linux.men into
      the t32_startup_script.cmm script when it is parsing RAM
      dumps generated on ARM 32-bit platforms.
      
      Change the code in ramdump.py to add linux3.t32 and its
      related linux.men into t32_startup_script.cmm when it is
      determined that the kernel version is greater than 3.0.0.
      
      Change-Id: Id0ddc62cc702b0bc586bb9864ceb02177d397e13
      8b74e9de
  18. Jan 24, 2018
  19. Jan 12, 2018
    • Patrick Daly's avatar
      lrdp: debug_image: Support guest VM cpu register dump tables · d9434874
      Patrick Daly authored
      The hypervisor may populate an imem cookie with the location of
      a standard dump table, instead of using the table allocated by linux.
      Read the table location from this cookie instead of relying on the
      linux variable 'memdump'.
      On error, fall back to the old approach of reading from 'memdump'.
      
      Change-Id: Id99bb643fb7f35de79ff7308a999cc2143d7aff0
      d9434874
  20. Dec 07, 2017
    • wadesong's avatar
      lrdp-v2: Loadble module name prefixing · b61a75d7
      wadesong authored
      Currently the loadble module symbol parsing code is only decoding
      the symbol names without prefixing the module names. This will
      result in some confusion when two module's symbol names are
      identical, and things get worse espeicially when parsing RAM
      dumps where two WLAN drivers are loaded.
      
      Prefix module names to module specific symbol names when parsing
      their symbol files so user can easily tell which module is
      involved in a call stack.
      
      Change-Id: I3cf5e9527be191fb5f21830b1ba9f915d734b5d2
      b61a75d7
  21. Nov 30, 2017
    • wadesong's avatar
      lrdp-v2: Start to parse 'core_layout' since msm-4.9 · f6f2a026
      wadesong authored
      Starting from msm-4.9, a new field named 'core_layout' will be
      available to replace 'module_core' in struct module.
      
      Add code to parse the newly introduced field for loadable module
      symbol addition based on the Linux kernel version.
      
      Change-Id: I503ba6b0d4f5928bb2fea85ab3fdd4a33150b1c0
      f6f2a026
  22. Nov 11, 2017
    • wadesong's avatar
      lrdp-v2: Fix ARM 32-bit thread_info addr reading error · f16b737f
      wadesong authored
      In thread_saved_field_common_32, read_word should not be used to
      retrieve the thread_info structure's address because
      get_thread_info_addr is already doing the same.
      
      Change-Id: I422c67b98d318c0084ab32fb0ad9f180da186829
      f16b737f
  23. Nov 01, 2017
    • Soumen Ghosh's avatar
      lrdp-v2:Minidump parsing support for kernel version 4.9 · bebe9318
      Soumen Ghosh authored
              In the latest kernel version minidump_table structure got changed. Some emelments are removed.
              like smem_table, version. In those information anyhow is not being used in ramparser. So removed all those elements
      Change-Id: Ibce7ab2515737a7871c1f9df70d4eddee64bdc09
      bebe9318
  24. Sep 06, 2017
  25. Aug 16, 2017
  26. Aug 02, 2017
  27. Jul 25, 2017
    • wadesong's avatar
      lrdp-v2: Add symbol parsing for loadable modules · 88519637
      wadesong authored
      Current Linux Ram Dump Paser scripts are only able to load kernel
      symbols by default. No loadable modules' symbols will be parsed
      at startup time, which may result in 'unknown symbols' in some
      cases, especially when checking SLAB info on dual-wifi platforms.
      
      With this change, loadable modules' symbols can be parsed on
      script startup by the following configurations:
      
      1) Put all symbols under a certain dir, such as:
      
      <dump_location>/symbols/wlan.ko
      <dump_location>/symbols/wlan_sdio.ko
      
      2) Add --sym_path when invoking the scripts, such as:
      
      python %RAM_DUMP_PARSER_PATH%\ramparse.py --sym_path
      <dump_location>/symbols
      
      With the above actions, all loadable modules' symbols will be
      parsed and stored for subsequent information dumping. Symbol
      loading commands will also be added into the Trace32 startup
      script.
      
      Change-Id: Idda9c9a08cfd24c19bf4021e80fee5187cd031b9
      88519637
  28. Jul 12, 2017
  29. Jun 22, 2017
    • Soumen Ghosh's avatar
      lrdp-v2:read DCC from KMISC section for minidump · dcb33d0a
      Soumen Ghosh authored
              As DCC is not going to be enabled on secure device,
              SDI would dump required registers in standard dcc dumping format.
              So extend ramparser’s DCC parsing support for <address><value> format.
              The KMISC section would contain all registers address value pair as mentioned below.
              Parse the data and generate the “dcc_captured_data.xml” and it should be same as actual dcc dump parsed xml.
      
      Change-Id: Ib042ebc6895f0594f5784600174087a979e8709f
      dcb33d0a
  30. Jun 07, 2017
  31. May 26, 2017
    • Soumen Ghosh's avatar
      lrdp-v2:minidump parsing support add in ramparser · 687e1bab
      Soumen Ghosh authored
      	A minidump supports fewer features than a full ramdump,
      	but does not require the user to save all 4GB+ of memory.
      	Instead a small subset of DDR is saved by crashscope as an elf file.
      	Currently dmesg logs, rtb logs, and the cpu context parser are supported.
      
      	Example usage: python ramparse.py --vmlinux <vmlinux> --minidump
      			--ram-elf <elf_file> --ram-file <OCIMEM.bin> --everything
      
      Change-Id: Ib689b4811d66472ac20aa7c63893fdaed915512e
      687e1bab
  32. May 08, 2017
  33. Mar 29, 2017
    • Patrick Daly's avatar
      lrdp-v2: Fix read_structure_field crash · 55b060c7
      Patrick Daly authored
      When calling read_structure_field with an undefined symbol, the
      desired behavior is to return None rather than crash.
      
      Change-Id: Iaf172a038779cf767b55c47ec37b8e90e194aa0f
      55b060c7
  34. Mar 27, 2017
    • Patrick Daly's avatar
      lrdp-v2: Introduce read_s64 · deb67d8f
      Patrick Daly authored
      Add a function for reading a signed 64 bit value from a ramdump.
      
      Change-Id: Ic7e5a8a7cb9d5fd551ffb2c3add2499a25aff540
      deb67d8f
  35. Mar 22, 2017
  36. Mar 08, 2017
  37. Jan 24, 2017
    • Kyle Yan's avatar
      ldrp-v2: Add new method of finding number of CPUs as of kernel 4.5 · 38976141
      Kyle Yan authored
      As of commit c4c54dd1 (kernel/cpu.c: change type of cpu_possible_bits
      and friends), cpu_present_bits no longer exists. Add new method of finding
      number of cpus and also change other functions to use the get_num_cpus
      API instead of defining it again.
      
      Change-Id: I6d38d505ba7674b94e8481e6679226803eba977e
      38976141
  38. Jan 04, 2017
  39. Dec 22, 2016
Loading