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: <6b80d984-1f81-0d34-1b28-73c64ad15910@csgroup.eu>
Date:   Mon, 20 Jun 2022 07:42:48 +0000
From:   Christophe Leroy <christophe.leroy@...roup.eu>
To:     Peter Zijlstra <peterz@...radead.org>,
        Josh Poimboeuf <jpoimboe@...nel.org>
CC:     Steven Rostedt <rostedt@...dmis.org>,
        "x86@...nel.org" <x86@...nel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        Josh Poimboeuf <jpoimboe@...hat.com>,
        "naveen.n.rao@...ux.vnet.ibm.com" <naveen.n.rao@...ux.vnet.ibm.com>,
        "mbenes@...e.cz" <mbenes@...e.cz>
Subject: Re: [RFC][PATCH] ftrace,objtool: PC32 based __mcount_loc



Le 20/06/2022 à 09:35, Peter Zijlstra a écrit :
> On Fri, Jun 17, 2022 at 01:11:42PM -0700, Josh Poimboeuf wrote:
>> On Fri, Jun 17, 2022 at 01:24:53PM +0200, Peter Zijlstra wrote:
>>>
>>> Hi,
>>>
>>> I recently noticed that __mcount_loc is 64bit wide, containing absolute
>>> addresses. Since __mcount_loc is a permanent section (not one we drop
>>> after boot), this bloats the kernel memory usage for no real purpose.
>>>
>>> The below patch adds __mcount_loc_32 and objtool support to generate it.
>>> This saves, on an x86_64-defconfig + FTRACE, 23975*4 ~= 94K of permanent
>>> storage.
>>>
>>> XXX hobbled sorttable for now
>>> XXX compile tested only
>>>
>>> Signed-off-by: Peter Zijlstra (Intel) <peterz@...radead.org>
>>
>> Nice!
>>
>> Some nits:
>>
>> - No need for renaming the section, it can still be called
>>    '__mcount_loc' regardless?
> 
> I wanted to avoid mixing them by accidental build funnies, also, it
> having a different name makes it easier to check what's what with a
> simple readelf.
> 
>> - No need for a new FTRACE_MCOUNT32_USE_OBJTOOL config option or
>>    '--mcount32' cmdline option, just change the old ones to be pc32?
> 
> Right, so I did that because of the pending --mcount patches for Power.
> If Christophe is on board with that, sure, can do.

Yes, on 32 bits platforms it makes no difference, so lets convert all 
platforms to PC32, it's always easier to have only one solution for all.

> 
>> - change "32" to "PC32": CC_USING_MCOUNT_LOC_PC32
> 
> Right.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ