]> git.proxmox.com Git - mirror_edk2.git/blobdiff - SecurityPkg/Tcg/TcgSmm/TcgSmm.c
Add comment for modules which have external input.
[mirror_edk2.git] / SecurityPkg / Tcg / TcgSmm / TcgSmm.c
index dd6d89f695fc7310a1279a90c8f75210f364f234..6fa383d46d640f0cd5fab86073b8948087815daa 100644 (file)
@@ -2,6 +2,12 @@
   It updates TPM items in ACPI table and registers SMI callback\r
   functions for physical presence and ClearMemory.\r
 \r
+  Caution: This module requires additional review when modified.\r
+  This driver will have external input - variable and ACPINvs data in SMM mode.\r
+  This external input must be validated carefully to avoid security issue.\r
+\r
+  PhysicalPresenceCallback() and MemoryClearCallback() will receive untrusted input and do some check.\r
+\r
 Copyright (c) 2011 - 2012, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials \r
 are licensed and made available under the terms and conditions of the BSD License \r
@@ -21,6 +27,10 @@ TCG_NVS                    *mTcgNvs;
 /**\r
   Software SMI callback for TPM physical presence which is called from ACPI method.\r
 \r
+  Caution: This function may receive untrusted input.\r
+  Variable and ACPINvs are external input, so this function will validate\r
+  its data structure to be valid value.\r
+\r
   @param[in]      DispatchHandle  The unique handle assigned to this handler by SmiHandlerRegister().\r
   @param[in]      Context         Points to an optional handler context which was specified when the\r
                                   handler was registered.\r
@@ -161,6 +171,10 @@ PhysicalPresenceCallback (
 /**\r
   Software SMI callback for MemoryClear which is called from ACPI method.\r
 \r
+  Caution: This function may receive untrusted input.\r
+  Variable and ACPINvs are external input, so this function will validate\r
+  its data structure to be valid value.\r
+\r
   @param[in]      DispatchHandle  The unique handle assigned to this handler by SmiHandlerRegister().\r
   @param[in]      Context         Points to an optional handler context which was specified when the\r
                                   handler was registered.\r