Re: [PATCH v13 09/19] x86: Secure Launch kernel early boot stub

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

 



On 4/15/25 3:15 PM, Sean Christopherson wrote:
On Tue, Apr 15, 2025, Andrew Cooper wrote:
On 11/04/2025 10:40 pm, Sean Christopherson wrote:
On Thu, Apr 10, 2025, Ross Philipson wrote:
+	 * instruction can return for a number of reasons. Test to see if it returned
+	 * because the monitor was written to.
+	 */
+	monitor
+
+1:
+	mfence
+	mwait
+	movl	(%eax), %edx
Why load the value into EDX?  At a glance, the value is never consumed.

+	testl	%edx, %edx
+	jz	1b
This usage of MONITOR/MWAIT is flawed.  The monitor needs to be re-armed in each
loop, otherwise mwait will be a glorified nop.

More importantly, the exit condition needs to be checked before monitor,

after monitor and before mwait.

Gah, yeah, I mean to say "before mwait".

Thanks Sean and Andy, I will fix this.

Ross




[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux