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: <20191003113429.GS22609@kadam>
Date:   Thu, 3 Oct 2019 14:34:29 +0300
From:   Dan Carpenter <dan.carpenter@...cle.com>
To:     Valdis Klētnieks <valdis.kletnieks@...edu>
Cc:     gregkh@...uxfoundation.org, devel@...verdev.osuosl.org,
        linux-kernel@...r.kernel.org,
        Saiyam Doshi <saiyamdoshi.in@...il.com>
Subject: Re: [PATCH] drivers/staging/exfat - explain the fs_sync() issue in
 TODO

On Wed, Oct 02, 2019 at 03:01:35PM -0400, Valdis Klētnieks wrote:
> We've seen several incorrect patches for fs_sync() calls in the exfat driver.
> Add code to the TODO that explains this isn't just a delete code and refactor,
> but that actual analysis of when the filesystem should be flushed to disk
> needs to be done.
> 

This doesn't help at all because no one can be expected to read it.
Put a comment in the code which says something like:

diff --git a/drivers/staging/exfat/exfat_super.c b/drivers/staging/exfat/exfat_super.c
index 229ecabe7a93..c1710d99875e 100644
--- a/drivers/staging/exfat/exfat_super.c
+++ b/drivers/staging/exfat/exfat_super.c
@@ -287,6 +287,13 @@ static DEFINE_SEMAPHORE(z_sem);
 
 static inline void fs_sync(struct super_block *sb, bool do_sync)
 {
+	/*
+	 * Oct 2019:  Please, do not delete this code or the callers.  This
+	 * code is obviously bogus and many of the callers are dead code, yes,
+	 * but it may hold clues as to when syncing is required.  Someone needs
+	 * to go through and audit it really carefully.
+	 *
+	 */
 	if (do_sync)
 		bdev_sync(sb);
 }

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ