aboutsummaryrefslogtreecommitdiff
path: root/Documentation/s390
diff options
context:
space:
mode:
authorMichael Holzheu <holzheu@linux.vnet.ibm.com>2009-09-11 10:28:59 +0200
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2009-09-11 10:29:53 +0200
commitf64d04c042193183c6dad98944ae2861b998e8b7 (patch)
treed275472a5559e0333c8c55dfe418e3e30108b8bc /Documentation/s390
parent0c88ee5b7523e76e290d558c28cd0be48ffad597 (diff)
[S390] s390dbf: Add description for usage of "%s" in sprintf events
Using "%s" in sprintf event functions is dangerous. This patch adds a short description for this issue to the s390 debug feature documentation. Signed-off-by: Michael Holzheu <holzheu@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'Documentation/s390')
-rw-r--r--Documentation/s390/s390dbf.txt7
1 files changed, 7 insertions, 0 deletions
diff --git a/Documentation/s390/s390dbf.txt b/Documentation/s390/s390dbf.txt
index 2d10053dd97e..ae66f9b90a25 100644
--- a/Documentation/s390/s390dbf.txt
+++ b/Documentation/s390/s390dbf.txt
@@ -495,6 +495,13 @@ and for each vararg a long value. So e.g. for a debug entry with a format
string plus two varargs one would need to allocate a (3 * sizeof(long))
byte data area in the debug_register() function.
+IMPORTANT: Using "%s" in sprintf event functions is dangerous. You can only
+use "%s" in the sprintf event functions, if the memory for the passed string is
+available as long as the debug feature exists. The reason behind this is that
+due to performance considerations only a pointer to the string is stored in
+the debug feature. If you log a string that is freed afterwards, you will get
+an OOPS when inspecting the debug feature, because then the debug feature will
+access the already freed memory.
NOTE: If using the sprintf view do NOT use other event/exception functions
than the sprintf-event and -exception functions.