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:   Thu, 8 Sep 2022 15:47:04 +0000
From:   Sean Christopherson <seanjc@...gle.com>
To:     "Wang, Wei W" <wei.w.wang@...el.com>
Cc:     Uros Bizjak <ubizjak@...il.com>,
        "kvm@...r.kernel.org" <kvm@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        Paolo Bonzini <pbonzini@...hat.com>,
        Peter Zijlstra <peterz@...radead.org>
Subject: Re: [PATCH] KVM/VMX: Do not declare vmread_error asmlinkage

On Tue, Sep 06, 2022, Wang, Wei W wrote:
> On Thursday, September 1, 2022 11:37 PM, Sean Christopherson wrote:
> > > > And vmread_error() isn't the only case where asmlinkage appears to be a
> > burden, e.g.
> > > > schedule_tail_wrapper() => schedule_tail() seems to exist purely to
> > > > deal with the side affect of asmlinkage generating -regparm=0 on 32-bit
> > kernels.
> > >
> > > schedule_tail is external to the x86 arch directory, and for some
> > > reason marked asmlinkage. So, the call from asm must follow asmlinkage
> > > ABI.
> > 
> > Ahhh, it's a common helper that's called from assembly on other architectures.
> > That makes sense.
> 
> I still doubt the necessity. The compilation is architecture specific, and we don't
> build one architecture-agnostic kernel binary to run on different architectures,
> right?

Right, it's not strictly necessary, e.g. wrapping schedule_tail()'s asmlinkage in
"#ifndef CONFIG_X86" would allow for the removal of schedule_tail_wrapper().  But
that's arguably worse than forcing i386 to use a wrapper given that the few extra
instructions are unlikely to add meaningful overhead, and since i386 is a rather
uncommon configuration these days.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ