From: "Serge E. Hallyn" <serue@us.ibm.com>
To: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: "Serge E. Hallyn" <serue@us.ibm.com>, Sam Vilain <sam@vilain.net>,
Kirill Korotaev <dev@sw.ru>,
linux-kernel@vger.kernel.org, herbert@13thfloor.at, xemul@sw.ru,
James Morris <jmorris@namei.org>
Subject: Re: [RFC][PATCH 2/5] uts namespaces: Switch to using uts namespaces
Date: Wed, 19 Apr 2006 10:00:33 -0500 [thread overview]
Message-ID: <20060419150033.GI7562@sergelap.austin.ibm.com> (raw)
In-Reply-To: <m1d5fn9vuk.fsf@ebiederm.dsl.xmission.com>
Quoting Eric W. Biederman (ebiederm@xmission.com):
> "Serge E. Hallyn" <serue@us.ibm.com> writes:
>
> > Quoting Sam Vilain (sam@vilain.net):
> >> Kirill Korotaev wrote:
> >>
> >> >Serge,
> >> >
> >> >BTW, have you noticed that NFS is using utsname for internal processes
> >> >and in general case this makes NFS ns to be coupled with uts ns?
> >> >
> >> >
> >>
> >> Either that, or each NFS vfsmount has a uts_ns pointer.
> >
> > Sorry, I must be being dense. I only see utsname being used in the case
> > of nfsroot. Can you point me to where you're talking about?
>
> We have the nfs lockd client code, and the sunrpc code.
>
> I've been fighting a few a cold and some 2.6.17-rc1 bugs
> so I haven't had a chance to drill down yet to see what
> the system_utsname.nodename is actually being used for.
>
> Until we actually understand what is happening it is too soon to
> judge if it is a problem or not.
>
> The nfsroot is clearly not a problem.
>
> As for the other cases I'm not certain.
>
> So skimming through the code quickly.
>
> include/linux/lockd/lockd.h
> > #define NLMCLNT_OHSIZE (sizeof(system_utsname.nodename)+10)
>
> fs/lockd/xdr.c
> > #define NLM_caller_sz 1+XDR_QUADLEN(sizeof(system_utsname.nodename))
>
> The previous two are just sizes, so not interesting for analysis.
>
>
> fs/lockd/clntproc.c
> > static void nlmclnt_setlockargs(struct nlm_rqst *req, struct file_lock *fl)
> > {
> > struct nlm_args *argp = &req->a_args;
> > struct nlm_lock *lock = &argp->lock;
> >
> > nlmclnt_next_cookie(&argp->cookie);
> > argp->state = nsm_local_state;
> > memcpy(&lock->fh, NFS_FH(fl->fl_file->f_dentry->d_inode), sizeof(struct nfs_fh));
> > lock->caller = system_utsname.nodename;
> > lock->oh.data = req->a_owner;
> > lock->oh.len = snprintf(req->a_owner, sizeof(req->a_owner), "%u@%s",
> > (unsigned int)fl->fl_u.nfs_fl.owner->pid,
> > system_utsname.nodename);
> > lock->svid = fl->fl_u.nfs_fl.owner->pid;
> > lock->fl.fl_start = fl->fl_start;
> > lock->fl.fl_end = fl->fl_end;
> > lock->fl.fl_type = fl->fl_type;
> > }
>
> I think this just creates a unique string with nodename+pid
In fs/lockd/svcshare.c, nlmsvc_share_file and nlmsvc_unshare_file do
compare the xdr_netobj->data field, which contains the snprinted
system_utsname.nodename.
However, if you're going to unshare utsname() and change your nodename,
the effect should be no different than if you just changed your
nodename :) So I don't see this being a problem.
-serge
next prev parent reply other threads:[~2006-04-19 15:00 UTC|newest]
Thread overview: 50+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-04-07 18:36 [RFC][PATCH 0/5] uts namespaces: Introduction Serge E. Hallyn
2006-04-07 18:36 ` [RFC][PATCH 4/5] utsname namespaces: sysctl hack Serge E. Hallyn
2006-04-19 15:17 ` Kirill Korotaev
2006-04-19 15:21 ` Serge E. Hallyn
2006-04-19 15:50 ` Kirill Korotaev
2006-04-19 16:54 ` Cedric Le Goater
2006-04-19 17:10 ` Eric W. Biederman
2006-04-19 17:10 ` Serge E. Hallyn
2006-04-19 15:52 ` Eric W. Biederman
2006-04-19 16:23 ` Dave Hansen
2006-04-19 16:52 ` Eric W. Biederman
2006-04-19 17:19 ` Dave Hansen
2006-04-19 17:37 ` Eric W. Biederman
2006-04-19 17:48 ` Eric W. Biederman
2006-04-19 15:29 ` Eric W. Biederman
2006-04-19 17:51 ` Serge E. Hallyn
2006-04-19 18:27 ` Eric W. Biederman
2006-04-19 20:24 ` Serge E. Hallyn
2006-04-19 21:44 ` Sam Vilain
2006-04-20 17:05 ` Serge E. Hallyn
2006-04-25 22:00 ` Serge E. Hallyn
2006-04-26 4:09 ` Sam Vilain
2006-04-26 10:28 ` Christoph Hellwig
2006-04-27 12:32 ` Eric W. Biederman
2006-04-07 18:36 ` [RFC][PATCH 1/5] uts namespaces: Implement utsname namespaces Serge E. Hallyn
2006-04-07 19:13 ` Sam Ravnborg
2006-04-07 19:20 ` Serge E. Hallyn
2006-04-07 19:39 ` Serge E. Hallyn
2006-04-07 20:47 ` James Morris
2006-04-07 22:13 ` Serge E. Hallyn
2006-04-08 13:44 ` Andi Kleen
2006-04-08 13:45 ` Andi Kleen
2006-04-08 20:28 ` Serge E. Hallyn
2006-04-09 6:00 ` Andi Kleen
2006-04-09 19:08 ` Eric W. Biederman
2006-04-07 18:36 ` [RFC][PATCH 5/5] uts namespaces: Enable UTS namespaces debugging Serge E. Hallyn
2006-04-07 18:36 ` [RFC][PATCH 3/5] uts namespaces: Use init uts_namespace when appropriate Serge E. Hallyn
2006-04-07 18:36 ` [RFC][PATCH 2/5] uts namespaces: Switch to using uts namespaces Serge E. Hallyn
2006-04-07 19:17 ` Sam Ravnborg
2006-04-07 19:25 ` Serge E. Hallyn
2006-04-11 12:26 ` Kirill Korotaev
2006-04-11 21:04 ` Sam Vilain
2006-04-12 5:01 ` Serge E. Hallyn
2006-04-12 6:00 ` Eric W. Biederman
2006-04-19 15:00 ` Serge E. Hallyn [this message]
2006-04-07 19:06 ` [RFC][PATCH 0/5] uts namespaces: Introduction Eric W. Biederman
2006-04-07 19:28 ` Serge E. Hallyn
2006-04-07 19:39 ` Eric W. Biederman
2006-04-11 12:32 ` Kirill Korotaev
2006-04-11 14:01 ` Serge E. Hallyn
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=20060419150033.GI7562@sergelap.austin.ibm.com \
--to=serue@us.ibm.com \
--cc=dev@sw.ru \
--cc=ebiederm@xmission.com \
--cc=herbert@13thfloor.at \
--cc=jmorris@namei.org \
--cc=linux-kernel@vger.kernel.org \
--cc=sam@vilain.net \
--cc=xemul@sw.ru \
/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®