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:   Tue, 17 May 2022 14:58:38 +1200
From:   Kai Huang <kai.huang@...el.com>
To:     Sathyanarayanan Kuppuswamy 
        <sathyanarayanan.kuppuswamy@...ux.intel.com>,
        Isaku Yamahata <isaku.yamahata@...il.com>
Cc:     Thomas Gleixner <tglx@...utronix.de>,
        Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
        Dave Hansen <dave.hansen@...ux.intel.com>, x86@...nel.org,
        "H . Peter Anvin" <hpa@...or.com>,
        "Kirill A . Shutemov" <kirill.shutemov@...ux.intel.com>,
        Tony Luck <tony.luck@...el.com>,
        Andi Kleen <ak@...ux.intel.com>,
        Wander Lairson Costa <wander@...hat.com>,
        marcelo.cerri@...onical.com, tim.gardner@...onical.com,
        khalid.elmously@...onical.com, philip.cox@...onical.com,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH v6 5/5] x86/tdx: Add Quote generation support

On Fri, 2022-05-13 at 12:29 -0700, Sathyanarayanan Kuppuswamy wrote:
> > 
> > 
> > > +
> > > +	/* Wait for attestation completion */
> > > +	ret = wait_for_completion_interruptible(&entry->compl);
> > > +	if (ret < 0) {
> > > +		/*
> > > +		 * For premature termination, since VMM still owns the
> > > +		 * shared buffer, mark the request invalid to let
> > > +		 * quote_callback_handler() handle the memory cleanup
> > > +		 * function.
> > > +		 */
> > > +		invalidate_quote_request(entry);
> > 
> > Interrupt can arrive after signal interrupt.  So invalidate_quote_request()
> > should check if the request is already processed, and return 0 or -EINTR.
> > Probably check the state always and del_list under single lock/unlock pair.
> 
> Agree. But I think we should return -EINTR for the interrupted case
> irrespective of the processed status (so no return 0).
> 
> I will hold the lock and handle the cleanup for the processed
> status.

Even if we check the buffer status in invalidate_quote_request(), there's no
guarantee the VMM won't change the buffer status _after_ we do the check, so
looks such check isn't necessary.

-- 
Thanks,
-Kai


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ