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>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160510013728.GA2629@x1.redhat.com>
Date:	Tue, 10 May 2016 09:37:28 +0800
From:	Baoquan He <bhe@...hat.com>
To:	Corey Minyard <cminyard@...sta.com>
Cc:	Corey Minyard <minyard@....org>, kexec@...ts.infradead.org,
	linux-kernel@...r.kernel.org, Vivek Goyal <vgoyal@...hat.com>,
	Haren Myneni <hbabu@...ibm.com>, dyoung@...hat.com
Subject: Re: [PATCH] kdump: Fix gdb macros work work with newer and 64-bit
 kernels

On 05/09/16 at 10:40am, Corey Minyard wrote:
> >>>>>  define bttnobp
> >>>>>  	set $tasks_off=((size_t)&((struct task_struct *)0)->tasks)
> >>>>>-	set $pid_off=((size_t)&((struct task_struct *)0)->pids[1].pid_list.next)
> >>>>>+	set $pid_off=((size_t)&((struct task_struct *)0)->thread_group.next)
> >>>This is a quite nice fix.
> >>>
> >>>>>  	set $init_t=&init_task
> >>>>>  	set $next_t=(((char *)($init_t->tasks).next) - $tasks_off)
> >>>>>  	while ($next_t != $init_t)
> >>>>>  		set $next_t=(struct task_struct *)$next_t
> >>>>>  		printf "\npid %d; comm %s:\n", $next_t.pid, $next_t.comm
> >>>>>  		printf "===================\n"
> >>>>>-		set var $stackp = $next_t.thread.esp
> >>>>>+		set var $stackp = $next_t.thread.sp
> >>>>>  		set var $stack_top = ($stackp & ~4095) + 4096
> >Missed one place here. Currently the kernel stack is decided by
> >THREAD_SIZE since the definition:
> >
> >union thread_union {
> >         struct thread_info thread_info;
> >         unsigned long stack[THREAD_SIZE/sizeof(long)];
> >};
> >
> >Should we get the top and bottom of stack according to this now?
> >
> >Correct me if I was wrong.
> 
> I think you are correct.  We should use something like:
> 
>    set var $stack_top = ($stackp & ~(sizeof(thread_union) - 1)) +
>    sizeof(thread_union)
> 
> Is this what you are suggesting?

Exactly, it's cool. Thanks!


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ