Liu Hua | 18 Dec 07:24 2014

[Crash-utility PATCH] crash: arm: LPAE: fix bugs when translating address

For virtual address with idmap, we just use VTOP to
do the translate. So we should not use one way for
arm and LPAE enabled arm.

This bugs occurs when the phys_base exceeds 4G. So
we could not meet this bugs at most case. But for 
keystone platfrom, whose codes has been upstreamed 
recently. It boots on 2G-4G physical maps, then 
rebuilds its pagetables on 16G-18G. So, its phys_base 
is 16G.

Signed-off-by: Liu Hua <sdu.liu <at> huawei.com>
---
 arm.c | 20 +++++++++++++++++---
 1 file changed, 17 insertions(+), 3 deletions(-)

diff --git a/arm.c b/arm.c
index 23d9b51..43e3aab 100644
--- a/arm.c
+++ b/arm.c
 <at>  <at>  -1095,6 +1095,18  <at>  <at>  arm_lpae_vtop(ulong vaddr, ulong *pgd, physaddr_t *paddr, int verbose)
 	pmd_t pmd_pte;
 	pte_t pte;

+	if (!vt->vmalloc_start) {
+		*paddr = LPAE_VTOP(vaddr);
+		return TRUE;
+	}
+
+	if (!IS_VMALLOC_ADDR(vaddr)) {
(Continue reading)

Michael Holzheu | 17 Dec 18:45 2014
Picon

[PATCH] crash: s390x: Add vector register support

Hello Dave,

This patch adds support for the new s390x vector registers.
For ELF dumps the registers are taken from the VX ELF notes, for
s390 dumps the registers are taken from memory. The kernel stores
a pointer the save area in the CPU lowcores at offset 0x11b0.

This patch also adds a new -A option to the "bt" command. The
new vector registers are only shown when this option is specified.
This is done because for normal degugging we do not want to
pollute the bt output with the large vector register output (512 byte).

The following shows an output example:

crash> bt -a -A
PID: 2387   TASK: 1785a5e8          CPU: 0   COMMAND: "bash"
 LOWCORE INFO:
  -psw      : 0x0400d00180000000 0x0000000000112aa0
  -function : store_status at 112aa0
  -prefix   : 0x1fffc000
  -cpu timer: 0x7ffffff3 0x0066ef81
  -clock cmp: 0x0066ef81 0000000000
  -general registers:
     000000000000000000 0x0400c00180000000
   ....
  - vector registers:
     0x404b000000000000 0x0000000000000000 
     0x0000000000000000 0x0000000000000000 
     0x404b000000000000 0x0000000000000000 
     0x0000000000000000 0x0000000000000000 
(Continue reading)

"Zhou, Wenjian/周文剑" | 10 Dec 03:38 2014

Make note information human readable when help -D

Hello all,

When analysing elf format core, if "help -D" is specified, crash will
show dumpfile contents/statistics. But the output is hardly to read.
So the patches is to make it human readable.

When analysing kdump format core, if "help -D" is specified, crash won't
show the note information. The patches add note information to the output.

When analysing elf format core, if "help -D" is specified,
the original output like this:
		:
		:
Elf64_Nhdr:
                n_namesz: 5 ("CORE")
                n_descsz: 336
                  n_type: 1 (NT_PRSTATUS)
                          0000000000000000 0000000000000000
                          0000000000000000 0000000000000000
                          000000000000141d 0000000000000000
                          0000000000000000 0000000000000000
                          0000000000000000 0000000000000000
                          0000000000000000 0000000000000000
                          0000000000000000 0000000000000000
                          0000000000000004 0000000000000286
                          ffffffff81b01a40 0000000000000000
                          ffff88003d86be18 0000000000000063
                          0000000000000000 0000000000000001
                          ffffffff81645da0 0000000000000000
                          0000000000000010 0000000000000000
(Continue reading)

Aaron Tomlin | 8 Dec 15:23 2014
Picon

[RFC PATCH v3 0/2] Show memory overcommit data in dump_kmeminfo()

The first patch changes dump_kmeminfo() to report overcommit information
similar to that displayed under the proc/meminfo file. It may be useful to
indicate memory over commitment abuse, for example with forced vmcores from
system hangs due to shortage of memory. The intended output is as follows:

  crash> kmem -i
                   PAGES        TOTAL      PERCENTAGE
      TOTAL MEM  1965332       7.5 GB         ----
           FREE    78080       305 MB    3% of TOTAL MEM
           USED  1887252       7.2 GB   96% of TOTAL MEM
         SHARED   789954         3 GB   40% of TOTAL MEM
        BUFFERS   110606     432.1 MB    5% of TOTAL MEM
         CACHED  1212645       4.6 GB   61% of TOTAL MEM
           SLAB   146563     572.5 MB    7% of TOTAL MEM

     TOTAL SWAP  1970175       7.5 GB         ----
      SWAP USED        5        20 KB    0% of TOTAL SWAP
      SWAP FREE  1970170       7.5 GB   99% of TOTAL SWAP

   COMMIT LIMIT  2952841      11.3 GB         ----
      COMMITTED  1150595       4.4 GB   38% of TOTAL LIMIT

The second patch simply removes the mention of dump_zone_page_usage()
availability from kmem's help page.

Tested under 3.16.4-200.fc20.x86_64 only.
Though this should work under RHEL4 (2.6.9-5) and above whereby the
kernel symbol sysctl_overcommit_memory is available.

Changelog:
(Continue reading)

qiaonuohan | 8 Dec 14:29 2014

command dis fails to display name of function

Hello Dave,

When using dis command on RHEL5.11, I found a weird thing. Please check the
following execution.

<cut>
crash> dis do_wp_page | grep 591
0xffffffff8001115c <do_wp_page+591>:	callq  0xffffffff800623d0 <__sched_text_start>
crash> dis schedule
0xffffffff800623d0 <__sched_text_start>:        push   %rbp
0xffffffff800623d1 <schedule+1>:        mov    %rsp,%rbp
...
crash> dis do_wp_page | grep 591
0xffffffff8001115c <do_wp_page+591>:	callq  0xffffffff800623d0 <schedule>
crash> dis do_wp_page | grep 591
0xffffffff8001115c <do_wp_page+591>:	callq  0xffffffff800623d0 <__sched_text_start>
<cut>

schedule and __sched_text_start are always shifting.

After some investigation, I found the following sentences in
arch/x86_64/kernel/vmlinux.lds.S

<cut>
SECTIONS
{
...
SCHED_TEXT
LOCK_TEXT
KPROBES_TEXT
(Continue reading)

Vasily Averin | 5 Dec 08:16 2014

[patch crash v3 2/2] namespace support for net command

net without arguments shows network devices in init_net
net -n  --  in network namespace of current task
net -n pid|taskp -- in network namespace of specified task

Signed-off-by: Vasily Averin <vvs <at> openvz.org>
---
 defs.h    |  1 +
 help.c    | 10 +++++++++-
 net.c     | 56 +++++++++++++++++++++++++++++++++++++++++---------------
 symbols.c |  2 ++
 4 files changed, 53 insertions(+), 16 deletions(-)

diff --git a/defs.h b/defs.h
index dc2d65a..d51936f 100644
--- a/defs.h
+++ b/defs.h
 <at>  <at>  -1923,6 +1923,7  <at>  <at>  struct offset_table {                    /* stash of commonly-used offsets */
 	long kernfs_node_parent;
 	long kmem_cache_cpu_partial;
 	long kmem_cache_cpu_cache;
+	long nsproxy_net_ns;
 };

 struct size_table {         /* stash of commonly-used sizes */
diff --git a/help.c b/help.c
index 780966b..4f98aa5 100644
--- a/help.c
+++ b/help.c
 <at>  <at>  -6452,7 +6452,7  <at>  <at>  NULL
 char *help_net[] = {
(Continue reading)

Vasily Averin | 5 Dec 08:16 2014

[patch crash v3 1/2] net -n option renamed to -N

ipcs and mount commands uses -n key as namespace pointer.
Here we clear the place for similar option in net command

Signed-off-by: Vasily Averin <vvs <at> openvz.org>
---
 help.c | 6 +++---
 net.c  | 4 ++--
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/help.c b/help.c
index 6aa3e20..780966b 100644
--- a/help.c
+++ b/help.c
 <at>  <at>  -6452,7 +6452,7  <at>  <at>  NULL
 char *help_net[] = {
 "net",
 "network command",
-"[-a] [[-s | -S [-xd]] [-R ref] [pid | taskp]] [-n addr]",
+"[-a] [[-s | -S [-xd]] [-R ref] [pid | taskp]] [-N addr]",
 "  Display various network related data:\n",
 "      -a  display the ARP cache.",
 "      -s  display open network socket/sock addresses, their family and type,",
 <at>  <at>  -6462,7 +6462,7  <at>  <at>  char *help_net[] = {
 "          of both structures.",
 "      -x  override default output format with hexadecimal format.",
 "      -d  override default output format with decimal format.",
-"  -n addr translates an IPv4 address expressed as a decimal or hexadecimal",
+"  -N addr translates an IPv4 address expressed as a decimal or hexadecimal",
 "          value into a standard numbers-and-dots notation.",
 "  -R ref  socket or sock address, or file descriptor.",
(Continue reading)

Vasily Averin | 5 Dec 08:16 2014

[patch crash v3 0/2] namespace support for net command

Dear Dave,
could you please take a look at v3 version of my patch set

v3:
-  show_net_devices_v3: VALID_MEMBER checks now nsproxy_net_ns 
  instead of task_struct_nsproxy

v2:
- compilation was fixed
-  nsproxy_net_ns moved to end of existing offset_table
- -n key behavior was changed, now it can work without pid/task argument:
  "net" without arguments shows information about init_net
  "net -n" -- gets net namespace reference from current task
  "net -n pid|taskp" -- from specified task
- "net -n" example was added into help
- show_net_devices_v3: rollback to using of init_net on kernels without
    nsproxy support
- tested, seems works correctly on RHEL6-based OpenVZ kernel

Vasily Averin (2):
  net -n option renamed to -N
  namespace support for net command

 defs.h    |  1 +
 help.c    | 14 +++++++++++---
 net.c     | 58 ++++++++++++++++++++++++++++++++++++++++++----------------
 symbols.c |  2 ++
 4 files changed, 56 insertions(+), 19 deletions(-)

--

-- 
(Continue reading)

Vasily Averin | 4 Dec 16:34 2014

OpenVZ wishes for crash

Dear Dave,

Could you please advise how it's better to add some OpenVZ-specific
functionality into mainline crash.

Most important tasks for us are:
1) for specified task: get its Container ID.

2) for specified container: get list of its processes, IP addresses,
  references to according structures: mounts/net devices/IPCs and so on.

3) list of running containers:
  Container ID, its IP addresses, reference to top parent task (aka init), number of running processes

Can we add some key to "ps" and "foreach" commands?
For example:
"ps -z  pid" allows us to get CT Id,
"ps -z CTID" helps to look/calculate number of processes in container
"foreach (ct?) net/ipcs/mount" -- to get container-specific information

Thank you,
	Vasily Averin

Vasily Averin | 4 Dec 14:07 2014

[patch crash v2 0/2]

Dear Dave,

thank you very much for your feedback,
I've prepared new version of patches with following changes:

v2:
- compilation was fixed
-  nsproxy_net_ns moved to end of existing offset_table
- -n key behavior was changed, now it can work without pid/task argument:
  "net" without arguments shows information about init_net
  "net -n" -- gets net namespace reference from current task
  "net -n pid|taskp" -- from specified task
- "net -n" example was added into help
- show_net_devices_v3: rollback to using of init_net on kernels without
    nsproxy support
- tested, seems works correctly on RHEL6-based OpenVZ kernel

Vasily Averin (2):
  net -n option renamed to -N
  namespace support for net command

 defs.h    |  1 +
 help.c    | 14 +++++++++++---
 net.c     | 58 ++++++++++++++++++++++++++++++++++++++++++----------------
 symbols.c |  2 ++
 4 files changed, 56 insertions(+), 19 deletions(-)

--

-- 
1.9.1

(Continue reading)

Vasily Averin | 4 Dec 14:08 2014

[patch crash v2 2/2] namespace support for net command

net without arguments shows network devices in init_net
net -n  --  in network namespace of current task
net -n pid|taskp -- in network namespace of specified task

Signed-off-by: Vasily Averin <vvs <at> openvz.org>
---
 defs.h    |  1 +
 help.c    | 10 +++++++++-
 net.c     | 56 +++++++++++++++++++++++++++++++++++++++++---------------
 symbols.c |  2 ++
 4 files changed, 53 insertions(+), 16 deletions(-)

diff --git a/defs.h b/defs.h
index dc2d65a..d51936f 100644
--- a/defs.h
+++ b/defs.h
 <at>  <at>  -1923,6 +1923,7  <at>  <at>  struct offset_table {                    /* stash of commonly-used offsets */
 	long kernfs_node_parent;
 	long kmem_cache_cpu_partial;
 	long kmem_cache_cpu_cache;
+	long nsproxy_net_ns;
 };

 struct size_table {         /* stash of commonly-used sizes */
diff --git a/help.c b/help.c
index 780966b..4f98aa5 100644
--- a/help.c
+++ b/help.c
 <at>  <at>  -6452,7 +6452,7  <at>  <at>  NULL
 char *help_net[] = {
(Continue reading)


Gmane