lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Sat, 20 Mar 2021 07:49:31 +0100
From:   Miguel Ojeda <miguel.ojeda.sandonis@...il.com>
To:     Stephen Rothwell <sfr@...hwell.id.au>
Cc:     Heiko Carstens <hca@...ux.ibm.com>,
        Stephen Rothwell <sfr@...b.auug.org.au>,
        Alex Gaynor <alex.gaynor@...il.com>,
        Geoffrey Thomas <geofft@...reload.com>,
        Finn Behrens <me@...enk.de>,
        Wedson Almeida Filho <wedsonaf@...gle.com>,
        Adam Bratschi-Kaye <ark.email@...il.com>,
        Miguel Ojeda <ojeda@...nel.org>,
        Linux Next Mailing List <linux-next@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Vasily Gorbik <gor@...ux.ibm.com>,
        Christian Borntraeger <borntraeger@...ibm.com>,
        Daniel Axtens <dja@...ens.net>
Subject: Re: linux-next: Tree for Mar 19

On Sat, Mar 20, 2021 at 7:07 AM Miguel Ojeda
<miguel.ojeda.sandonis@...il.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ