From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pl1-f202.google.com (mail-pl1-f202.google.com [209.85.214.202]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 612A225558 for ; Thu, 4 Jan 2024 16:54:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--seanjc.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="Y3WjDS6D" Received: by mail-pl1-f202.google.com with SMTP id d9443c01a7336-1d4931d651aso6622975ad.2 for ; Thu, 04 Jan 2024 08:54:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1704387247; x=1704992047; darn=vger.kernel.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=IOc7yn03uRFuf4SJHIxKkjx7X83ZD2IbJiA9ijVZtUI=; b=Y3WjDS6DP4xVK8OIYTYdVhz/d+BvvBO7/nPe/tGR+H2oWZM2qb3gE48vGFlQPCFcbO wkhcXk0lrp6JAOJ5pX/KrC87icdjWVN6HvGGV9dWl2L+As4drYp1AUY5xaAx7Tj/faVW I/tKdmzg5LDaBmOYeq2St36+AXDlpcmEJPBV10I97Bm/r2ZkRzstR91Wn9H6Es8FXIUZ MUPVTNLBA2//0zIGbdXaL7IU+7xH+NlxqHEAS3YmUoBfEHV1j7vdtCJhursXbRmzZ4Bn pft89GFhxcQ9tbzxsMoezJ2Qx2eDEvgYltfsA8kfCUaiXyB3dykSmsL+mJSdX/Gq4HeP DunQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704387247; x=1704992047; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=IOc7yn03uRFuf4SJHIxKkjx7X83ZD2IbJiA9ijVZtUI=; b=jPnx3rpdEKnOKpTC0OUHZaS8hhJFMb64agbpt0Ajl+PnNkN1uOcG1mCGvUMA5VIrzS 8T9ct+WELzSReiRnFQZAnecLObn5TrxBfLil3JVpQ71Fnf7WMecu71Z/GNlnuQl3pSYe chyF1unPyVa/AH62tiosMal0vH8qTeM5/rmWXo6OD9a9n6APjBjTcIGRAkp+HroKV2oF NnH8D3E/5SFgw65VdYdmAKEdObWLK0nMZSv0fjdL94kaKeaLDG42SFCY3UeCX7WhUeu8 rJ4zeviSZWNwabXlQqtMMCsnXrh0KNp6UOVkY9LrnC7VB/C8MCYfg9QsAY+QCwRpwNcT Ogag== X-Gm-Message-State: AOJu0YzGqO7X0ShKmc70dKH95r2zqPGntBu23k316xm3l22tiVGzv/YS tqBzqonZHtXYXgErIrpNPB31Ag6Aboi0onkfbQ== X-Google-Smtp-Source: AGHT+IFmLxHHNgdX4Fuyvx4f7rjYsIcTNXONQ6lx9rKIuUnwdVGJFKZSbPUrwZXJ85nIEJRCrkSIzi6zQm0= X-Received: from zagreus.c.googlers.com ([fda3:e722:ac3:cc00:7f:e700:c0a8:5c37]) (user=seanjc job=sendgmr) by 2002:a17:903:11c6:b0:1d4:ac32:e9aa with SMTP id q6-20020a17090311c600b001d4ac32e9aamr4738plh.12.1704387247515; Thu, 04 Jan 2024 08:54:07 -0800 (PST) Date: Thu, 4 Jan 2024 08:54:05 -0800 In-Reply-To: Precedence: bulk X-Mailing-List: kvm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: Message-ID: Subject: Re: [Bug 218339] New: kernel goes unresponsive if single-stepping over an instruction which writes to an address for which a hardware read/write watchpoint has been set From: Sean Christopherson To: bugzilla-daemon@kernel.org Cc: kvm@vger.kernel.org Content-Type: text/plain; charset="us-ascii" On Thu, Jan 04, 2024, bugzilla-daemon@kernel.org wrote: > https://bugzilla.kernel.org/show_bug.cgi?id=218339 > > Bug ID: 218339 > Summary: kernel goes unresponsive if single-stepping over an > instruction which writes to an address for which a > hardware read/write watchpoint has been set > Product: Virtualization > Version: unspecified > Hardware: All > OS: Linux > Status: NEW > Severity: normal > Priority: P3 > Component: kvm > Assignee: virtualization_kvm@kernel-bugs.osdl.org > Reporter: anthony.louis.eden@gmail.com > Regression: No > > In a debian QEMU/KVM virtual machine, run `gdb` on any executable (e.g. > `/usr/bin/ls`). Run the program by typing `starti`. Proceed to `_dl_start` > (i.e. `break _dl_start`, `continue`). When you get there disassemble the > function (i.e. `disas`). Find an instruction that's going to be executed for > which you can compute the address in memory it will write to. Run the program > to that instruction (i.e. `break *0xINSN`, `continue`). When you're on that > instruction, set a read/write watchpoint on the address it will write to, then > single-step (i.e. `stepi`) and the kernel will go unresponsive. By "the kernel", I assume you mean the guest kernel? > >(gdb) x/1i $pc > >=> 0x7ffff7fe6510 <_dl_start+48>: mov %rdi,-0x88(%rbp) > >(gdb) x/1wx $rbp-0x88 > >0x7fffffffec28: 0x00000000 > >(gdb) awatch *0x7fffffffec28 > >Hardware access (read/write) watchpoint 2: *0x7fffffffec28 > >(gdb) stepi > > > Looking with `journalctl`, I cannot find anything printed to dmesg. > > The kernel of the guest inside the virtual machine is Debian 6.1.0-15-amd64. > The kernel of the host running qemu-system-x86_64 is Archlinux 6.6.7-arch1-1. > gdb is version 13.1. Is this a regression or something that has always been broken? I.e. did this work on previous host kernels?