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] [day] [month] [year] [list]
Message-ID: <14e1413f-92a2-f228-e149-82d4fdbc0c0d@huawei.com>
Date:   Thu, 4 Jun 2020 20:55:46 +0800
From:   "chengjian (D)" <cj.chengjian@...wei.com>
To:     <linux-kernel@...r.kernel.org>, <live-patching@...r.kernel.org>
CC:     <chenwandun@...wei.com>, <xiexiuqi@...wei.com>,
        <bobo.shaobowang@...wei.com>, <huawei.libin@...wei.com>,
        <jeyu@...nel.org>, <jikos@...nel.org>
Subject: Re: [PATCH] module: make module symbols visible after init

Hi, Petr, Jessica and Miroslav

Thank you for your reply

On 2020/6/4 16:57, Petr Mladek wrote:
> On Wed 2020-06-03 14:12:00, Cheng Jian wrote:
>
> It is really handful that module symbols can be found already when
> the module is MODULE_STATE_COMING state. It is used by livepatching,
> ftrace, and maybe some other subsystems.

Yes, you are right, I missed this before.

There are many scenes that lookup the symbols of module when the module is

MODULE_STATE_COMING state.

in livepatch:

     klp_module_coming

-=> klp_write_object_relocations

-=> klp_resolve_symbols

-=> module_kallsyms_on_each_symbol

My patch is incorrect.

> The problem is that nobody is allowed to use (call) module symbols
> before mod->init() is called and the module is moved to
> MODULE_STATE_LIVE.
>
> By other words. Any code that calls module symbols before the module
> is fully initialized is buggy. The caller should get fixed,
> not the kallsyms side.
>
> Have you seen such a problem in the real life, please?
>
> Best Regards,
> Petr
>
> .


     Thank you very much.

         -- Cheng Jian.


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ