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]
Message-ID: <CAK7LNASMn9GY2dzVvouDW5MfqR3M1pEkWM73quh1HKb_XW1L4g@mail.gmail.com>
Date:   Sat, 12 Oct 2019 12:35:47 +0900
From:   Masahiro Yamada <yamada.masahiro@...ionext.com>
To:     Matthias Maennich <maennich@...gle.com>
Cc:     Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        "Cc: Android Kernel" <kernel-team@...roid.com>,
        Jessica Yu <jeyu@...nel.org>,
        Martijn Coenen <maco@...roid.com>,
        Lucas De Marchi <lucas.de.marchi@...il.com>,
        Shaun Ruffell <sruffell@...ffell.net>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Will Deacon <will@...nel.org>,
        Linux Kbuild mailing list <linux-kbuild@...r.kernel.org>,
        linux-modules <linux-modules@...r.kernel.org>
Subject: Re: [PATCH 3/4] symbol namespaces: revert to previous __ksymtab name scheme

On Fri, Oct 11, 2019 at 12:16 AM Matthias Maennich <maennich@...gle.com> wrote:
>
> The introduction Symbol Namespaces changed the naming schema of the
> __ksymtab entries from __kysmtab__symbol to __ksymtab_NAMESPACE.symbol.
>
> That caused some breakages in tools that depend on the name layout in
> either the binaries(vmlinux,*.ko) or in System.map. E.g. kmod's depmod
> would not be able to read System.map without a patch to support symbol
> namespaces. A warning reported by depmod for namespaced symbols would
> look like
>
>   depmod: WARNING: [...]/uas.ko needs unknown symbol usb_stor_adjust_quirks
>
> In order to address this issue, revert to the original naming scheme and
> rather read the __kstrtabns_<symbol> entries and their corresponding
> values from __ksymtab_strings to update the namespace values for
> symbols. After having read all symbols and handled them in
> handle_modversions(), the symbols are created. In a second pass, read
> the __kstrtabns_ entries and update the namespaces accordingly.
>
> Suggested-by: Jessica Yu <jeyu@...nel.org>
> Fixes: 8651ec01daed ("module: add support for symbol namespaces.")
> Signed-off-by: Matthias Maennich <maennich@...gle.com>


According to https://lore.kernel.org/patchwork/patch/1135222/
was this problem reported by Stefan?
Reported-by: Stefan Wahren <stefan.wahren@...e.com>


BTW, I initially suggested this way of fixing.
Suggested-by: Masahiro Yamada <yamada.masahiro@...ionext.com>



> @@ -74,9 +72,8 @@ struct kernel_symbol {
>         int namespace_offset;
>  };
>  #else
> -#define __KSYMTAB_ENTRY_NS(sym, sec, ns)                               \
> -       static const struct kernel_symbol __ksymtab_##sym##__##ns       \
> -       asm("__ksymtab_" #ns NS_SEPARATOR #sym)                         \


For consistency, you could also delete   asm("__ksymtab_" #sym)
by this patch instead of by 4/4.

Not a big deal, though.


Reviewed-by: Masahiro Yamada <yamada.masahiro@...ionext.com>



-- 
Best Regards
Masahiro Yamada

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ