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: Wed, 3 Jan 2024 14:46:00 +0100
From: Marco Elver <elver@...gle.com>
To: Pierre Gondois <pierre.gondois@....com>
Cc: linux-kernel@...r.kernel.org, Kees Cook <keescook@...omium.org>, 
	Lucas De Marchi <lucas.demarchi@...el.com>, Jani Nikula <jani.nikula@...el.com>, 
	Andy Shevchenko <andriy.shevchenko@...ux.intel.com>, Ingo Molnar <mingo@...nel.org>
Subject: Re: [PATCH] list: Add hlist_count_nodes()

On Wed, 3 Jan 2024 at 13:04, Pierre Gondois <pierre.gondois@....com> wrote:
>
> Hello Marco,
>
> On 1/3/24 12:25, Marco Elver wrote:
> > On Wed, 3 Jan 2024 at 10:02, Pierre Gondois <pierre.gondois@....com> wrote:
> >>
> >> Add a function to count nodes in a hlist. hlist_count_nodes()
> >> is similar to list_count_nodes().
> >>
> >> Signed-off-by: Pierre Gondois <pierre.gondois@....com>
> >
> > Is this patch part of another patch series? As-is, this will be dead
> > code, and there's no guarantee someone will just go and delete it in
> > future. Although this function looks useful, we also should avoid
> > adding new dead code.
>
> The function is indeed not used in the project right now. I needed
> it for a private module. If it helps integrating the function and
> not make it dead code, maybe I could add usages at the following
> places:
> - drivers/gpu/drm/drm_hashtab.c::print_binder_node_nilocked()
> - drivers/md/bcache/sysfs.c::bch_cache_max_chain()

If this function allows to simplify these other places, by all means
go ahead. That would look a lot better than having an unused function.

Thanks,
-- Marco

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ