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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAJuCfpEz2mbVmGJnp0JHKsip2HVkp+=yHOj3oRtDrKzXXG5Xag@mail.gmail.com>
Date: Tue, 20 May 2025 16:26:28 -0700
From: Suren Baghdasaryan <surenb@...gle.com>
To: Casey Chen <cachen@...estorage.com>
Cc: 00107082@....com, akpm@...ux-foundation.org, cl@...two.org, 
	dennis@...nel.org, kent.overstreet@...ux.dev, linux-kernel@...r.kernel.org, 
	linux-mm@...ck.org, pasha.tatashin@...een.com, tj@...nel.org, 
	yzhong@...estorage.com
Subject: Re: comments on patch "alloc_tag: allocate percpu counters for module
 tags dynamically"

On Tue, May 20, 2025 at 4:16 PM Casey Chen <cachen@...estorage.com> wrote:
>
> Hi Suren,

Hi Casey,

>
> I have two questions on this patch.
> 1. If load_module() fails to allocate memory for percpu counters, should we call codetag_free_module_sections() to clean up module tags memory ?

Does this address your question:
https://lore.kernel.org/all/20250518101212.19930-1-00107082@163.com/

> 2. How about moving percpu counters allocation to move_module() where codetag_alloc_module_section() is called ? So they can be cleaned up together.

That would not work because tag->counters are initialized with NULL
after move_module() executes, so if we allocate there our allocations
will be overridden. We have to do that at the end of load_module()
where codetag_load_module() is.
Thanks,
Suren.

>
> Thanks,
> Casey

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ