From: Alexander Lobakin <alexandr.lobakin@intel.com>
To: linux-kernel@vger.kernel.org
Cc: Masahiro Yamada <masahiroy@kernel.org>,
Michal Marek <michal.lkml@markovi.net>,
"Naveen N. Rao" <naveen.n.rao@linux.ibm.com>,
Anil S Keshavamurthy <anil.s.keshavamurthy@intel.com>,
"David S. Miller" <davem@davemloft.net>,
Masami Hiramatsu <mhiramat@kernel.org>,
Nick Desaulniers <ndesaulniers@google.com>,
Josh Poimboeuf <jpoimboe@kernel.org>,
Peter Zijlstra <peterz@infradead.org>,
Jiri Kosina <jikos@kernel.org>, Miroslav Benes <mbenes@suse.cz>,
Petr Mladek <pmladek@suse.com>,
Joe Lawrence <joe.lawrence@redhat.com>,
linux-kbuild@vger.kernel.org, live-patching@vger.kernel.org,
lkp@intel.com, stable@vger.kernel.org,
Alexander Lobakin <alexandr.lobakin@intel.com>
Subject: [RFC PATCH 2/3] [STUB] increase kallsyms length limit
Date: Thu, 18 Aug 2022 13:53:05 +0200 [thread overview]
Message-ID: <20220818115306.1109642-3-alexandr.lobakin@intel.com> (raw)
In-Reply-To: <20220818115306.1109642-1-alexandr.lobakin@intel.com>
This is a stub just to make it work without including one more
series into this one, for the actual changes please look at the
Rust kallsyms prereqs[0].
[0] https://github.com/Rust-for-Linux/linux/commits/rust-next
Signed-off-by: Alexander Lobakin <alexandr.lobakin@intel.com>
---
include/linux/kallsyms.h | 2 +-
kernel/livepatch/core.c | 4 ++--
scripts/kallsyms.c | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/include/linux/kallsyms.h b/include/linux/kallsyms.h
index ad39636e0c3f..bd10c436ea90 100644
--- a/include/linux/kallsyms.h
+++ b/include/linux/kallsyms.h
@@ -15,7 +15,7 @@
#include <asm/sections.h>
-#define KSYM_NAME_LEN 128
+#define KSYM_NAME_LEN 256
#define KSYM_SYMBOL_LEN (sizeof("%s+%#lx/%#lx [%s %s]") + \
(KSYM_NAME_LEN - 1) + \
2*(BITS_PER_LONG*3/10) + (MODULE_NAME_LEN - 1) + \
diff --git a/kernel/livepatch/core.c b/kernel/livepatch/core.c
index bc475e62279d..fd300fb26f64 100644
--- a/kernel/livepatch/core.c
+++ b/kernel/livepatch/core.c
@@ -213,7 +213,7 @@ static int klp_resolve_symbols(Elf_Shdr *sechdrs, const char *strtab,
* we use the smallest/strictest upper bound possible (56, based on
* the current definition of MODULE_NAME_LEN) to prevent overflows.
*/
- BUILD_BUG_ON(MODULE_NAME_LEN < 56 || KSYM_NAME_LEN != 128);
+ BUILD_BUG_ON(MODULE_NAME_LEN < 56 || KSYM_NAME_LEN != 256);
relas = (Elf_Rela *) relasec->sh_addr;
/* For each rela in this klp relocation section */
@@ -227,7 +227,7 @@ static int klp_resolve_symbols(Elf_Shdr *sechdrs, const char *strtab,
/* Format: .klp.sym.sym_objname.sym_name,sympos */
cnt = sscanf(strtab + sym->st_name,
- ".klp.sym.%55[^.].%127[^,],%lu",
+ ".klp.sym.%55[^.].%255[^,],%lu",
sym_objname, sym_name, &sympos);
if (cnt != 3) {
pr_err("symbol %s has an incorrectly formatted name\n",
diff --git a/scripts/kallsyms.c b/scripts/kallsyms.c
index f18e6dfc68c5..445c7fe0ccfe 100644
--- a/scripts/kallsyms.c
+++ b/scripts/kallsyms.c
@@ -27,7 +27,7 @@
#define ARRAY_SIZE(arr) (sizeof(arr) / sizeof(arr[0]))
-#define KSYM_NAME_LEN 128
+#define KSYM_NAME_LEN 256
struct sym_entry {
unsigned long long addr;
--
2.37.2
next prev parent reply other threads:[~2022-08-18 11:55 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-18 11:53 [RFC PATCH 0/3] kallsyms: add option to include relative filepaths into kallsyms Alexander Lobakin
2022-08-18 11:53 ` [RFC PATCH 1/3] modpost: fix TO_NATIVE() with expressions and consts Alexander Lobakin
2022-08-18 12:26 ` Greg KH
2022-08-18 14:01 ` Alexander Lobakin
2022-08-18 14:10 ` Greg KH
2022-08-18 15:07 ` Alexander Lobakin
2022-08-18 11:53 ` Alexander Lobakin [this message]
2022-08-18 12:23 ` [RFC PATCH 2/3] [STUB] increase kallsyms length limit Greg KH
2022-08-18 11:53 ` [RFC PATCH 3/3] kallsyms: add option to include relative filepaths into kallsyms Alexander Lobakin
2022-08-18 12:23 ` Greg KH
2022-08-18 13:56 ` Alexander Lobakin
2022-08-18 14:11 ` Greg KH
2022-08-19 10:50 ` Alexander Lobakin
2022-08-19 11:02 ` Greg KH
2022-08-19 15:00 ` Alexander Lobakin
2022-08-19 15:19 ` Greg KH
2022-08-18 12:20 ` [RFC PATCH 0/3] " Greg KH
2022-08-18 13:39 ` Alexander Lobakin
2022-08-22 14:40 ` Alexander Lobakin
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=20220818115306.1109642-3-alexandr.lobakin@intel.com \
--to=alexandr.lobakin@intel.com \
--cc=anil.s.keshavamurthy@intel.com \
--cc=davem@davemloft.net \
--cc=jikos@kernel.org \
--cc=joe.lawrence@redhat.com \
--cc=jpoimboe@kernel.org \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=live-patching@vger.kernel.org \
--cc=lkp@intel.com \
--cc=masahiroy@kernel.org \
--cc=mbenes@suse.cz \
--cc=mhiramat@kernel.org \
--cc=michal.lkml@markovi.net \
--cc=naveen.n.rao@linux.ibm.com \
--cc=ndesaulniers@google.com \
--cc=peterz@infradead.org \
--cc=pmladek@suse.com \
--cc=stable@vger.kernel.org \
/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
all inboxes | Powered by JetHome®