From: Maninder Singh <maninder1.s@samsung.com>
To: bcain@quicinc.com, mpe@ellerman.id.au, npiggin@gmail.com,
christophe.leroy@csgroup.eu, keescook@chromium.org,
nathanl@linux.ibm.com, ustavoars@kernel.org,
alex.gaynor@gmail.com, gary@garyguo.net, ojeda@kernel.org,
pmladek@suse.com, wedsonaf@google.com
Cc: Maninder Singh <maninder1.s@samsung.com>,
linux-hexagon@vger.kernel.org, linuxppc-dev@lists.ozlabs.org,
linux-kernel@vger.kernel.org, Onkarnath <onkarnath.1@samsung.com>
Subject: [PATCH 1/1] arch:hexagon/powerpc: use KSYM_NAME_LEN in array size
Date: Mon, 29 May 2023 10:58:21 +0530 [thread overview]
Message-ID: <20230529052821.58175-1-maninder1.s@samsung.com> (raw)
In-Reply-To: CGME20230529052832epcas5p4fa1b8cf25d9810d32bd2ccf012086fb3@epcas5p4.samsung.com
kallsyms_lookup which in turn calls for kallsyms_lookup_buildid()
writes on index "KSYM_NAME_LEN - 1".
Thus array size should be KSYM_NAME_LEN.
for powerpc and hexagon it was defined as "128" directly.
and commit '61968dbc2d5d' changed define value to 512,
So both were missed to update with new size.
Fixes: 61968dbc2d5d ("kallsyms: increase maximum kernel symbol length to 512")
Signed-off-by: Onkarnath <onkarnath.1@samsung.com>
Signed-off-by: Maninder Singh <maninder1.s@samsung.com>
---
arch/hexagon/kernel/traps.c | 2 +-
arch/powerpc/xmon/xmon.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/hexagon/kernel/traps.c b/arch/hexagon/kernel/traps.c
index 6447763ce5a9..65b30b6ea226 100644
--- a/arch/hexagon/kernel/traps.c
+++ b/arch/hexagon/kernel/traps.c
@@ -82,7 +82,7 @@ static void do_show_stack(struct task_struct *task, unsigned long *fp,
const char *name = NULL;
unsigned long *newfp;
unsigned long low, high;
- char tmpstr[128];
+ char tmpstr[KSYM_NAME_LEN];
char *modname;
int i;
diff --git a/arch/powerpc/xmon/xmon.c b/arch/powerpc/xmon/xmon.c
index 728d3c257e4a..70c4c59a1a8f 100644
--- a/arch/powerpc/xmon/xmon.c
+++ b/arch/powerpc/xmon/xmon.c
@@ -88,7 +88,7 @@ static unsigned long ndump = 64;
static unsigned long nidump = 16;
static unsigned long ncsum = 4096;
static int termch;
-static char tmpstr[128];
+static char tmpstr[KSYM_NAME_LEN];
static int tracing_enabled;
static long bus_error_jmp[JMP_BUF_LEN];
--
2.17.1
next parent reply other threads:[~2023-05-29 5:52 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20230529052832epcas5p4fa1b8cf25d9810d32bd2ccf012086fb3@epcas5p4.samsung.com>
2023-05-29 5:28 ` Maninder Singh [this message]
2023-05-29 10:45 ` [PATCH 1/1] arch:hexagon/powerpc: use KSYM_NAME_LEN in array size Miguel Ojeda
[not found] ` <CGME20230529052832epcas5p4fa1b8cf25d9810d32bd2ccf012086fb3@epcms5p1>
2023-05-29 10:57 ` Maninder Singh
2023-05-29 14:50 ` Miguel Ojeda
2023-05-30 8:06 ` Petr Mladek
[not found] ` <CGME20230529052832epcas5p4fa1b8cf25d9810d32bd2ccf012086fb3@epcms5p8>
2023-05-30 8:14 ` Maninder Singh
2023-05-30 23:14 ` Kees Cook
2023-06-18 14:20 ` Miguel Ojeda
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=20230529052821.58175-1-maninder1.s@samsung.com \
--to=maninder1.s@samsung.com \
--cc=alex.gaynor@gmail.com \
--cc=bcain@quicinc.com \
--cc=christophe.leroy@csgroup.eu \
--cc=gary@garyguo.net \
--cc=keescook@chromium.org \
--cc=linux-hexagon@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mpe@ellerman.id.au \
--cc=nathanl@linux.ibm.com \
--cc=npiggin@gmail.com \
--cc=ojeda@kernel.org \
--cc=onkarnath.1@samsung.com \
--cc=pmladek@suse.com \
--cc=ustavoars@kernel.org \
--cc=wedsonaf@google.com \
/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;
as well as URLs for NNTP newsgroup(s).