sgx_set_attribute(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… sgx_set_attribute(9) πŸ’…

okay bestie, this is a Kernel API Manual page for sgx_set_attribute(9) β€” and yes, we're getting into kernel attribute business, but it's actually kinda straightforward. 🫢


✨ NAME ✨

sgx_set_attribute β€” Update allowed attributes given file descriptor

πŸ“œ SYNOPSIS πŸ“œ

       int sgx_set_attribute (unsigned long *allowed_attributes , unsigned int
       attribute_fd );

🧾 ARGUMENTS 🧾

  • allowed_attributes β€” Pointer to allowed enclave attributes
  • attribute_fd β€” File descriptor for specific attribute

πŸ’– DESCRIPTION πŸ’–

So basically: it appends the enclave attribute indicated by the file descriptor to the allowed attributes. πŸ’«

Currently, only SGX_ATTR_PROVISIONKEY β€” indicated by /dev/sgx_provision β€” is supported. That's the whole supported set rn, no cap. πŸŽ€

πŸ” RETURN πŸ”

  • -0: β€” SGX_ATTR_PROVISIONKEY is appended to allowed_attributes
  • -EINVAL: β€” Invalid, or not supported file descriptor

πŸ‘€ SEE ALSO πŸ‘€


πŸ’Œ signed, sealed, delivered: source/version ./arch/x86/kernel/cpu/sgx, dated October 2026, page sgx_set_attribute(9). periodt. πŸ’…βœ¨

πŸ“¦ where this page comes from