Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934372AbcKOKpf (ORCPT ); Tue, 15 Nov 2016 05:45:35 -0500 Received: from mail-wm0-f66.google.com ([74.125.82.66]:32930 "EHLO mail-wm0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933197AbcKOKp3 (ORCPT ); Tue, 15 Nov 2016 05:45:29 -0500 Subject: Re: kvm: WARNING in em_jmp_far To: Nadav Amit , Dmitry Vyukov References: <45DE3A97-304D-4D1A-AADE-1B9D154BB7DF@gmail.com> <2C688876-3784-4852-AD7D-0E6548F5F4FF@gmail.com> Cc: syzkaller , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , "x86@kernel.org" , KVM list , LKML , Steve Rutherford , =?UTF-8?B?UmFkaW0gS3LEjW3DocWZ?= From: Paolo Bonzini Message-ID: Date: Tue, 15 Nov 2016 11:45:26 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: <2C688876-3784-4852-AD7D-0E6548F5F4FF@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1291 Lines: 37 On 15/11/2016 06:39, Nadav Amit wrote: > >> On Nov 14, 2016, at 9:30 PM, Dmitry Vyukov wrote: >> >> On Tue, Nov 15, 2016 at 6:24 AM, Nadav Amit wrote: >>> >>>> On Nov 14, 2016, at 9:06 PM, Dmitry Vyukov wrote: >>>> >>>> Hello, >>>> >>>> The following program triggers WARNING in em_jmp_far: >>>> https://gist.githubusercontent.com/dvyukov/16bfd3d68fa7d5461101ef74e07796e4/raw/e6d663980681f2c5838ff6cd361cede7d3204838/gistfile1.txt >>>> >>>> >>>> WARNING: CPU: 1 PID: 15748 at arch/x86/kvm/emulate.c:2128 em_jmp_far+0x4a7/0x530 >>> >>> I don’t know how to “read” the test, but it seems that this warning >>> can be triggered if CS base/limit cause a #GP exception when EIP >>> is loaded. >>> >>> I think it safe to remove this warning (which I introduced) as well as >>> the redundant “return rc” that follows it. The code should handle the >>> emulation correctly regardless of the warning. >> >> There was also a similar WARNING in em_ret_far: >> https://groups.google.com/forum/#!msg/syzkaller/o5ZftARBhrs/r1ivQ-HtBgAJ >> >> Please mail a fix and add a test. > > I am sorry, but I don’t think my current employer allows me to contribute > to KVM in such a manner. No problem, we can take care of it. Paolo