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:   Tue, 29 Nov 2016 19:20:38 +0100 (CET)
From:   Thomas Gleixner <tglx@...utronix.de>
To:     Brijesh Singh <brijesh.singh@....com>
cc:     kvm@...r.kernel.org, thomas.lendacky@....com, rkrcmar@...hat.com,
        joro@...tes.org, x86@...nel.org, linux-kernel@...r.kernel.org,
        mingo@...hat.com, hpa@...or.com, pbonzini@...hat.com, bp@...e.de
Subject: Re: [PATCH v3] kvm: svm: Use the hardware provided GPA instead of
 page walk

On Tue, 29 Nov 2016, Brijesh Singh wrote:
> --- a/arch/x86/kvm/emulate.c
> +++ b/arch/x86/kvm/emulate.c
> @@ -5483,3 +5483,11 @@ void emulator_writeback_register_cache(struct x86_emulate_ctxt *ctxt)
>  {
>  	writeback_registers(ctxt);
>  }
> +
> +bool emulator_is_string_op(struct x86_emulate_ctxt *ctxt)
> +{
> +	if (ctxt->d & String)
> +		return true;
> +
> +	return false;
> +}

Do we really need a full function call for this simple thing? Just because
this horrible CamelCase constant is in emulate.c?

What's wrong with moving that thing into a header and make it a trivial
inline:

#define INS_STRING		(1 << 13)

static inline bool emulator_is_string_op(struct x86_emulate_ctxt *ctxt)
{
	return ctxt->d & INS_STRING;
}

Hmm?

	tglx

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ