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:	Fri, 15 May 2015 17:16:26 +0100
From:	Alex Bennée <alex.bennee@...aro.org>
To:	Mark Rutland <mark.rutland@....com>
Cc:	"kvm\@vger.kernel.org" <kvm@...r.kernel.org>,
	"linux-arm-kernel\@lists.infradead.org" 
	<linux-arm-kernel@...ts.infradead.org>,
	"kvmarm\@lists.cs.columbia.edu" <kvmarm@...ts.cs.columbia.edu>,
	"christoffer.dall\@linaro.org" <christoffer.dall@...aro.org>,
	Marc Zyngier <Marc.Zyngier@....com>,
	"peter.maydell\@linaro.org" <peter.maydell@...aro.org>,
	"agraf\@suse.de" <agraf@...e.de>,
	"drjones\@redhat.com" <drjones@...hat.com>,
	"pbonzini\@redhat.com" <pbonzini@...hat.com>,
	"zhichao.huang\@linaro.org" <zhichao.huang@...aro.org>,
	Lorenzo Pieralisi <Lorenzo.Pieralisi@....com>,
	Russell King <linux@....linux.org.uk>,
	Jonathan Corbet <corbet@....net>,
	Gleb Natapov <gleb@...nel.org>,
	"jan.kiszka\@siemens.com" <jan.kiszka@...mens.com>,
	"open list\:DOCUMENTATION" <linux-doc@...r.kernel.org>,
	Will Deacon <Will.Deacon@....com>,
	open list <linux-kernel@...r.kernel.org>,
	"open list\:ABI\/API" <linux-api@...r.kernel.org>,
	"dahi\@linux.vnet.ibm.com" <dahi@...ux.vnet.ibm.com>,
	Peter Zijlstra <peterz@...radead.org>,
	Catalin Marinas <Catalin.Marinas@....com>,
	"r65777\@freescale.com" <r65777@...escale.com>,
	"bp\@suse.de" <bp@...e.de>, Ingo Molnar <mingo@...nel.org>
Subject: Re: [PATCH v4 10/12] KVM: arm64: guest debug, HW assisted debug support


Mark Rutland <mark.rutland@....com> writes:

> Hi Alex,
>
> On Fri, May 15, 2015 at 03:27:13PM +0100, Alex Bennée wrote:
>> This adds support for userspace to control the HW debug registers for
>> guest debug. In the debug ioctl we copy the IMPDEF defined number of
>> registers into a new register set called host_debug_state. There is now
>> a new vcpu parameter called debug_ptr which selects which register set
>> is to copied into the real registers when world switch occurs.
>> 
>> I've moved some helper functions into the hw_breakpoint.h header for
>> re-use.
>> 
>> As with single step we need to tweak the guest registers to enable the
>> exceptions so we need to save and restore those bits.
>> 
>> Two new capabilities have been added to the KVM_EXTENSION ioctl to allow
>> userspace to query the number of hardware break and watch points
>> available on the host hardware.
>
> There's the unfortunate possibility that these could vary across cores
> in a big.LITTLE system (though we haven't seen that thus far). The
> kernel sanity checks should currently explode if such a case is
> encountered, but I don't know what we'd do were that to happen.

I suspect we would have to disable HW assisted breakpoints or return the
lowest common denominator if we can tell which cores we shall every be
scheduled on.

>
> This gets more fun when you consider the context-aware breakpoints are
> the highest numbered. So the set of (context-aware) breakpoints might
> not intersect across all CPUs.

I didn't see a reference to that in the ARM ARM. It seemed to imply any
breakpoint could be context aware is .BT was appropriately set and
linked to the VR.  

As it happens the gdb stub interface in QEMU is fairly limited so while
I expose the full debug registers I don't think there is currently a way
to expose any of the fancy linking/context stuff to the userspace
debugger. However I did make the ABI pass full raw values in so this
could become a possibility later without having to expand the ABI.


> I'm not sure what the best thing to do is w.r.t. exposing that to
> userspace.
>
> Thanks,
> Mark.

-- 
Alex Bennée
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ