linux_dsm_epyc7002/drivers/char
Jarkko Sakkinen e13cd21ffd tpm: Wrap the buffer from the caller to tpm_buf in tpm_send()
tpm_send() does not give anymore the result back to the caller. This
would require another memcpy(), which kind of tells that the whole
approach is somewhat broken. Instead, as Mimi suggested, this commit
just wraps the data to the tpm_buf, and thus the result will not go to
the garbage.

Obviously this assumes from the caller that it passes large enough
buffer, which makes the whole API somewhat broken because it could be
different size than @buflen but since trusted keys is the only module
using this API right now I think that this fix is sufficient for the
moment.

In the near future the plan is to replace the parameters with a tpm_buf
created by the caller.

Reported-by: Mimi Zohar <zohar@linux.ibm.com>
Suggested-by: Mimi Zohar <zohar@linux.ibm.com>
Cc: stable@vger.kernel.org
Fixes: 412eb58558 ("use tpm_buf in tpm_transmit_cmd() as the IO parameter")
Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Reviewed-by: Jerry Snitselaar <jsnitsel@redhat.com>
2019-09-25 02:43:57 +03:00
..
agp ia64: remove support for machvecs 2019-08-16 14:32:26 -07:00
hw_random hwrng: core - don't wait on add_early_randomness() 2019-09-20 23:05:33 +10:00
ipmi ipmi_si_intf: Fix race in timer shutdown handling 2019-09-12 16:03:18 -05:00
mwave
pcmcia
tpm tpm: Wrap the buffer from the caller to tpm_buf in tpm_send() 2019-09-25 02:43:57 +03:00
xilinx_hwicap
xillybus PCI: Move ASPM declarations to linux/pci.h 2019-08-28 08:28:39 -05:00
adi.c
apm-emulation.c
applicom.c
applicom.h
bsr.c
ds1620.c
dsp56k.c
dtlk.c
efirtc.c
hangcheck-timer.c
hpet.c hpet: Fix division by zero in hpet_time_div() 2019-07-25 14:39:51 +02:00
Kconfig ia64 for v5.4 - big change here is removal of support for SGI Altix 2019-09-16 15:32:01 -07:00
lp.c
Makefile char: remove the SGI tiocx/mbcs driver 2019-08-16 11:33:56 -07:00
mem.c /dev/mem: Bail out upon SIGKILL. 2019-09-04 13:31:28 +02:00
misc.c
mspec.c char/mspec: remove SGI SN2 support 2019-08-16 11:33:56 -07:00
nsc_gpio.c
nvram.c
nwbutton.c
nwbutton.h
nwflash.c
pc8736x_gpio.c
powernv-op-panel.c
ppdev.c char: ppdev: Fix a possible null-pointer dereference in pp_release() 2019-07-25 13:21:15 +02:00
ps3flash.c
random.c Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 2019-09-18 12:11:14 -07:00
raw.c
rtc.c
scx200_gpio.c
sonypi.c
tb0219.c
tlclk.c
toshiba.c toshiba: Add correct printk log level while emitting error log 2019-09-04 13:42:43 +02:00
ttyprintk.c
uv_mmtimer.c
virtio_console.c