All of lore.kernel.org
 help / color / mirror / Atom feed
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: linux-hexagon@vger.kernel.org, linux-kernel@vger.kernel.org,
	linuxppc-dev@lists.ozlabs.org,
	Maninder Singh <maninder1.s@samsung.com>,
	Onkarnath <onkarnath.1@samsung.com>
Subject: [PATCH 2/2] powerpc/xmon: use KSYM_NAME_LEN in array size
Date: Mon, 29 May 2023 16:43:37 +0530	[thread overview]
Message-ID: <20230529111337.352990-2-maninder1.s@samsung.com> (raw)
In-Reply-To: <20230529111337.352990-1-maninder1.s@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 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")

Co-developed-by: Onkarnath <onkarnath.1@samsung.com>
Signed-off-by: Onkarnath <onkarnath.1@samsung.com>
Signed-off-by: Maninder Singh <maninder1.s@samsung.com>
---
 arch/powerpc/xmon/xmon.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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


WARNING: multiple messages have this Message-ID (diff)
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 2/2] powerpc/xmon: use KSYM_NAME_LEN in array size
Date: Mon, 29 May 2023 16:43:37 +0530	[thread overview]
Message-ID: <20230529111337.352990-2-maninder1.s@samsung.com> (raw)
In-Reply-To: <20230529111337.352990-1-maninder1.s@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 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")

Co-developed-by: Onkarnath <onkarnath.1@samsung.com>
Signed-off-by: Onkarnath <onkarnath.1@samsung.com>
Signed-off-by: Maninder Singh <maninder1.s@samsung.com>
---
 arch/powerpc/xmon/xmon.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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


  parent reply	other threads:[~2023-05-29 11:14 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20230529111350epcas5p46a1fa16ffb2a39008c26d03c5c63f109@epcas5p4.samsung.com>
2023-05-29 11:13 ` [PATCH 1/2] hexagon/traps.c: use KSYM_NAME_LEN in array size Maninder Singh
2023-05-29 11:13   ` Maninder Singh
     [not found]   ` <CGME20230529111404epcas5p2d540d726dcf3e21aae2a6a0958e2eea5@epcas5p2.samsung.com>
2023-05-29 11:13     ` Maninder Singh [this message]
2023-05-29 11:13       ` [PATCH 2/2] powerpc/xmon: " Maninder Singh
2023-05-30  6:45       ` Michael Ellerman
2023-05-30  6:45         ` Michael Ellerman
2023-05-30 12:54       ` Miguel Ojeda
2023-05-30 12:54         ` Miguel Ojeda
2023-05-30 12:54         ` Miguel Ojeda
2023-06-01  2:02         ` Michael Ellerman
2023-06-01  2:02           ` Michael Ellerman
2023-06-01  2:02           ` Michael Ellerman
2023-06-01 10:27           ` Miguel Ojeda
2023-06-01 10:27             ` Miguel Ojeda
2023-06-01 10:27             ` Miguel Ojeda
2023-06-01 12:54             ` Michael Ellerman
2023-06-01 12:54               ` Michael Ellerman
2023-06-01 12:54               ` Michael Ellerman
2023-08-03  5:46         ` Benjamin Gray
2023-08-03  5:46           ` Benjamin Gray
2023-05-30  8:59   ` [PATCH 1/2] hexagon/traps.c: " Petr Mladek
2023-05-30  8:59     ` Petr Mladek
2023-05-30 12:59   ` Miguel Ojeda
2023-05-30 12:59     ` Miguel Ojeda
2023-05-30 12:59     ` Miguel Ojeda
2023-05-30 13:42   ` David Laight
2023-05-30 13:42     ` David Laight
2023-07-03  4:02   ` Michael Ellerman
2023-07-03  4:02     ` Michael Ellerman

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=20230529111337.352990-2-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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.