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>] [day] [month] [year] [list]
Date:   Thu,  8 Dec 2022 16:55:14 +0800
From:   Qi Zheng <zhengqi.arch@...edance.com>
To:     dan.j.williams@...el.com, willy@...radead.org, jack@...e.cz,
        muchun.song@...ux.dev
Cc:     linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org,
        nvdimm@...ts.linux.dev, Qi Zheng <zhengqi.arch@...edance.com>
Subject: [PATCH] dax: Kconfig: add depends on !FS_DAX_LIMITED for ARCH_HAS_PMEM_API

The implementation of dax_flush() is non-NULL if
CONFIG_ARCH_HAS_PMEM_API is selected. Then if we select
CONFIG_FS_DAX_LIMITED with CONFIG_ARCH_HAS_PMEM_API in
the future, the dax_flush() in the dax_writeback_one()
will cause a panic since it accepts the struct page by
default:

dax_flush(dax_dev, page_address(pfn_to_page(pfn)), count * PAGE_SIZE);

Instead of fixing this, it is better to declare in Kconfig
that pmem does not support CONFIG_FS_DAX_LIMITED now.

Signed-off-by: Qi Zheng <zhengqi.arch@...edance.com>
---
BTW, it seems that CONFIG_FS_DAX_LIMITED currently only has
DCSSBLK as a user, but this makes filesystems dax must support
the case that the struct page is not required, which makes the
code complicated. Is it possible to remove DCSSBLK or change it
to also require struct page?

 lib/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/Kconfig b/lib/Kconfig
index a7cd6605cc6c..6989ad3fea99 100644
--- a/lib/Kconfig
+++ b/lib/Kconfig
@@ -672,6 +672,7 @@ config ARCH_NO_SG_CHAIN
 
 config ARCH_HAS_PMEM_API
 	bool
+	depends on !FS_DAX_LIMITED
 
 config MEMREGION
 	bool
-- 
2.20.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ