From mboxrd@z Thu Jan 1 00:00:00 1970 From: ebiederm@xmission.com (Eric W. Biederman) Subject: Re: [PATCH, RESEND] procfs: silence lockdep warning about read vs. exec seq_file Date: Mon, 04 Aug 2014 20:42:11 -0700 Message-ID: <87d2cfzjos.fsf@x220.int.ebiederm.org> References: <1407010227-2269-1-git-send-email-kirill@shutemov.name> Mime-Version: 1.0 Content-Type: text/plain Cc: Alexander Viro , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, David Howells , Peter Zijlstra , Sasha Levin , Cyrill Gorcunov , Oleg Nesterov , "David S. Miller" , "Kirill A. Shutemov" To: "Kirill A. Shutemov" Return-path: In-Reply-To: <1407010227-2269-1-git-send-email-kirill@shutemov.name> (Kirill A. Shutemov's message of "Sat, 2 Aug 2014 23:10:27 +0300") Sender: linux-kernel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org "Kirill A. Shutemov" writes: > From: "Kirill A. Shutemov" > > Testcase: > > cat /proc/self/maps >/dev/null > chmod +x /proc/self/net/packet > exec /proc/self/net/packet > > It triggers lockdep warning: > I don't know why we allow "chmod +x" on some proc files, notably net-related. > Is it a bug? It looks like we simply did not remove the ability to make those files executable when we realized executable proc files could be a problem. I expect that part of proc could use an audit where someone figures out what makes sense. It does appear that chmod XXX /proc/generic_file is explicitly supported. So we would have to be delicate with any changes in that area to avoid creating userspace regressions. Eric