Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp6287776imu; Mon, 21 Jan 2019 06:25:48 -0800 (PST) X-Google-Smtp-Source: ALg8bN71ex/wjuHG9Z+pmfCStsStgcsJTYYkvcoK47XiBPZhm57N9px6CEGb5T2uYwMtrrGkta5K X-Received: by 2002:a62:104a:: with SMTP id y71mr10873609pfi.34.1548080748464; Mon, 21 Jan 2019 06:25:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548080748; cv=none; d=google.com; s=arc-20160816; b=OVyc+k7tkphJRsgGTLGEbQpGk2NOQ7DCGHQu531ReaI2XdpOBpoqQKbAqkA6S0dstX kkriBLM0KDpcydQBz8HjKdonlN2WPKX3GLKAY2Eg0YRNNGxrHjXBw10PB0+r0iGVNSO1 ZmJtGTJhCf0mj4nyfgeELxBLfCm5RRqxIEvG7r6SvI7W9cFr3xAt4gpxwcLWvNnfDVOD LePVBZEbGIglsHquSG3HzL10wJMeRBlTMqYmUCw1ojQhCbJkB7AxJewCBiO4aGvFB4Be BxRF3I9UgOgZYIoGJuDbDdSVT22uNBfZcfFle/KGwVYRfdgMS7iD+0nqFP2cf+1XAyXX ucpg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=WFk7q3HeXO879Mh4ZEtUfaz+C0G3LVcx/EGv0uDTd+0=; b=oxh/D+5/qH239vRONEYmYF2ApGcvaUrClo71u5Bmb+KjhOrPtdhFXLOWaEVqqRwwrq qwR1XFUnk3Te3HGlxHOgtQvRtsmHgPZIVbTr6rthOcITjpqXRd1LSONfi4c8E5paVWrA I9Euqc484Bb6kKt/B+OhSw+deUlmNZgTV2dyWwCOM5xU2KLT3yodnintig1hpTnoIXEX 1xW3mS5eijuum7GI4UKplDlzH7nnY+6F06LGpfEzY2x3p6IHP3gQTApdlxPzrwWpCwG2 p3xgxBfoMahrYmVPbJCPCAkXCgx3VjkqY7XNzWDApy6CIpwg9BZi0uGvxPDaMefLZYiq ztqA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=m7hl3cfT; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 36si13379940plc.300.2019.01.21.06.25.32; Mon, 21 Jan 2019 06:25:48 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=m7hl3cfT; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729438AbfAUOYa (ORCPT + 99 others); Mon, 21 Jan 2019 09:24:30 -0500 Received: from mail.kernel.org ([198.145.29.99]:35910 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729036AbfAUOYa (ORCPT ); Mon, 21 Jan 2019 09:24:30 -0500 Received: from localhost (5356596B.cm-6-7b.dynamic.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 3A3812063F; Mon, 21 Jan 2019 14:24:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1548080669; bh=ACOJcjG4rVF2opM4WTsVMSDlvUpqXcectVyDWrCX4m0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=m7hl3cfTyKUDKtdQaW5joqJ5KWb9+YnJ7ctJYgHkXB+qPAq4ueAeYGbAZdNdzxLE0 OJv4S+4qUgvP8c0ytacvlJ0J9+8c021cqnFaAZh5kPwjppKN8gEerX68NoAoaXDyb+ vyZBNM5y5vp3CqJ6XbkS0BXBqG+tVJVPh2hyw1jY= Date: Mon, 21 Jan 2019 15:24:27 +0100 From: Greg KH To: Alexander Popov Cc: Paolo Bonzini , Radim Krcmar , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Nadav Amit , Andy Lutomirski , Stefan Hajnoczi , H Peter Anvin , x86@kernel.org, kvm@vger.kernel.org, kernel-hardening@lists.openwall.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] KVM: x86: Fix single-step debugging Message-ID: <20190121142427.GA26671@kroah.com> References: <1548074920-10651-1-git-send-email-alex.popov@linux.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1548074920-10651-1-git-send-email-alex.popov@linux.com> User-Agent: Mutt/1.11.2 (2019-01-07) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jan 21, 2019 at 03:48:40PM +0300, Alexander Popov wrote: > The single-step debugging of KVM guests on x86 is broken: if we run > gdb 'stepi' command at the breakpoint when the guest interrupts are > enabled, RIP always jumps to native_apic_mem_write(). Then other > nasty effects follow. > > Long investigation showed that on Jun 7, 2017 the > commit c8401dda2f0a00cd25c0 ("KVM: x86: fix singlestepping over syscall") > introduced the kvm_run.debug corruption: kvm_vcpu_do_singlestep() can > be called without X86_EFLAGS_TF set. > > Let's fix it. Please consider that for -stable. > > Signed-off-by: Alexander Popov > --- > arch/x86/kvm/x86.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) This is not the correct way to submit patches for inclusion in the stable kernel tree. Please read: https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html for how to do this properly.