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] [day] [month] [year] [list]
Date:   Wed, 10 Aug 2022 14:00:56 -0700
From:   Namhyung Kim <namhyung@...nel.org>
To:     Waiman Long <longman@...hat.com>
Cc:     Peter Zijlstra <peterz@...radead.org>,
        Ingo Molnar <mingo@...nel.org>, Will Deacon <will@...nel.org>,
        Boqun Feng <boqun.feng@...il.com>,
        LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] locking: Add __lockfunc to slow path functions

On Tue, Aug 9, 2022 at 4:37 PM Namhyung Kim <namhyung@...nel.org> wrote:
>
> On Tue, Aug 9, 2022 at 4:09 PM Waiman Long <longman@...hat.com> wrote:
> >
> > On 8/9/22 17:13, Namhyung Kim wrote:
> > > --- a/arch/x86/include/asm/qspinlock_paravirt.h
> > > +++ b/arch/x86/include/asm/qspinlock_paravirt.h
> > > @@ -36,7 +36,7 @@ PV_CALLEE_SAVE_REGS_THUNK(__pv_queued_spin_unlock_slowpath);
> > >    *   rsi = lockval           (second argument)
> > >    *   rdx = internal variable (set to 0)
> > >    */
> > > -asm    (".pushsection .text;"
> > > +asm    (".pushsection .spinlock.text;"
> > >          ".globl " PV_UNLOCK ";"
> > >          ".type " PV_UNLOCK ", @function;"
> > >          ".align 4,0x90;"
> > >
> > That is what I meant. However, you should also a comment saying that the
> > use of .spinlock.text section is equivalent to the use of __lockfunc on
> > an equivalent C function to make it clear. Also add the __lockfunc to
> > the pseudo code in the comment section.

FYI I had to use __PV_CALLEE_SAVE_REGS_THUNK to pass the section name
(".spinlock.text") to prevent a build error.

  CC      kernel/locking/qspinlock.o
/tmp/ccdn2Gyk.s: Assembler messages:
/tmp/ccdn2Gyk.s:725: Error: changed section attributes for .spinlock.text

Thanks,
Namhyung

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ