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:   Wed, 15 Jun 2022 16:03:35 +0000
From:   Christophe Leroy <christophe.leroy@...roup.eu>
To:     Sathvika Vasireddy <sv@...ux.vnet.ibm.com>
CC:     "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "linuxppc-dev@...ts.ozlabs.org" <linuxppc-dev@...ts.ozlabs.org>,
        Benjamin Herrenschmidt <benh@...nel.crashing.org>,
        Paul Mackerras <paulus@...ba.org>,
        Michael Ellerman <mpe@...erman.id.au>,
        "aik@...abs.ru" <aik@...abs.ru>, "mbenes@...e.cz" <mbenes@...e.cz>,
        "peterz@...radead.org" <peterz@...radead.org>,
        "rostedt@...dmis.org" <rostedt@...dmis.org>,
        "jpoimboe@...hat.com" <jpoimboe@...hat.com>,
        "Naveen N. Rao" <naveen.n.rao@...ux.vnet.ibm.com>,
        Sathvika Vasireddy <sv@...ux.ibm.com>
Subject: Re: [RFC PATCH v2 0/7] objtool: Enable and implement --mcount option
 on powerpc



Le 25/05/2022 à 20:12, Sathvika Vasireddy a écrit :
> 
> On 25/05/22 23:09, Christophe Leroy wrote:
>> Hi Sathvika,
>>
>> Le 25/05/2022 à 12:14, Sathvika Vasireddy a écrit :
>>> Hi Christophe,
>>>
>>> On 24/05/22 18:47, Christophe Leroy wrote:
>>>> This draft series adds PPC32 support to Sathvika's series.
>>>> Verified on pmac32 on QEMU.
>>>>
>>>> It should in principle also work for PPC64 BE but for the time being
>>>> something goes wrong. In the beginning I had a segfaut hence the first
>>>> patch. But I still get no mcount section in the files.
>>> Since PPC64 BE uses older elfv1 ABI, it prepends a dot to symbols.
>>> And so, the relocation records in case of PPC64BE point to "._mcount",
>>> rather than just "_mcount". We should be looking for "._mcount" to be
>>> able to generate mcount_loc section in the files.
>>>
>>> Like:
>>>
>>> diff --git a/tools/objtool/check.c b/tools/objtool/check.c
>>> index 70be5a72e838..7da5bf8c7236 100644
>>> --- a/tools/objtool/check.c
>>> +++ b/tools/objtool/check.c
>>> @@ -2185,7 +2185,7 @@ static int classify_symbols(struct objtool_file
>>> *file)
>>>                           if (arch_is_retpoline(func))
>>>                                   func->retpoline_thunk = true;
>>>
>>> -                       if ((!strcmp(func->name, "__fentry__")) ||
>>> (!strcmp(func->name, "_mcount")))
>>> +                       if ((!strcmp(func->name, "__fentry__")) ||
>>> (!strcmp(func->name, "_mcount")) || (!strcmp(func->name, "._mcount")))
>>>                                   func->fentry = true;
>>>
>>>                           if (is_profiling_func(func->name))
>>>
>>>
>>> With this change, I could see __mcount_loc section being
>>> generated in individual ppc64be object files.
>>>
>> Or should we implement an equivalent of arch_ftrace_match_adjust() in
>> objtool ?
> 
> Yeah, I think it makes more sense if we make it arch specific.
> Thanks for the suggestion. I'll make this change in next revision :-)
> 

Do you have any idea when you plan to send next revision ?

I'm really looking forward to submitting the inline static calls on top 
of your series.

Thanks
Christophe

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ