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]
Date:	Sun, 1 Feb 2009 16:26:55 -0800 (PST)
From:	David Rientjes <rientjes@...gle.com>
To:	Sven Wegener <sven.wegener@...aler.net>,
	Andrew Morton <akpm@...ux-foundation.org>
cc:	Peter Zijlstra <peterz@...radead.org>,
	Dave Chinner <david@...morbit.com>,
	Christoph Lameter <cl@...ux-foundation.org>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] mm: Fix dirty_bytes/dirty_background_bytes sysctls on
 64bit arches

On Sun, 1 Feb 2009, Sven Wegener wrote:

> We need to pass an unsigned long as the minimum, because it gets casted
> to an unsigned long in the sysctl handler. If we pass an int, we'll
> access four more bytes on 64bit arches, resulting in a random minimum
> value.
> 
> Signed-off-by: Sven Wegener <sven.wegener@...aler.net>

Acked-by: David Rientjes <rientjes@...gle.com>


You'll also need the following since vm_dirty_bytes is declared as an 
unsigned long.  Andrew, can you queue Sven's fix for rc4 with this folded 
into it?

Signed-off-by: David Rientjes <rientjes@...gle.com>
---
 mm/page-writeback.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/mm/page-writeback.c b/mm/page-writeback.c
--- a/mm/page-writeback.c
+++ b/mm/page-writeback.c
@@ -209,7 +209,7 @@ int dirty_bytes_handler(struct ctl_table *table, int write,
 		struct file *filp, void __user *buffer, size_t *lenp,
 		loff_t *ppos)
 {
-	int old_bytes = vm_dirty_bytes;
+	unsigned long old_bytes = vm_dirty_bytes;
 	int ret;
 
 	ret = proc_doulongvec_minmax(table, write, filp, buffer, lenp, ppos);
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ