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, 17 Aug 2022 15:58:13 +0000
From:   Sean Christopherson <seanjc@...gle.com>
To:     Uros Bizjak <ubizjak@...il.com>
Cc:     kvm@...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

+PeterZ

On Wed, Aug 17, 2022, Uros Bizjak wrote:
> There is no need to declare vmread_error asmlinkage, its arguments
> can be passed via registers for both, 32-bit and 64-bit targets.
> Function argument registers are considered call-clobbered registers,
> they are saved in the trampoline just before the function call and
> restored afterwards.

I'm officially confused.  What's the purpose of asmlinkage when used in the kernel?
Is it some historical wart that's no longer truly necessary and only causes pain?

When I wrote this code, I thought that the intent was that it should be applied to
any and all asm => C function calls.  But that's obviously not required as there
are multiple instances of asm code calling C functions without annotations of any
kind.

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.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ