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: <YMvsYm8b+yTIrqBC@archlinux-ax161>
Date:   Thu, 17 Jun 2021 17:44:18 -0700
From:   Nathan Chancellor <nathan@...nel.org>
To:     Miaohe Lin <linmiaohe@...wei.com>
Cc:     akpm@...ux-foundation.org, sjenning@...hat.com, ddstreet@...e.org,
        linux-kernel@...r.kernel.org, linux-mm@...ck.org
Subject: Re: [PATCH v2 2/2] mm/zbud: don't export any zbud API

On Tue, Jun 08, 2021 at 07:45:15PM +0800, Miaohe Lin wrote:
> The zbud doesn't need to export any API and it is meant to be used via
> zpool API since the commit 12d79d64bfd3 ("mm/zpool: update zswap to use
> zpool"). So we can remove the unneeded zbud.h and move down zpool API
> to avoid any forward declaration.
> 
> Signed-off-by: Miaohe Lin <linmiaohe@...wei.com>

This patch causes several new warnings when CONFIG_ZPOOL is disabled:

mm/zbud.c:222:26: warning: unused function 'zbud_create_pool' [-Wunused-function]
mm/zbud.c:246:13: warning: unused function 'zbud_destroy_pool' [-Wunused-function]
mm/zbud.c:270:12: warning: unused function 'zbud_alloc' [-Wunused-function]
mm/zbud.c:345:13: warning: unused function 'zbud_free' [-Wunused-function]
mm/zbud.c:417:12: warning: unused function 'zbud_reclaim_page' [-Wunused-function]
mm/zbud.c:499:14: warning: unused function 'zbud_map' [-Wunused-function]
mm/zbud.c:509:13: warning: unused function 'zbud_unmap' [-Wunused-function]
mm/zbud.c:520:12: warning: unused function 'zbud_get_pool_size' [-Wunused-function]

It seems to me like all of these functions should be sunk into their
callers and eliminated entirely as part of this refactoring. I took a
whack at it but got lost with the kernel docs so someone who is familiar
with this should probably do it.

Cheers,
Nathan

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ