From: Cyrill Gorcunov <gorcunov@gmail.com>
To: LKML <linux-kernel@vger.kernel.org>
Cc: Ingo Molnar <mingo@elte.hu>, Andrew Morton <akpm@linux-foundation.org>
Subject: [PATCH] x86: traps_32.c - use KSYM_NAME_LEN instead of numeric value
Date: Sat, 15 Mar 2008 11:34:26 +0300 [thread overview]
Message-ID: <20080315083426.GA8086@cvg> (raw)
It's safer to use KSYM_NAME_LEN instead of numeric constant
because we could get buffer overrun someday if KSYM_NAME_LEN
would be changed to a bigger value.
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
---
I've patched 64bit version but forgot about 32bit. So
lets fix it too.
Index: linux-2.6.git/arch/x86/kernel/traps_32.c
===================================================================
--- linux-2.6.git.orig/arch/x86/kernel/traps_32.c 2008-02-09 22:27:13.000000000 +0300
+++ linux-2.6.git/arch/x86/kernel/traps_32.c 2008-03-15 11:21:16.000000000 +0300
@@ -109,7 +109,7 @@ void printk_address(unsigned long addres
const char *symname;
char *modname;
char *delim = ":";
- char namebuf[128];
+ char namebuf[KSYM_NAME_LEN];
char reliab[4] = "";
symname = kallsyms_lookup(address, &symsize, &offset,
next reply other threads:[~2008-03-15 8:35 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-15 8:34 Cyrill Gorcunov [this message]
2008-03-21 11:37 ` [PATCH] x86: traps_32.c - use KSYM_NAME_LEN instead of numeric value Ingo Molnar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080315083426.GA8086@cvg \
--to=gorcunov@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox