From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932551AbcHCPAZ (ORCPT ); Wed, 3 Aug 2016 11:00:25 -0400 Received: from mail-wm0-f45.google.com ([74.125.82.45]:37411 "EHLO mail-wm0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755474AbcHCPAX (ORCPT ); Wed, 3 Aug 2016 11:00:23 -0400 Subject: Re: [PATCH v2] locks: Filter /proc/locks output on proc pid ns To: Pavel Emelyanov , Nikolay Borisov , Jeff Layton , bfields@fieldses.org References: <1470148943-21835-1-git-send-email-kernel@kyup.com> <1470209710-30022-1-git-send-email-kernel@kyup.com> <1470232012.18285.4.camel@poochiereds.net> <57A1FCE5.3040206@kyup.com> <57A205BE.3070202@virtuozzo.com> Cc: Andrey Vagin , containers@lists.linux-foundation.org, linux-kernel@vger.kernel.org, ebiederm@xmission.com, linux-fsdevel@vger.kernel.org, viro@zeniv.linux.org.uk From: Nikolay Borisov Message-ID: <57A20702.3040805@kyup.com> Date: Wed, 3 Aug 2016 18:00:18 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0 MIME-Version: 1.0 In-Reply-To: <57A205BE.3070202@virtuozzo.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 08/03/2016 05:54 PM, Pavel Emelyanov wrote: > On 08/03/2016 05:17 PM, Nikolay Borisov wrote: >> >> [SNIP] >> >> [CCing some people from openvz/CRIU] > > Thanks :) > >> My train of thought was "we should have means which would be the one >> universal truth about everything and this would be a process in the >> init_pid_ns". I don't have strong preference as long as I'm not breaking >> userspace. As I said before - I think the CRIU guys might be using that >> interface. > > This particular change won't break us mostly because we've switched to > reading the /proc/pid/fdinfo/n files for locks. [thinking out loud here] I've never actually looked into those files but now that I have it seems to make sense to also switch 'lsof' to actually reading the locks from the available pids directories rather than relying on the global /proc/locks interface. Oh well :) [/thinking out loud here] > > -- Pavel > >>> >>>>>> + && (proc_pidns != ns_of_pid(fl->fl_nspid))) >>>>> + return 0; >>>> + >>>>> lock_get_status(f, fl, iter->li_pos, ""); >>>> >>>>> list_for_each_entry(bfl, &fl->fl_block, fl_block) >>> >> . >> > > _______________________________________________ > Containers mailing list > Containers@lists.linux-foundation.org > https://lists.linuxfoundation.org/mailman/listinfo/containers >