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, 8 Mar 2023 10:02:46 -0600
From:   "Moger, Babu" <babu.moger@....com>
To:     Linus Torvalds <torvalds@...ux-foundation.org>,
        Jakub Jelinek <jakub@...hat.com>
Cc:     Segher Boessenkool <segher@...nel.crashing.org>,
        Peter Zijlstra <peterz@...radead.org>,
        Nick Desaulniers <ndesaulniers@...gle.com>,
        Stephane Eranian <eranian@...gle.com>,
        linux-kernel@...r.kernel.org, tony.luck@...el.com,
        reinette.chatre@...el.com, fenghua.yu@...el.com,
        peternewman@...gle.com, james.morse@....com,
        ananth.narayan@....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
Subject: Re: [PATCH] x86/resctrl: avoid compiler optimization in
 __resctrl_sched_in



On 3/7/23 15:06, Linus Torvalds wrote:
> On Tue, Mar 7, 2023 at 12:54 PM Linus Torvalds
> <torvalds@...ux-foundation.org> wrote:
>>
>> I think the problem is that the <asm/resctrl.h> code is disgusting and
>> horrible in multiple ways:
>>
>>  (a) it shouldn't define and declare a static function in a header file
>>
>>  (b) the resctrl_sched_in() inline function is misdesigned to begin with
> 
> Ok, so here's a *ttoally* untested and mindless patch to maybe fix
> what I dislike about that resctl code.
> 
> Does it fix the code generation issue? I have no idea. But this is
> what I would suggest is the right answer, without actually knowing the
> code any better, and just going on a mindless rampage.
> 
> It seems to compile for me, fwiw.
> 
>              Linus

Tested both on GCC and CLANG. Test passes and resctrl limits are working
fine. Thanks for the patch.

Tested-by: Babu Moger <babu.moger@....com>

-- 
Thanks
Babu Moger

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ