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]
Date:	Thu, 12 Jul 2007 19:21:14 -0700
From:	Andrew Morton <akpm@...ux-foundation.org>
To:	Matt Helsley <matthltc@...ibm.com>
Cc:	Chris Wright <chrisw@...s-sol.org>, linux-mm@...ck.org,
	LKML <linux-kernel@...r.kernel.org>,
	Christoph Hellwig <hch@....de>,
	"Hallyn, Serge" <serue@...ibm.com>,
	Peter Zijlstra <peterz@...radead.org>
Subject: Re: [PATCH] Simplify /proc/<pid|self>/exe symlink code

On Thu, 12 Jul 2007 19:00:12 -0700 Matt Helsley <matthltc@...ibm.com> wrote:

> This patch avoids holding the mmap semaphore while walking VMAs in response to
> programs which read or follow the /proc/<pid|self>/exe symlink. This also allows
> us to merge mmu and nommu proc_exe_link() functions. The costs are holding the
> task lock, a separate reference to the executable file stored in the task
> struct, and increased code in fork, exec, and exit paths.
> 
> Signed-off-by: Matt Helsley <matthltc@...ibm.com>
> ---
> 
> Changelog:
> 
> Hold task_lock() while using task->exe_file. With this change I haven't
> 	been able to reproduce Chris Wright's Oops report:
> 		http://lkml.org/lkml/2007/5/31/34 
> 	I used a 4-way, x86 system running kernbench. I also tried a 4-way x86_64
> 	system running pidof. I used oprofile during all runs but I could not
> 	reproduce Chris' Oops with the new patch.
> 
> Compiled and passed simple tests for regressions when patched against a 2.6.20
> and a 2.6.22 kernel. Regression tests included a variety of file operations on
> /proc/<pid|self>/exe such as stat, lstat, open, close, readlink, and unlink. All
> produced the expected, baseline output results.
> 
> Andrew, please consider this patch for inclusion in -mm.

I wish we had a description of the bug which this fixes.  That email of
Chris's is referencing code which diddles with task_struct.exe_file, but
your patch _adds_ task_struct.exe_file, so I am all confused.

Your patch does lots of fput()s under task_lock(), but fput() can sleep.

Plus what Al said.
-
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