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:   Fri, 25 Oct 2019 17:49:16 +0200
From:   Stephen Kitt <steve@....org>
To:     Alexander Viro <viro@...iv.linux.org.uk>,
        linux-fsdevel@...r.kernel.org
Cc:     linux-kernel@...r.kernel.org, Stephen Kitt <steve@....org>
Subject: [PATCH] Allow disabling drop_caches logging immediately

Currently, echoing 4 to drop_caches disables logging for subsequent
operations, not the current operation, even if the write is combined
(echo 7 ...). This patch takes bit 2 into account before logging, so
that logging can be disabled concurrently with other operations.

This doesn't change the behaviour for existing scenarios encountered
in the wild.

Signed-off-by: Stephen Kitt <steve@....org>
---
 fs/drop_caches.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/drop_caches.c b/fs/drop_caches.c
index d31b6c72b476..2562d6285ce4 100644
--- a/fs/drop_caches.c
+++ b/fs/drop_caches.c
@@ -65,12 +65,12 @@ int drop_caches_sysctl_handler(struct ctl_table *table, int write,
 			drop_slab();
 			count_vm_event(DROP_SLAB);
 		}
+		stfu |= sysctl_drop_caches & 4;
 		if (!stfu) {
 			pr_info("%s (%d): drop_caches: %d\n",
 				current->comm, task_pid_nr(current),
 				sysctl_drop_caches);
 		}
-		stfu |= sysctl_drop_caches & 4;
 	}
 	return 0;
 }
-- 
2.20.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ