Received: by 2002:ab2:6309:0:b0:1fb:d597:ff75 with SMTP id s9csp1493048lqt; Fri, 7 Jun 2024 23:51:41 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXAsc/yMiO9sj+fIXPo837IFHH+JlLmrUeaTgfVBaCpKMqHzo3mHBnnZIpHtkcKf8yF2LNPZsFYkD6Mk3KrajLnGyRKhnSdS90eJv0lNg== X-Google-Smtp-Source: AGHT+IHuFzaOQme2T8JJmOrOLdWQWtIf47RZkiNyo6ZyRYNlYeH4kfHaRJGw2kdxVhStjArwuMSH X-Received: by 2002:a05:6a00:10c3:b0:703:fe0a:c230 with SMTP id d2e1a72fcca58-7040c72e7e4mr5062265b3a.27.1717829501425; Fri, 07 Jun 2024 23:51:41 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717829501; cv=pass; d=google.com; s=arc-20160816; b=ofvUxZLfuP8QN1iMUJkQyc5I5Iy/KWH2uLhKtLs5OtOXEuUUW+XnLMwQi1elmTeY67 Xx1XK76kpB5qH43FX7CRnjrU4XDahcV1xcpnAyraZQ6SCWMtLLVaISlN7VPkzqG6hVVe UI12U2fcXcNfF2TbNb5zOyJj2AzZD6Ttm+h1oaqDLzrx62GBpszy9DZPTcgJ5VFrLXxr dgl/oxijM5u/gtmCWbZxtDTlQa8O/95qL34o7NFkVv5LBK7k+JMbO/MzLT/QgNOTDFsX DKmPJl8TCniwCJxcii9X27MFvzLoWiI9z8lYshApEuBh5fe84M+lcRw7gbjvIXr14aKq T7sw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :user-agent:content-transfer-encoding:organization:references :in-reply-to:date:cc:to:reply-to:from:subject:message-id :dkim-signature; bh=h3nmL7t5Wz+TTNjk2K/5BGwjV18TbLQal4X7ok/8ei8=; fh=xYQJkM6mESDNLZ2WxJE1tHM5ApYsqUfV3aYxuHVScds=; b=pMmuXvwK+M3A8isqUO5miVDIIXPixcl0pnL11fPgeSX/P/zhnHGOSSlrHYjyW44C+I EE5xJrEvlmrppJwPSmI3ShEjkr42ZmqA1k5rotzD0zJYLRvfW0gQmZPekSNSEE+fBBaY mY7UP/RRO3T3/5cAi/8OhVh23SGxUhmnco/4eNVKxtd847KP7zoBhZDXJuJhIL6KgctC zefq2ZD1iicL9yY68Tc1UhGUmOcKzwyCppVtCewpwkRPX+lppSBgfX3mIy1ZtFj9iS1c aTAgoNxl+GDq4tcjCdrLb0TuMGanKmC4o4A+bvUFDQBZ4xezX0anYoN36CRtz3N9nF1x pImw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=dwoGk2k2; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-206893-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-206893-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id d2e1a72fcca58-70421e2df83si980052b3a.45.2024.06.07.23.51.40 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 07 Jun 2024 23:51:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-206893-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=dwoGk2k2; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-206893-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-206893-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id CE1A6B243C8 for ; Sat, 8 Jun 2024 03:45:03 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 111EBFC0E; Sat, 8 Jun 2024 03:44:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="dwoGk2k2" Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.13]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 57E0420EB; Sat, 8 Jun 2024 03:44:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.13 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717818293; cv=none; b=JhzLkDFftDk2kR9voOV3iWrDA7ZV/bqilrqrKXUxdvaoX+HGg3DwAn9E/GsXWOSCCzO2MfES8BZe7sUj+rDtPv7FBe2mgjPnbwzrvY8o3wMpE7tdZO5EYDY16t/Luz/RvnRutOKbv4R7U1c4ZfL7kEneU+Xdep9F0f2Cjirmo4c= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717818293; c=relaxed/simple; bh=h3nmL7t5Wz+TTNjk2K/5BGwjV18TbLQal4X7ok/8ei8=; h=Message-ID:Subject:From:To:Cc:Date:In-Reply-To:References: Content-Type:MIME-Version; b=OknhalJ+cmSeqS/6Sh80fJbzBtyCKVpJ4lUqxXEbHlEfK37QMTemI65SkutpX2PpbPgADtR/9PyFnmm/+09ELraaVDrSGUYl2BsV01rptZhTyZg3F+8dtYy2NPGhfoPsbD7pX4viEB94rC4ipkikqxN7zeGN8AQnxZlzZSyDTIE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=dwoGk2k2; arc=none smtp.client-ip=192.198.163.13 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1717818290; x=1749354290; h=message-id:subject:from:reply-to:to:cc:date:in-reply-to: references:content-transfer-encoding:mime-version; bh=h3nmL7t5Wz+TTNjk2K/5BGwjV18TbLQal4X7ok/8ei8=; b=dwoGk2k2m5kHZXTX7Vh1rF37jbyPJg1Z4YODAAooXMG0/oL+moEpowUz Lruj6Wkp/zlHoIi6J2jzyporO9ShGpMrhBDxCn/mwvkrVZ3no/yN/zrw2 lMSWid+pfjbAJ4PM1c8wHYZt4YiyKSOK+SGcc2FnSIjrJfhMGOTbK7ugP y0eHZnv9L5vSB1lqeigntdoIGl5jEd/PJ1NauSX9e1MgDNrtSwfb///Zu lI5AOL6gjFsd9Gfs13S2Bt9N0eVxHboCEZDxpkDN9QeaqjcW1MU8OawMd 8T1P6dhqa2tDu/98mMpp0bdVBuGv0bUMNFkeJBvWLZDehKJ3cedet7cXK A==; X-CSE-ConnectionGUID: M0Fw0+i4SPGv/kqEb6+urw== X-CSE-MsgGUID: QfmUnxdNQBSWm7PlYGpykQ== X-IronPort-AV: E=McAfee;i="6600,9927,11096"; a="17483362" X-IronPort-AV: E=Sophos;i="6.08,222,1712646000"; d="scan'208";a="17483362" Received: from orviesa009.jf.intel.com ([10.64.159.149]) by fmvoesa107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Jun 2024 20:44:49 -0700 X-CSE-ConnectionGUID: AM9XMo+QR3yQlzn2cne3gA== X-CSE-MsgGUID: DEJS3iTrTqOidWVvvSpE4A== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,222,1712646000"; d="scan'208";a="38600234" Received: from lbattagl-mobl1.amr.corp.intel.com ([10.209.70.26]) by orviesa009-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Jun 2024 20:44:48 -0700 Message-ID: Subject: Re: [PATCH V3 1/3] platform/x86/intel/sdsi: Add ioctl SPDM transport From: "David E. Box" Reply-To: david.e.box@linux.intel.com To: Ilpo =?ISO-8859-1?Q?J=E4rvinen?= Cc: linux-doc@vger.kernel.org, Hans de Goede , LKML , platform-driver-x86@vger.kernel.org Date: Fri, 07 Jun 2024 20:44:47 -0700 In-Reply-To: References: <20240606011617.557264-1-david.e.box@linux.intel.com> Organization: David E. Box Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.44.4-0ubuntu2 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 On Fri, 2024-06-07 at 16:14 +0300, Ilpo J=C3=A4rvinen wrote: > On Wed, 5 Jun 2024, David E. Box wrote: >=20 > > Intel On Demand adds attestation and firmware measurement retrieval > > services through use of the protocols defined the Security Protocols an= d > > Data Measurement (SPDM) specification. SPDM messages exchanges are used= to > > authenticate On Demand hardware and to retrieve signed measurements of = the > > NVRAM state used to track feature provisioning and the NVRAM state used= for > > metering services. These allow software to verify the authenticity of t= he > > On Demand hardware as well as the integrity of the reported silicon > > configuration. > >=20 > > Add an ioctl interface for sending SPDM messages through the On Demand > > mailbox. Provides commands to get a list of SPDM enabled devices, get t= he > > message size limits for SPDM Requesters and Responders, and perform an = SPDM > > message exchange. > >=20 > > Signed-off-by: David E. Box > > Link: > > https://www.dmtf.org/sites/default/files/standards/documents/DSP0274_1.= 0.1.pdf > > =C2=A0[1] > > --- >=20 > > +static int sdsi_spdm_do_command(struct sdsi_priv *priv, > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0struct sdsi_spdm_command __user *= argp) > > +{ > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0u32 req_size, rsp_size; > > + > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0if (get_user(req_size, &argp= ->size)) > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0return -EFAULT; > > + > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0if (req_size < 4 || req_size= > sizeof(struct sdsi_spdm_message)) >=20 > Hi David, >=20 > Is that 4 actually SPDM_HEADER_SIZE? >=20 > If my guess is correct, no need to send an updated version, I'll just fix= =20 > it while applying. It is SPDM_HEADER_SIZE but I already fixed it in V4 since I had to address = an LKP report. David >=20 >=20