The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Jarkko Sakkinen <jarkko@kernel.org>
To: Thorsten Blum <thorsten.blum@linux.dev>
Cc: Dave Hansen <dave.hansen@linux.intel.com>,
	Thomas Gleixner <tglx@kernel.org>, Ingo Molnar <mingo@redhat.com>,
	Borislav Petkov <bp@alien8.de>, "H. Peter Anvin" <hpa@zytor.com>,
	x86@kernel.org, linux-sgx@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/3] x86/sgx: Remove unused size and count definitions
Date: Sat, 11 Jul 2026 21:22:23 +0300	[thread overview]
Message-ID: <alKJ37nRNvWw4LKS@kernel.org> (raw)
In-Reply-To: <20260711100053.739588-7-thorsten.blum@linux.dev>

On Sat, Jul 11, 2026 at 12:00:56PM +0200, Thorsten Blum wrote:
> The definitions were added with commit 70d3b8ddcd20 ("x86/sgx: Add SGX
> architectural data structures"), but have never been used. The SIGSTRUCT
> reserved field sizes are also redundant because the structure uses
> literal sizes instead. Remove them.
> 
> Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
> ---
>  arch/x86/include/asm/sgx.h | 9 ---------
>  1 file changed, 9 deletions(-)
> 
> diff --git a/arch/x86/include/asm/sgx.h b/arch/x86/include/asm/sgx.h
> index fe106c55a593..af5cd6ce9010 100644
> --- a/arch/x86/include/asm/sgx.h
> +++ b/arch/x86/include/asm/sgx.h
> @@ -108,9 +108,6 @@ enum sgx_miscselect {
>  
>  #define SGX_MISC_RESERVED_MASK	GENMASK_ULL(63, 1)
>  
> -#define SGX_SSA_GPRS_SIZE		184
> -#define SGX_SSA_MISC_EXINFO_SIZE	16
> -
>  /**
>   * enum sgx_attribute - the attributes field in &struct sgx_secs
>   * @SGX_ATTR_INIT:		Enclave can be entered (is initialized).
> @@ -227,7 +224,6 @@ enum sgx_page_type {
>  	SGX_PAGE_TYPE_TRIM,
>  };
>  
> -#define SGX_NR_PAGE_TYPES	5
>  #define SGX_PAGE_TYPE_MASK	GENMASK(7, 0)
>  
>  /**
> @@ -288,11 +284,6 @@ struct sgx_pcmd {
>  	u8  mac[16];
>  } __packed __aligned(128);
>  
> -#define SGX_SIGSTRUCT_RESERVED1_SIZE 84
> -#define SGX_SIGSTRUCT_RESERVED2_SIZE 20
> -#define SGX_SIGSTRUCT_RESERVED3_SIZE 32
> -#define SGX_SIGSTRUCT_RESERVED4_SIZE 12
> -
>  /**
>   * struct sgx_sigstruct_header -  defines author of the enclave
>   * @header1:		constant byte string


Reviewed-by: Jarkko Sakkinen <jarkko@kernel.org>

BR, Jarkko

  reply	other threads:[~2026-07-11 18:22 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-11 10:00 [PATCH 0/3] x86/sgx: Remove unused definitions and reuse launch token size Thorsten Blum
2026-07-11 10:00 ` [PATCH 1/3] x86/sgx: Remove unused TCS definitions Thorsten Blum
2026-07-11 18:22   ` Jarkko Sakkinen
2026-07-11 10:00 ` [PATCH 2/3] x86/sgx: Remove unused size and count definitions Thorsten Blum
2026-07-11 18:22   ` Jarkko Sakkinen [this message]
2026-07-11 10:00 ` [PATCH 3/3] x86/sgx: Use SGX_LAUNCH_TOKEN_SIZE in __sgx_virt_einit() Thorsten Blum
2026-07-11 18:23   ` Jarkko Sakkinen

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=alKJ37nRNvWw4LKS@kernel.org \
    --to=jarkko@kernel.org \
    --cc=bp@alien8.de \
    --cc=dave.hansen@linux.intel.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sgx@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=tglx@kernel.org \
    --cc=thorsten.blum@linux.dev \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox