s390/uvdevice: Report additional-data length for attestation
authorSteffen Eiden <seiden@linux.ibm.com>
Mon, 6 Nov 2023 12:49:22 +0000 (13:49 +0100)
committerJanosch Frank <frankja@linux.ibm.com>
Thu, 23 Nov 2023 11:15:55 +0000 (12:15 +0100)
commit26fb87ffa9d90fb16ca1b2b262f38d93bdcee934
treeaa436029e205f8fc28b1b1bc4789965419fe2f02
parent98b1cc82c4affc16f5598d4fa14b1858671b2263
s390/uvdevice: Report additional-data length for attestation

Additional data length in the attestation request is an in/out variable.
Software provides the capacity of the buffer. Upon successful request,
firmware reports the actual bytes written to the additional data in that
field. This information is lost, as the length field was not copied back
to userspace before. Attestation might fail, if user space did not
specify the exact amount of needed bytes required, as this length is
part of the attestation measurement.

Signed-off-by: Steffen Eiden <seiden@linux.ibm.com>
Reviewed-by: Claudio Imbrenda <imbrenda@linux.ibm.com>
Reviewed-by: Janosch Frank <frankja@linux.ibm.com>
Link: https://lore.kernel.org/r/20231106124922.3032370-1-seiden@linux.ibm.com
Message-Id: <20231106124922.3032370-1-seiden@linux.ibm.com>
Signed-off-by: Janosch Frank <frankja@linux.ibm.com>
drivers/s390/char/uvdevice.c