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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAKwvOdk1n2v5Sym14BR0jGWKX8nNP1VL4Z1vXtAOWvQETOCSmQ@mail.gmail.com>
Date:   Tue, 7 Mar 2023 13:22:45 -0800
From:   Nick Desaulniers <ndesaulniers@...gle.com>
To:     Linus Torvalds <torvalds@...ux-foundation.org>
Cc:     "Luck, Tony" <tony.luck@...el.com>,
        Jakub Jelinek <jakub@...hat.com>,
        Segher Boessenkool <segher@...nel.crashing.org>,
        Peter Zijlstra <peterz@...radead.org>,
        "Eranian, Stephane" <eranian@...gle.com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "Chatre, Reinette" <reinette.chatre@...el.com>,
        "Yu, Fenghua" <fenghua.yu@...el.com>,
        "peternewman@...gle.com" <peternewman@...gle.com>,
        "james.morse@....com" <james.morse@....com>,
        "babu.moger@....com" <babu.moger@....com>,
        "ananth.narayan@....com" <ananth.narayan@....com>,
        "vschneid@...hat.com" <vschneid@...hat.com>,
        Nathan Chancellor <nathan@...nel.org>,
        clang-built-linux <llvm@...ts.linux.dev>,
        Borislav Petkov <bp@...en8.de>,
        "H. Peter Anvin" <hpa@...or.com>,
        "linux-toolchains@...r.kernel.org" <linux-toolchains@...r.kernel.org>
Subject: Re: [PATCH] x86/resctrl: avoid compiler optimization in __resctrl_sched_in

On Tue, Mar 7, 2023 at 1:19 PM Linus Torvalds
<torvalds@...ux-foundation.org> wrote:
>
> On Tue, Mar 7, 2023 at 1:16 PM Nick Desaulniers <ndesaulniers@...gle.com> wrote:
> >
> > >
> > > Can you expand about part "a" ... Linux has zillions of static inline functions
> > > in header files to handle CONFIG options. One version is the real McCoy
> > > while the other is just a stub for the CONFIG=n case.
> >
> > Right, I had the same question.
> >
> > Perhaps it's more so that no one calls __resctrl_sched_in, only
> > resctrl_sched_in, therefor they should be folded into one function?
>
> If you think it should be inlined, it should be marked as such.

Yep, sorry, I missed that `inline` was missing from that definition!

>
> And if you *don't* think it should be inlined - quite possibly the
> right answer here - the definition of that function damn well
> shouldn't be in a header file.
>
> So either way, that __resctrl_sched_in() was wrong, wrong, wrong.
>
>            Linus
>


-- 
Thanks,
~Nick Desaulniers

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ