From: Miguel Ojeda <miguel.ojeda.sandonis@gmail.com>
To: Stephen Rothwell <sfr@rothwell.id.au>
Cc: Heiko Carstens <hca@linux.ibm.com>,
Stephen Rothwell <sfr@canb.auug.org.au>,
Alex Gaynor <alex.gaynor@gmail.com>,
Geoffrey Thomas <geofft@ldpreload.com>,
Finn Behrens <me@kloenk.de>,
Wedson Almeida Filho <wedsonaf@google.com>,
Adam Bratschi-Kaye <ark.email@gmail.com>,
Miguel Ojeda <ojeda@kernel.org>,
Linux Next Mailing List <linux-next@vger.kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Vasily Gorbik <gor@linux.ibm.com>,
Christian Borntraeger <borntraeger@de.ibm.com>,
Daniel Axtens <dja@axtens.net>
Subject: Re: linux-next: Tree for Mar 19
Date: Sat, 20 Mar 2021 07:49:31 +0100 [thread overview]
Message-ID: <CANiq72n+-9vtpvvHTD=QzpskCbZEvTWhDXUaHrkwsJn4M3fjXg@mail.gmail.com> (raw)
In-Reply-To: <CANiq72nKJBVsuvqr17qa0xnkQTUz9aaAGRi8SfXZAn-G=RYQXw@mail.gmail.com>
On Sat, Mar 20, 2021 at 7:07 AM Miguel Ojeda
<miguel.ojeda.sandonis@gmail.com> wrote:
>
> Sorry for that, and thanks a lot for taking a look. For the Rust
> support I had to increase a few limits, mainly the symbol length. Let
> me check and I'll report back.
Reproduced on s390. However, under defconfig, one also needs to revert
kernel/livepatch/core.c to avoid triggering the assert, i.e.:
diff --git a/include/linux/moduleparam.h b/include/linux/moduleparam.h
index a33f3dcde593..eed280fae433 100644
--- a/include/linux/moduleparam.h
+++ b/include/linux/moduleparam.h
@@ -18,7 +18,7 @@
#endif
/* Chosen so that structs with an unsigned long line up. */
-#define MAX_PARAM_PREFIX_LEN (256 - sizeof(unsigned long))
+#define MAX_PARAM_PREFIX_LEN (64 - sizeof(unsigned long))
#define __MODULE_INFO(tag, name, info) \
static const char __UNIQUE_ID(name)[] \
diff --git a/kernel/livepatch/core.c b/kernel/livepatch/core.c
index 080ebb94d012..1e1699cc3fd6 100644
--- a/kernel/livepatch/core.c
+++ b/kernel/livepatch/core.c
@@ -213,7 +213,7 @@ static int klp_resolve_symbols(Elf64_Shdr
*sechdrs, const char *strtab,
* we use the smallest/strictest upper bound possible (248, based on
* the current definition of MODULE_NAME_LEN) to prevent overflows.
*/
- BUILD_BUG_ON(MODULE_NAME_LEN < 248 || KSYM_NAME_LEN != 512);
+ BUILD_BUG_ON(MODULE_NAME_LEN < 56 || KSYM_NAME_LEN != 512);
relas = (Elf_Rela *) relasec->sh_addr;
/* For each rela in this klp relocation section */
@@ -227,7 +227,7 @@ static int klp_resolve_symbols(Elf64_Shdr
*sechdrs, const char *strtab,
/* Format: .klp.sym.sym_objname.sym_name,sympos */
cnt = sscanf(strtab + sym->st_name,
- ".klp.sym.%247[^.].%511[^,],%lu",
+ ".klp.sym.%55[^.].%511[^,],%lu",
sym_objname, sym_name, &sympos);
if (cnt != 3) {
pr_err("symbol %s has an incorrectly formatted name\n",
Cheers,
Miguel
next prev parent reply other threads:[~2021-03-20 11:17 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-19 6:59 linux-next: Tree for Mar 19 Stephen Rothwell
2021-03-19 14:30 ` Heiko Carstens
2021-03-20 5:27 ` Stephen Rothwell
2021-03-20 6:07 ` Miguel Ojeda
2021-03-20 6:49 ` Miguel Ojeda [this message]
2021-03-20 6:58 ` Miguel Ojeda
2021-03-21 12:30 ` Michael Ellerman
2021-03-21 15:57 ` Miguel Ojeda
-- strict thread matches above, loose matches on Subject: below --
2024-03-19 1:49 Stephen Rothwell
2020-03-19 7:39 Stephen Rothwell
2019-03-19 5:12 Stephen Rothwell
2018-03-19 8:02 Stephen Rothwell
2015-03-19 7:28 Stephen Rothwell
2014-03-19 7:18 Stephen Rothwell
2013-03-19 5:42 Sedat Dilek
2013-03-19 5:47 ` Stephen Rothwell
2013-03-19 5:53 ` Sedat Dilek
2013-03-19 5:54 ` Stephen Rothwell
2013-03-19 6:00 ` Sedat Dilek
2013-03-19 10:24 ` Sedat Dilek
2013-03-19 4:14 Stephen Rothwell
2012-03-19 7:48 Stephen Rothwell
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='CANiq72n+-9vtpvvHTD=QzpskCbZEvTWhDXUaHrkwsJn4M3fjXg@mail.gmail.com' \
--to=miguel.ojeda.sandonis@gmail.com \
--cc=alex.gaynor@gmail.com \
--cc=ark.email@gmail.com \
--cc=borntraeger@de.ibm.com \
--cc=dja@axtens.net \
--cc=geofft@ldpreload.com \
--cc=gor@linux.ibm.com \
--cc=hca@linux.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-next@vger.kernel.org \
--cc=me@kloenk.de \
--cc=ojeda@kernel.org \
--cc=sfr@canb.auug.org.au \
--cc=sfr@rothwell.id.au \
--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).