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]
Message-ID: <e76ee516-4438-295d-5e1e-698644374d87@redhat.com>
Date:   Tue, 25 Jan 2022 17:29:50 +0100
From:   Paolo Bonzini <pbonzini@...hat.com>
To:     Jinrong Liang <ljr.kernel@...il.com>
Cc:     Xianting Tian <xianting.tian@...ux.alibaba.com>,
        Jim Mattson <jmattson@...gle.com>,
        Sean Christopherson <seanjc@...gle.com>,
        Vitaly Kuznetsov <vkuznets@...hat.com>,
        Wanpeng Li <wanpengli@...cent.com>,
        Joerg Roedel <joro@...tes.org>, kvm@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH 15/19] KVM: x86/emulate: Remove unused "ctxt" of
 task_switch_{16, 32}()

On 1/25/22 10:59, Jinrong Liang wrote:
> From: Jinrong Liang <cloudliang@...cent.com>
> 
> The "struct x86_emulate_ctxt *ctxt" parameter of task_switch_{16, 32}()
> is not used, so remove it. No functional change intended.

This is actually removing tss_selector, but it's okay.

Paolo

> Signed-off-by: Jinrong Liang <cloudliang@...cent.com>
> ---
>   arch/x86/kvm/emulate.c | 11 ++++-------
>   1 file changed, 4 insertions(+), 7 deletions(-)
> 
> diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c
> index c2d9fe6449c2..9e4a00d04532 100644
> --- a/arch/x86/kvm/emulate.c
> +++ b/arch/x86/kvm/emulate.c
> @@ -3020,8 +3020,7 @@ static int load_state_from_tss16(struct x86_emulate_ctxt *ctxt,
>   	return X86EMUL_CONTINUE;
>   }
>   
> -static int task_switch_16(struct x86_emulate_ctxt *ctxt,
> -			  u16 tss_selector, u16 old_tss_sel,
> +static int task_switch_16(struct x86_emulate_ctxt *ctxt, u16 old_tss_sel,
>   			  ulong old_tss_base, struct desc_struct *new_desc)
>   {
>   	struct tss_segment_16 tss_seg;
> @@ -3159,8 +3158,7 @@ static int load_state_from_tss32(struct x86_emulate_ctxt *ctxt,
>   	return ret;
>   }
>   
> -static int task_switch_32(struct x86_emulate_ctxt *ctxt,
> -			  u16 tss_selector, u16 old_tss_sel,
> +static int task_switch_32(struct x86_emulate_ctxt *ctxt, u16 old_tss_sel,
>   			  ulong old_tss_base, struct desc_struct *new_desc)
>   {
>   	struct tss_segment_32 tss_seg;
> @@ -3268,10 +3266,9 @@ static int emulator_do_task_switch(struct x86_emulate_ctxt *ctxt,
>   		old_tss_sel = 0xffff;
>   
>   	if (next_tss_desc.type & 8)
> -		ret = task_switch_32(ctxt, tss_selector, old_tss_sel,
> -				     old_tss_base, &next_tss_desc);
> +		ret = task_switch_32(ctxt, old_tss_sel, old_tss_base, &next_tss_desc);
>   	else
> -		ret = task_switch_16(ctxt, tss_selector, old_tss_sel,
> +		ret = task_switch_16(ctxt, old_tss_sel,
>   				     old_tss_base, &next_tss_desc);
>   	if (ret != X86EMUL_CONTINUE)
>   		return ret;

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ