[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [RFC 6/6] capabilities: convert attach debugger into a capability


  • To: "Daniel P. Smith" <dpsmith@xxxxxxxxxxxxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Wed, 9 Aug 2023 17:37:47 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=rtG9aa4De4cidOdl0bUwW5wESMhb3t/jAM6e15+TQgs=; b=i3pT/Tf8EWBYwNrTdJjZ4Ea7wqdfQhD7QtLrCWy2cBf5Ba6IS6iRPnemjF68r+QSym/KZzuKcpUe9173b0xOKpwN6xS/IhBYZZzdNPf1PUzFlBXxfXoYubqCyTzcm+4mF5x4AFFZKwy+UBm/9WSv32XxxvblRHYUPPQ0a1mFwcHgy71l4in3dnQzCtwwnt0bpMSxhAi3u7QPLlBwkhHbyhu/T9qG9dTWUk7G0LGFz6SEOKFxDOARyG9BiSHgNTW636E61BS1z1Vgj3DrDuvOveZIkonXtd1/Sipm8HtAMnpaqzT9d3HPPAKi8Rc3f0J803/rW9KCJ7qTmmx9EuYH/A==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Q3bNOkZ6nvEq1Q9xsJ+hrMV+tGUlsXt9CWeYh/ozE/i1qIiZXt1NiDbYx2EcTSVWDnJgku5MVO2EOlQCG9dSj8tqcputn9HgV4MeuwamBy7V+h8tBqEZ2Nv0LfsayD907gcQwyclY1kSbvDFrU+jCp6h3LttLT+Maxw6jh4geHJ0g2EmRrCkvrAaEkWfusxvnNTAexVxfyipkIpmyzbCdNoTGZbPiGjIkmogFi3JZp9jLx685ypaD7A0pHQ8fyHmQjb5N6BQ8nDwlvvvewnS2b63DfyyzsR0s5lxZeBcDlQFDbRHLTnY2BElXqvoby1uEETUvmfDsOcQPkImyOvGBg==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Jun Nakajima <jun.nakajima@xxxxxxxxx>, Kevin Tian <kevin.tian@xxxxxxxxx>, Wei Liu <wl@xxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Wed, 09 Aug 2023 15:37:57 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 01.08.2023 22:20, Daniel P. Smith wrote:
> --- a/xen/arch/x86/hvm/svm/svm.c
> +++ b/xen/arch/x86/hvm/svm/svm.c
> @@ -999,7 +999,7 @@ static void noreturn cf_check svm_do_resume(void)
>  {
>      struct vcpu *v = current;
>      struct vmcb_struct *vmcb = v->arch.hvm.svm.vmcb;
> -    bool debug_state = (v->domain->debugger_attached ||
> +    bool debug_state = (domain_has_cap(v->domain, CAP_DEBUGGER_ATTACH) ||
>                          v->domain->arch.monitor.software_breakpoint_enabled 
> ||
>                          v->domain->arch.monitor.debug_exception_enabled);

Aren't you mixing capability and state here? d->debugger_attached set
means a debugger _is_ attached. The capability only says whether a
debugger may attach.

Jan



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.