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: <BBCAAD9D-245A-4068-B7C7-01DA4E02261C@fb.com>
Date:   Wed, 1 Feb 2023 22:28:01 +0000
From:   Song Liu <songliubraving@...a.com>
To:     Peter Zijlstra <peterz@...radead.org>
CC:     Song Liu <song@...nel.org>,
        "linux-modules@...r.kernel.org" <linux-modules@...r.kernel.org>,
        LKML <linux-kernel@...r.kernel.org>,
        Christoph Hellwig <hch@....de>,
        Kernel Team <kernel-team@...a.com>,
        Luis Chamberlain <mcgrof@...nel.org>,
        Thomas Gleixner <tglx@...utronix.de>,
        Guenter Roeck <linux@...ck-us.net>,
        Christophe Leroy <christophe.leroy@...roup.eu>
Subject: Re: [PATCH v7] module: replace module_layout with module_memory



> On Feb 1, 2023, at 1:24 PM, Peter Zijlstra <peterz@...radead.org> wrote:
> 
> On Wed, Feb 01, 2023 at 10:44:22AM -0800, Song Liu wrote:
> 
>> static ssize_t show_datasize(struct module_attribute *mattr,
>>     struct module_kobject *mk, char *buffer)
>> {
>> - return sprintf(buffer, "%u\n", mk->mod->data_layout.size);
>> + unsigned int size = 0;
>> +
>> + for_class_mod_mem_type(type, core) {
>> + if (type == MOD_TEXT)
>> + continue;
> 
> isn't this the same as:
> 
> for_class_mod_mem_type(type, core_data)
> 
> ?

Great catch!

> 
>> + size += mk->mod->mem[type].size;
>> + }
>> + return sprintf(buffer, "%u\n", size);
>> }
> 
> 
>> - lockdep_free_key_range(mod->data_layout.base, mod->data_layout.size);
>> + for_class_mod_mem_type(type, core) {
>> + lockdep_free_key_range(mod->mem[type].base,
>> +       mod->mem[type].size);
>> + }
> 
> Why the core_data to core change? Specifically the difference seems to
> be you now include text. Now, we shouldn't be having lockdep keys in
> text, so it's harmless, still a bit weird.

Will fix!

Thanks,
Song

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ