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]
Date:	Mon, 9 May 2016 10:40:38 -0500
From:	Corey Minyard <cminyard@...sta.com>
To:	Baoquan He <bhe@...hat.com>, Corey Minyard <minyard@....org>
Cc:	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/2016 09:29 AM, Baoquan He wrote:
> On 05/09/16 at 07:10am, Corey Minyard wrote:
>> On 05/09/2016 12:18 AM, Baoquan He wrote:
>>> Hi Corey,
>>>
>>> I am trying to review this patch now, and these fixes contained are very
>>> great. Just several concerns are added in inline comment.
>>>
>>> By the way, did you run this in your side?
>> Yes, I tested on x86, x86_64, ARM and MIPS.
>>
>> Comments inline...
> That's awesome. I will have a try too.
>
>>>>> diff --git a/Documentation/kdump/gdbmacros.txt b/Documentation/kdump/gdbmacros.txt
>>>>> index 9b9b454..e5bbd8d 100644
>>>>> --- a/Documentation/kdump/gdbmacros.txt
>>>>> +++ b/Documentation/kdump/gdbmacros.txt
>>>>> @@ -15,14 +15,14 @@
>>>>>   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?

-corey

>
> Thanks
> Baoquan
>
>>>>>   		while ($stackp < $stack_top)
>>>>> @@ -31,12 +31,12 @@ define bttnobp
>>>>>   			end
>>>>>   			set $stackp += 4
>>>>>   		end

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ