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:   Mon, 21 Dec 2020 19:57:12 +0100
From:   Uros Bizjak <ubizjak@...il.com>
To:     Sean Christopherson <seanjc@...gle.com>
Cc:     kvm@...r.kernel.org, LKML <linux-kernel@...r.kernel.org>,
        Paolo Bonzini <pbonzini@...hat.com>,
        Krish Sadhukhan <krish.sadhukhan@...cle.com>
Subject: Re: [PATCH v2] KVM/x86: Move definition of __ex to x86.h

On Mon, Dec 21, 2020 at 7:19 PM Sean Christopherson <seanjc@...gle.com> wrote:
>
> On Sun, Dec 20, 2020, Uros Bizjak wrote:
> > Merge __kvm_handle_fault_on_reboot with its sole user
>
> There's also a comment in vmx.c above kvm_cpu_vmxoff() that should be updated.
> Alternatively, and probably preferably for me, what about keeping the long
> __kvm_handle_fault_on_reboot() name for the macro itself and simply moving the
> __ex() macro?
>
> That would also allow keeping kvm_spurious_fault() and
> __kvm_handle_fault_on_reboot() where they are (for no reason other than to avoid
> code churn).  Though I'm also ok if folks would prefer to move everything to
> x86.h.

The new patch is vaguely based on our correspondence on the prototype patch:

--q--
Moving this to asm/kvm_host.h is a bit sketchy as __ex() isn't exactly the
most unique name.  arch/x86/kvm/x86.h would probably be a better
destination as it's "private".  __ex() is only used in vmx.c, nested.c and
svm.c, all of which already include x86.h.
--/q--

where you mentioned that x86.h would be a better destination for
__ex(). IMO, __kvm_handle_fault_on_reboot also belongs in x86.h, as it
deals with a low-level access to the processor, and there is really no
reason for this #define to be available for the whole x86 architecture
directory. I remember looking for the __kvm_handle_falult_on_reboot,
and was surprised to find it in a global x86 include directory.

I tried to keep __ex as a redefine to __kvm_hanlde_fault_on_reboot in
x86.h, but it just looked weird, since __ex is the only user and the
introductory document explains in detail, what
__kvm_hanlde_fault_on_reboot (aka __ex) does.

Uros.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ