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: <1653388084.w21cyb07gc.naveen@linux.ibm.com>
Date:   Tue, 24 May 2022 16:01:48 +0530
From:   "Naveen N. Rao" <naveen.n.rao@...ux.vnet.ibm.com>
To:     Christophe Leroy <christophe.leroy@...roup.eu>,
        "linuxppc-dev@...ts.ozlabs.org" <linuxppc-dev@...ts.ozlabs.org>,
        Sathvika Vasireddy <sv@...ux.ibm.com>
Cc:     "aik@...abs.ru" <aik@...abs.ru>,
        "jpoimboe@...hat.com" <jpoimboe@...hat.com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "mbenes@...e.cz" <mbenes@...e.cz>,
        "mpe@...erman.id.au" <mpe@...erman.id.au>,
        "peterz@...radead.org" <peterz@...radead.org>,
        "rostedt@...dmis.org" <rostedt@...dmis.org>
Subject: Re: [RFC PATCH 1/4] objtool: Add --mnop as an option to --mcount

Christophe Leroy wrote:
> 
> 
> Le 24/05/2022 à 12:15, Naveen N. Rao a écrit :
>> Christophe Leroy wrote:
>>>
>>>
>>> Le 23/05/2022 à 19:55, Sathvika Vasireddy a écrit :
>>>> Architectures can select HAVE_NOP_MCOUNT if they choose
>>>> to nop out mcount call sites. If that config option is
>>>> selected, then --mnop is passed as an option to objtool,
>>>> along with --mcount.
>>>>
>>>
>>> Is there a reason not to nop out mcount call sites on powerpc as well ?
>> 
>> Yes, if there are functions that are out of range of _mcount(), then the 
>> linker would have inserted long branch trampolines. We detect such cases 
>> during boot. But, if we nop out the _mcount call sites during build 
>> time, we will need some other way to identify these.
>> 
> 
> But does it really matter whether _mcount is reachable or not ?
> 
> _mcount is never used, and the function we want to call in lieu of 
> _mcount might be reachable while _mcount is not or might be unreachable 
> while _mcount is.

For the most part, we will end up having to go to ftrace_caller or 
ftrace_regs_caller, both of which will usually be close to _mcount.

We need to know for sure either way. Nop'ing out the _mcount locations 
at boot allows us to discover existing long branch trampolines. If we 
want to avoid it, we need to note down those locations during build 
time.

Do you have a different approach in mind?


- Naveen

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ