lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <1463640406-180865-1-git-send-email-liuhailong5@huawei.com>
Date:	Thu, 19 May 2016 14:46:46 +0800
From:	liuhailong <liuhailong5@...wei.com>
To:	<akpm@...ux-foundation.org>, <pmladek@...e.com>, <tj@...nel.org>,
	<sergey.senozhatsky@...il.com>, <vvs@...tuozzo.com>,
	<aryabinin@...tuozzo.com>, <treding@...dia.com>,
	<colona@...sta.com>, <linux-kernel@...r.kernel.org>
CC:	<liuhailong5@...wei.com>, <lipengcheng8@...wei.com>,
	<liuyongfu@...ilicon.com>, <dan.zhao@...ilicon.com>
Subject: [PATCH] printk: add tgid and comm in dump_stack_print_info

Some threads'name of android is the same in different process.
So we need to get the tgid and the comm of thread's group_leader.

Signed-off-by: Liu Hailong <liuhailong5@...wei.com>
---
 kernel/printk/printk.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c
index bfbf284..84246b3 100644
--- a/kernel/printk/printk.c
+++ b/kernel/printk/printk.c
@@ -3166,6 +3166,9 @@ void dump_stack_print_info(const char *log_lvl)
 	       (int)strcspn(init_utsname()->version, " "),
 	       init_utsname()->version);
 
+	printk("TGID: %d Comm: %.20s\n",
+	       current->tgid, current->group_leader->comm);
+
 	if (dump_stack_arch_desc_str[0] != '\0')
 		printk("%sHardware name: %s\n",
 		       log_lvl, dump_stack_arch_desc_str);
-- 
1.8.3.2

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ