public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: "David E. Box" <david.e.box@linux.intel.com>
Cc: hdegoede@redhat.com, andriy.shevchenko@linux.intel.com,
	srinivas.pandruvada@intel.com, mgross@linux.intel.com,
	linux-kernel@vger.kernel.org,
	platform-driver-x86@vger.kernel.org,
	Mark Gross <markgross@kernel.org>
Subject: Re: [PATCH V5 1/3] platform/x86: Add Intel Software Defined Silicon driver
Date: Fri, 4 Feb 2022 07:57:02 +0100	[thread overview]
Message-ID: <YfzOPkZ+0XRxkbq/@kroah.com> (raw)
In-Reply-To: <20220204053046.2475671-2-david.e.box@linux.intel.com>

On Thu, Feb 03, 2022 at 09:30:44PM -0800, David E. Box wrote:
> Intel Software Defined Silicon (SDSi) is a post manufacturing mechanism for
> activating additional silicon features. Features are enabled through a
> license activation process.  The SDSi driver provides a per socket, sysfs
> attribute interface for applications to perform 3 main provisioning
> functions:
> 
> 1. Provision an Authentication Key Certificate (AKC), a key written to
>    internal NVRAM that is used to authenticate a capability specific
>    activation payload.
> 
> 2. Provision a Capability Activation Payload (CAP), a token authenticated
>    using the AKC and applied to the CPU configuration to activate a new
>    feature.
> 
> 3. Read the SDSi State Certificate, containing the CPU configuration
>    state.
> 
> The operations perform function specific mailbox commands that forward the
> requests to SDSi hardware to perform authentication of the payloads and
> enable the silicon configuration (to be made available after power
> cycling).
> 
> The SDSi device itself is enumerated as an auxiliary device from the
> intel_vsec driver and as such has a build dependency on CONFIG_INTEL_VSEC.
> 
> Link: https://github.com/intel/intel-sdsi
> Signed-off-by: David E. Box <david.e.box@linux.intel.com>
> Reviewed-by: Mark Gross <markgross@kernel.org>
> ---
> V5
>   - Update kernel version to 5.18 in API doc and copyrights to 2022.
>   - Remove unneeded prototypes.
>   - In binary attribute handlers where ret is only used for errors,
>     replace,
>               return (ret < 0) ? ret : size;
>     with,
>               return ret ?: size;

That's horrible, please no.

Will you remember what this does in 5 years when you have to look at it
again?  Spell it out, this saves nothing in runtime or code size:
	if (ret < 0)
		return ret;
	return size;

There, obvious, simple, and can be read by anyone.

thanks,

greg k-h

  reply	other threads:[~2022-02-04  6:57 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-04  5:30 [PATCH V5 0/3] Intel Software Defined Silicon David E. Box
2022-02-04  5:30 ` [PATCH V5 1/3] platform/x86: Add Intel Software Defined Silicon driver David E. Box
2022-02-04  6:57   ` Greg KH [this message]
2022-02-04 10:14   ` Joe Perches
2022-02-04 13:23     ` David E. Box
2022-02-04 13:43       ` Greg KH
2022-02-04 14:01       ` Joe Perches
2022-02-04 17:01         ` David E. Box
2022-02-04  5:30 ` [PATCH V5 2/3] tools arch x86: Add Intel SDSi provisiong tool David E. Box
2022-02-04  5:30 ` [PATCH V5 3/3] selftests: sdsi: test sysfs setup David E. Box

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=YfzOPkZ+0XRxkbq/@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=david.e.box@linux.intel.com \
    --cc=hdegoede@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=markgross@kernel.org \
    --cc=mgross@linux.intel.com \
    --cc=platform-driver-x86@vger.kernel.org \
    --cc=srinivas.pandruvada@intel.com \
    /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