From mboxrd@z Thu Jan 1 00:00:00 1970 From: Oleg Nesterov Subject: [PATCH 0/5] (Was: procfs: silence lockdep warning about read vs. exec seq_file) Date: Sun, 3 Aug 2014 23:18:43 +0200 Message-ID: <20140803211843.GA13330@redhat.com> References: <1407010227-2269-1-git-send-email-kirill@shutemov.name> <20140803164452.GA14626@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Alexander Viro , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, David Howells , Peter Zijlstra , Sasha Levin , Cyrill Gorcunov , "David S. Miller" , "Kirill A. Shutemov" To: "Kirill A. Shutemov" Return-path: Content-Disposition: inline In-Reply-To: <20140803164452.GA14626@redhat.com> Sender: linux-kernel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org On 08/03, Oleg Nesterov wrote: > > The question is, why m_start() calls mm_access(). This is not even > strictly correct if the task execs between m_stop() + m_start(). > > Can't we do something like below? The patch is obviously horrible and > incomplete, just to explain what I meant. Basically this is what > proc_mem_operations does. Absolutely untested, only for review. What do you all think? Sure, with this change you can't open (say) /proc/pid/maps, and read the new mappings after exec. But hopefully this is fine? And again, this matches /proc/pid/mem. lock_trace() users need another fix. Oleg.