From: Chengdong Li <chengdong.li@linux.alibaba.com>
To: ebiederm@xmission.com, peterz@infradead.org, kjlx@templeofstupid.com
Cc: hbathini@linux.vnet.ibm.com, brendan.d.gregg@gmail.com,
ak@linux.intel.com, linux-kernel@vger.kernel.org,
chengdong.licd@alibaba-inc.com
Subject: Question: How to switch a process namespace by nsfs "device" and inode number directly?
Date: Mon, 10 Sep 2018 16:50:42 +0800 [thread overview]
Message-ID: <0eb9ec62-1c1b-5903-2db6-43ca571580b9@linux.alibaba.com> (raw)
Hi folks,
I am getting stuck by the lack of approach to switch process namespace
by nsfs "device" and inode number in user-space, for example (mnt:
0xf0000000)
From my best understanding, the normal way to do that is by setns
system call. But setns only accept fd that refer to a opened namespace,
sometimes we couldn't get it.
For example: After perf record, perf report couldn't work well once the
process that runs inside a container has exited, as the /proc/pid/ns
doesn't exist anymore after process exit.
Any comments are welcome!
Thanks,
Chengdong
next reply other threads:[~2018-09-10 8:51 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-10 8:50 Chengdong Li [this message]
2018-09-10 16:02 ` Andi Kleen
2018-09-12 2:05 ` Chengdong Li
2018-09-12 16:51 ` Andi Kleen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=0eb9ec62-1c1b-5903-2db6-43ca571580b9@linux.alibaba.com \
--to=chengdong.li@linux.alibaba.com \
--cc=ak@linux.intel.com \
--cc=brendan.d.gregg@gmail.com \
--cc=chengdong.licd@alibaba-inc.com \
--cc=ebiederm@xmission.com \
--cc=hbathini@linux.vnet.ibm.com \
--cc=kjlx@templeofstupid.com \
--cc=linux-kernel@vger.kernel.org \
--cc=peterz@infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®