Re: crash 4.0-8.9 w/ 2.6.30-rc6

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello Daisuke,

I merged your patch with mine, and have things working relatively well.

One other issue comes up -- when the percpu data areas are set up, they
are done with a "for_each_possible_cpu(cpu)", so your new x86_64_per_cpu_init()
function (may) return more cpus than are actually online.  At least that's
the case with Mike's vmcore -- it's running with 2 cpus online, but the
percpu data area was set up for 4.  Prior to 2.6.30, it appears that only online
cpus initialized their x8664_pda structures.  Anyway, I guess we'll just 
have to scale back the cpu count based upon the contents of the cpu_online_map. 

I changed the x86_64_verify_symbol() function to look like this so as to only
collect the __per_cpu_start/end and per_cpu__xxx symbols:

  /*
   *  Accept or reject a symbol from the kernel namelist.
   */
  static int
  x86_64_verify_symbol(const char *name, ulong value, char type)
  {
          if (!name || !strlen(name))
                  return FALSE;

          if (!(machdep->flags & KSYMS_START)) {
                  if (STREQ(name, "_text") || STREQ(name, "_stext")) {
                          machdep->flags |= KSYMS_START;
                          if (!st->first_ksymbol)
                                  st->first_ksymbol = value;
                          return TRUE;
                  } else if (STREQ(name, "__per_cpu_start")) {
                          st->flags |= PERCPU_SYMS;
                          return TRUE;
                  } else if ((st->flags & PERCPU_SYMS) &&
                      (STRNEQ(name, "per_cpu") || STRNEQ(name, "__per_cpu")))
                          return TRUE;
                  else
                          return FALSE;
          }

          return TRUE;
  }

where the PERCPU_SYMS flag is held in the global symbol_table_data flags
field, and where it gets used like this in symbols.c:in_ksymbol_range(): 

  /*
   *  Determine whether an address falls within the kernel's, or any module's,
   *  address space.
   */
  int
  in_ksymbol_range(ulong value)
  {
          if ((value >= st->symtable[0].value) &&
              (value <= st->symtable[st->symcnt-1].value)) {
                  if ((st->flags & PERCPU_SYMS) && (value < st->first_ksymbol))
                          return FALSE;
                  else
                          return TRUE;
          }

          if (module_symbol(value, NULL, NULL, NULL, output_radix))
                  return TRUE;

          if (machdep->value_to_symbol(value, NULL))
                  return TRUE;

          return FALSE;
  }

This seems to (so far) clear up the inadvertent dumping of "false" value-to-symbol
translations in situations like "rd -s", but allows that usage of the per_cpu_xxx
symbols are arguments to symbol_value(), symbol_exists(), symbol_search(), etc.

Other than that, so far I've left the rest of your patch intact, and I wanted
to thank you again for the contribution.

Dave

--
Crash-utility mailing list
Crash-utility@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/crash-utility

[Index of Archives]     [Fedora Development]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [KDE Users]     [Fedora Tools]

 

Powered by Linux