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] [day] [month] [year] [list]
Date:   Thu, 4 Jun 2020 11:25:09 +0800
From:   yuanjunqing <yuanjunqing66@....com>
To:     "Maciej W. Rozycki" <macro@....com>,
        WANG Xuerui <kernel@...0n.name>
Cc:     tsbogend@...ha.franken.de, linux-mips@...r.kernel.org,
        linux-kernel@...r.kernel.org, liulichao@...ngson.cn,
        "Maciej W. Rozycki" <macro@...ux-mips.org>
Subject: Re: [PATCH] function:stacktrace/mips: Fix function:stacktrace for
 mips


在 2020/6/4 上午9:17, Maciej W. Rozycki 写道:
> On Fri, 29 May 2020, WANG Xuerui wrote:
>
>> On 2020/5/29 17:29, yuanjunqing wrote:
>>
>>>> diff --git a/arch/mips/kernel/mcount.S b/arch/mips/kernel/mcount.S
>>>> index cff52b283e03..cd5545764e5f 100644
>>>> --- a/arch/mips/kernel/mcount.S
>>>> +++ b/arch/mips/kernel/mcount.S
>>>> @@ -87,8 +87,15 @@ EXPORT_SYMBOL(_mcount)
>>>>   	PTR_LA   t1, _etext
>>>>   	sltu     t3, t1, a0	/* t3 = (a0 > _etext) */
>>>>   	or       t1, t2, t3
>>>> +	PTR_LA	 t2, stlab-4 	/* t2: "function:stacktrace" return address */
>>>> +	move	 a1, AT		/* arg2: parent's return address */
>>>>   	beqz     t1, ftrace_call
>>>> -	 nop
>>>> +	 nop			/* "function:stacktrace" return address */
>>>> +stlab:
>>>> +	PTR_LA	t2, stlab-4
>>>> +	/* ftrace_call_end: ftrace_call return address */
>>>> +	beq	t2,ra, ftrace_call_end
>>>> +	nop
>  Broken delay slot indentation.

Thank you for your reply. For this question that you mentioned about the delay slot, I will modify my patch again.

>
>>>>   #if defined(KBUILD_MCOUNT_RA_ADDRESS) && defined(CONFIG_32BIT)
>>>>   	PTR_SUBU a0, a0, 16	/* arg1: adjust to module's recorded callsite */
>>>>   #else
>>>> @@ -98,7 +105,9 @@ EXPORT_SYMBOL(_mcount)
>>>>   	.globl ftrace_call
>>>>   ftrace_call:
>>>>   	nop	/* a placeholder for the call to a real tracing function */
>>>> -	 move	a1, AT		/* arg2: parent's return address */
>>>> +	move	ra, t2		/* t2: "function:stacktrace" return address */
>  Likewise.  NB I haven't investigated if the change makes sense.  A more 
> detailed explanation in the change description is certainly needed.

I will attach a specific description for further explanation about the second patch later.

>
>   Maciej

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ