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: <878qu6205g.ffs@tglx>
Date: Tue, 29 Oct 2024 20:12:59 +0100
From: Thomas Gleixner <tglx@...utronix.de>
To: Junaid Shahid <junaids@...gle.com>, Brendan Jackman
 <jackmanb@...gle.com>, Borislav Petkov <bp@...en8.de>
Cc: Ingo Molnar <mingo@...hat.com>, Dave Hansen
 <dave.hansen@...ux.intel.com>, "H. Peter Anvin" <hpa@...or.com>, Andy
 Lutomirski <luto@...nel.org>, Peter Zijlstra <peterz@...radead.org>, Sean
 Christopherson <seanjc@...gle.com>, Paolo Bonzini <pbonzini@...hat.com>,
 Alexandre Chartre <alexandre.chartre@...cle.com>, Liran Alon
 <liran.alon@...cle.com>, Jan Setje-Eilers <jan.setjeeilers@...cle.com>,
 Catalin Marinas <catalin.marinas@....com>, Will Deacon <will@...nel.org>,
 Mark Rutland <mark.rutland@....com>, Andrew Morton
 <akpm@...ux-foundation.org>, Mel Gorman <mgorman@...e.de>, Lorenzo Stoakes
 <lstoakes@...il.com>, David Hildenbrand <david@...hat.com>, Vlastimil
 Babka <vbabka@...e.cz>, Michal Hocko <mhocko@...nel.org>, Khalid Aziz
 <khalid.aziz@...cle.com>, Juri Lelli <juri.lelli@...hat.com>, Vincent
 Guittot <vincent.guittot@...aro.org>, Dietmar Eggemann
 <dietmar.eggemann@....com>, Steven Rostedt <rostedt@...dmis.org>, Valentin
 Schneider <vschneid@...hat.com>, Paul Turner <pjt@...gle.com>, Reiji
 Watanabe <reijiw@...gle.com>, Ofir Weisse <oweisse@...gle.com>, Yosry
 Ahmed <yosryahmed@...gle.com>, Patrick Bellasi <derkling@...gle.com>, KP
 Singh <kpsingh@...gle.com>, Alexandra Sandulescu <aesa@...gle.com>, Matteo
 Rizzo <matteorizzo@...gle.com>, Jann Horn <jannh@...gle.com>,
 x86@...nel.org, linux-kernel@...r.kernel.org, linux-mm@...ck.org,
 kvm@...r.kernel.org
Subject: Re: [PATCH 01/26] mm: asi: Make some utility functions noinstr
 compatible

On Tue, Oct 29 2024 at 10:38, Junaid Shahid wrote:
> On 10/25/24 6:21 AM, Brendan Jackman wrote:
>>> I'd expect you either always inline the small functions - as you do for some
>>> aleady - or mark the others noinstr. But not something in between.
>>>
>>> Why this?
>> 
>> Overall it's pretty likely I'm wrong about the subtlety of noinstr's
>> meaning. And the benefits I listed above are pretty minor. I should
>> have looked into this as it would have been an opportunity to reduce
>> the patch count of this RFC!
>> 
>> Maybe I'm also forgetting something more important, perhaps Junaid
>> will weigh in...
>
> Yes, IIRC the idea was that there is no need to prohibit inlining for this class 
> of functions.

I doubt that it works as you want it to work.

+	inline notrace __attribute((__section__(".noinstr.text")))	\

So this explicitely puts the inline into the .noinstr.text section,
which means when it is used in .text the compiler will generate an out-of
line function in the .noinstr.text section and insert a call into the
usage site. That's independent of the size of the inline.

Thanks,

        tglx

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ