summaryrefslogtreecommitdiffstats
path: root/src/include
diff options
context:
space:
mode:
authorPatrick Williams <iawillia@us.ibm.com>2014-01-14 13:27:17 -0600
committerA. Patrick Williams III <iawillia@us.ibm.com>2014-01-15 16:36:07 -0600
commit1519b0b4786367a4855edfd24844b896293d5d80 (patch)
tree6f623748e529c8b8a7bf3aa958c320f349108296 /src/include
parent728120d7abd9c4d7ebfca8b212a2bdc4a4f93b4e (diff)
downloadtalos-hostboot-1519b0b4786367a4855edfd24844b896293d5d80.tar.gz
talos-hostboot-1519b0b4786367a4855edfd24844b896293d5d80.zip
Potential buffer overrun in trace collection.
Change-Id: I8352c37f3789c684df24b75e85abca9fddfa314f Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/8054 Tested-by: Jenkins Server Reviewed-by: Michael Baiocchi <baiocchi@us.ibm.com> Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com> Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/include')
-rw-r--r--src/include/usr/errl/errlentry.H8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/include/usr/errl/errlentry.H b/src/include/usr/errl/errlentry.H
index 2050deda8..78a084a7f 100644
--- a/src/include/usr/errl/errlentry.H
+++ b/src/include/usr/errl/errlentry.H
@@ -46,6 +46,7 @@
// I n c l u d e s
/*****************************************************************************/
#include <stdint.h>
+#include <limits.h>
#include <vector>
#include <errl/hberrltypes.H>
#include <errl/errlsctn.H>
@@ -426,12 +427,17 @@ public:
* @param[in] i_name Trace buffer name
* @param[in] i_max Size of trace to capture.
*
+ * @note: 'i_max = 0' implies to collect all of the trace available for
+ * that component. This is actually dangerous in Hostboot because
+ * our trace buffer are not hard-limited. The default of this
+ * function will be 1K to keep us at a reasonable limit.
+ *
* @return A Boolean indication of success. False likely means
* the trace buffer name given is not found. However, check the ERRL
* trace buffer for the cause of the failure.
*/
bool collectTrace(const char i_name[],
- const uint64_t i_max = 0);
+ const uint64_t i_max = KILOBYTE);
/**
* @brief Remove the back trace user detail data
OpenPOWER on IntegriCloud