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:	Thu, 31 Jul 2014 11:26:17 +0400
From:	Cyrill Gorcunov <gorcunov@...il.com>
To:	"Kirill A. Shutemov" <kirill@...temov.name>
Cc:	Al Viro <viro@...IV.linux.org.uk>,
	David Howells <dhowells@...hat.com>,
	Peter Zijlstra <peterz@...radead.org>,
	"Michael L. Semon" <mlsemon35@...il.com>,
	Ingo Molnar <mingo@...nel.org>, jason.low2@...com,
	Sasha Levin <levinsasha928@...il.com>,
	Oleg Nesterov <oleg@...hat.com>,
	"David S. Miller" <davem@...emloft.net>,
	linux-kernel@...r.kernel.org
Subject: Re: cred_guard_mutex vs seq_file::lock [was: Re: 3.14.0+/x86:
 lockdep and mutexes not getting along]

On Thu, Jul 31, 2014 at 01:31:30AM +0300, Kirill A. Shutemov wrote:
...
> > 
> > *cringe*
> > 
> > I don't like it.  That really should be a responsiblity of specific ->show();
> > "I'm going to take that mutex, bugger off if we are in execve()" makes a lot
> > more sense than having e.g. seq_read() care of that.  IOW, I would very
> > much prefer the patch you've sent last week.
> > 
> > And yes, it might leave lockdep false positives, but that's better dealt with
> > by annotating the sucker ("this guy has a separate lockdep class for its
> > ->lock").  E.g. by splitting proc_single_file_operations in two and having
> > the one used for those files do lockdep_set_class() in its ->open().
> 
> I've got annoyed by the lockdep warning. What about the patch below?
> 
> From 54d8c463e12f23c09d6a2dbf93a4dc9bcb493c67 Mon Sep 17 00:00:00 2001
> From: "Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com>
> Date: Thu, 31 Jul 2014 00:59:52 +0300
> Subject: [PATCH] procfs: silence lockdep warning about read vs. exec seq_file
> 
> Testcase:
> 
>   cat /proc/self/maps >/dev/null
>   chmod +x /proc/self/net/packet
>   exec /proc/self/net/packet
> 
> It triggers lockdep warning:
...
> 
> It's a false positive: seq files which take cred_guard_mutex are never
> executable. Let's use separate lock class for them.
> 
> I don't know why we allow "chmod +x" on some proc files, notably net-related.
> Is it a bug?
> 
> Also I suspect eb94cd96e05d fixes non-existing bug, like this one.

Yeah, it should. And the patch looks good to me. Still I think maybe indeed
we need to prevent ability to set executable attribute on proc seq files?
--
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