mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v3 0/4] platform/x86/amd/pmf: Fix policy binary handling
@ 2024-03-04 20:50 Armin Wolf
  2024-03-04 20:50 ` [PATCH v3 1/4] platform/x86/amd/pmf: Fix return value of amd_pmf_start_policy_engine() Armin Wolf
                   ` (5 more replies)
  0 siblings, 6 replies; 8+ messages in thread
From: Armin Wolf @ 2024-03-04 20:50 UTC (permalink / raw)
  To: Shyam-sundar.S-k
  Cc: hdegoede, ilpo.jarvinen, platform-driver-x86, linux-kernel

This patch series fixes various issues inside the policy binary
handling code.
The first patch makes sure that a valid error code is returned upon
failing to start the policy engine, while the second patch drops the
usage of readl() on non-io memory.
The last two patches fix a possible out-of-bounds memory access when
parsing the policy binary header.

All patches are compile-tested only.

Changes since v2:
- add patches 1 and 3

Changes since v1:
- get the full dword instead of only 8 bits when reading the header
- check if the policy buffer also has enough room for storing the length

Armin Wolf (4):
  platform/x86/amd/pmf: Fix return value of
    amd_pmf_start_policy_engine()
  platform/x86/amd/pmf: Do not use readl() for policy buffer access
  platform/x86/amd/pmf: Use struct for cookie header
  platform/x86/amd/pmf: Fix possible out-of-bound memory accesses

 drivers/platform/x86/amd/pmf/pmf.h    |  6 +++++-
 drivers/platform/x86/amd/pmf/tee-if.c | 21 +++++++++++++--------
 2 files changed, 18 insertions(+), 9 deletions(-)

--
2.39.2


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2024-03-06 10:50 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-04 20:50 [PATCH v3 0/4] platform/x86/amd/pmf: Fix policy binary handling Armin Wolf
2024-03-04 20:50 ` [PATCH v3 1/4] platform/x86/amd/pmf: Fix return value of amd_pmf_start_policy_engine() Armin Wolf
2024-03-04 20:50 ` [PATCH v3 2/4] platform/x86/amd/pmf: Do not use readl() for policy buffer access Armin Wolf
2024-03-04 20:50 ` [PATCH v3 3/4] platform/x86/amd/pmf: Use struct for cookie header Armin Wolf
2024-03-04 20:50 ` [PATCH v3 4/4] platform/x86/amd/pmf: Fix possible out-of-bound memory accesses Armin Wolf
2024-03-06  5:09 ` [PATCH v3 0/4] platform/x86/amd/pmf: Fix policy binary handling Shyam Sundar S K
2024-03-06  9:53   ` Ilpo Järvinen
2024-03-06 10:50 ` Ilpo Järvinen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®