From: Serge Hallyn <serge.hallyn@ubuntu.com>
To: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: "Serge E. Hallyn" <serge@hallyn.com>,
linux-fsdevel@vger.kernel.org, linux-api@vger.kernel.org,
Linux Containers <containers@lists.linux-foundation.org>,
"Michael Kerrisk (man-pages)" <mtk.manpages@gmail.com>,
linux-kernel@vger.kernel.org
Subject: Re: [REVIEW][PATCH 2/4] proc: Implement /proc/thread-self to point at the directory of the current thread
Date: Wed, 6 Aug 2014 18:32:00 +0000 [thread overview]
Message-ID: <20140806183200.GQ14872@ubuntumail> (raw)
In-Reply-To: <871tsttr4u.fsf@x220.int.ebiederm.org>
Quoting Eric W. Biederman (ebiederm@xmission.com):
> > Hi Eric,
> >
> > I've not had a chance to test these, but apart from two trivial
> > comments below these look good to me, and I appreciate the feature.
> > So with the two fixes (if needed),
> >
> > Acked-by: Serge Hallyn <serge.hallyn@canonical.com>
>
> >> +static int proc_thread_self_readlink(struct dentry *dentry, char __user *buffer,
> >> + int buflen)
> >> +{
> >> + struct pid_namespace *ns = dentry->d_sb->s_fs_info;
> >> + pid_t tgid = task_tgid_nr_ns(current, ns);
> >> + pid_t pid = task_pid_nr_ns(current, ns);
> >> + char tmp[PROC_NUMBUF + 6 + PROC_NUMBUF];
> >
> > In the extreme case you're not adding space for a \0 ? (Unless
> > PROC_NUMBUF includes that)
>
> PROC_NUMBUF has enough space for a sign for the maximum of 10 digits
> for a newline and a terminating \0. So yes PROC_NUMBUF includes the
> space for a terminating \0.
Ah, I see it's 13. Sounds good then, thanks.
next prev parent reply other threads:[~2014-08-06 18:32 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-01 0:30 [REVIEW][PATCH 0/4] /proc/thread-self Eric W. Biederman
2014-08-01 0:33 ` [REVIEW][PATCH 1/4] proc: Have net show up under /proc/<tgid>/task/<tid> Eric W. Biederman
2014-08-01 0:34 ` [REVIEW][PATCH 2/4] proc: Implement /proc/thread-self to point at the directory of the current thread Eric W. Biederman
2014-08-06 14:35 ` Serge E. Hallyn
2014-08-06 18:22 ` Eric W. Biederman
2014-08-06 18:32 ` Serge Hallyn [this message]
2014-08-01 0:34 ` [REVIEW][PATCH 3/4] proc: Point /proc/net at /proc/thread-self/net instead of /proc/self/net Eric W. Biederman
2014-08-01 0:35 ` [REVIEW][PATCH 4/4] proc: Point /proc/mounts at /proc/thread-self/mounts instead of /proc/self/mounts Eric W. Biederman
2014-08-01 2:39 ` [REVIEW][PATCH 0/4] /proc/thread-self Davidlohr Bueso
2014-08-01 6:16 ` Eric W. Biederman
2014-08-04 13:12 ` Karel Zak
2014-08-01 6:45 ` Randy Dunlap
2014-08-01 7:01 ` Eric W. Biederman
2014-08-01 7:14 ` Bert Wesarg
2014-08-01 7:45 ` Eric W. Biederman
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=20140806183200.GQ14872@ubuntumail \
--to=serge.hallyn@ubuntu.com \
--cc=containers@lists.linux-foundation.org \
--cc=ebiederm@xmission.com \
--cc=linux-api@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mtk.manpages@gmail.com \
--cc=serge@hallyn.com \
/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