All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Chang S. Bae" <chang.seok.bae@intel.com>
To: <linux-kernel@vger.kernel.org>, <linux-kselftest@vger.kernel.org>
Cc: <x86@kernel.org>, <tglx@linutronix.de>, <mingo@redhat.com>,
	<bp@alien8.de>, <dave.hansen@linux.intel.com>, <shuah@kernel.org>
Subject: Re: [PATCH 3/6] selftests/x86/xstate: Validate XSTATE_BV in ptrace test
Date: Fri, 20 Nov 2026 15:05:40 -0800	[thread overview]
Message-ID: <fd5b2bb9-30c8-435d-b046-5be706e43292@intel.com> (raw)
In-Reply-To: <20261110031603.698635-4-chang.seok.bae@intel.com>

On 11/9/2026 7:16 PM, Chang S. Bae wrote:
>   
> +	if ((xstate.mask & get_xstatebv(xbuf)) == (xstate.mask & get_xstatebv(expected))) {
> +		printf("#\tok\tXSTATE_BV\n");
> +	} else {
> +		printf("#\tnot ok\tXSTATE_BV\n");
> +		failed++;
> +	}

This check looks excessive because of the XSAVE behavior.

If the kernel ever falls back to XSAVE instead of its variants like 
XSAVES, XSTATE_BV may be set even if a component stays in init-state. 
Whether the bit is cleared or not depends on the init-tracking 
implementation.

So, the most this check can do is ensuring XSTATE_BV is set when the 
state actually carries non-init values. Let me fix on my next posting.

Thanks,
Chang

  reply	other threads:[~2026-11-20 23:05 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-10  3:15 [PATCH 0/6] selftests/x86/xstate: more test cases for coredump and ptrace Chang S. Bae
2026-11-10  3:15 ` [PATCH 1/6] selftests/x86/xstate: Track testing status by kselftest API Chang S. Bae
2026-11-10  3:15 ` [PATCH 2/6] selftests/x86/xstate: Pre-allocate ptracee XSAVE buffer Chang S. Bae
2026-11-10  3:16 ` [PATCH 3/6] selftests/x86/xstate: Validate XSTATE_BV in ptrace test Chang S. Bae
2026-11-20 23:05   ` Chang S. Bae [this message]
2026-11-10  3:16 ` [PATCH 4/6] selftests/x86/xstate: Validate state reset " Chang S. Bae
2026-11-10  3:16 ` [PATCH 5/6] selftests/x86/xstate: Add coredump test Chang S. Bae
2026-11-10  3:16 ` [PATCH 6/6] selftests/mm: Add coredump test for x86 Chang S. Bae

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=fd5b2bb9-30c8-435d-b046-5be706e43292@intel.com \
    --to=chang.seok.bae@intel.com \
    --cc=bp@alien8.de \
    --cc=dave.hansen@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=shuah@kernel.org \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.