From: Chris Wright <chrisw@sous-sol.org>
To: Dave Hansen <haveblue@us.ibm.com>
Cc: linux-kernel@vger.kernel.org, serue@us.ibm.com,
frankeh@watson.ibm.com, clg@fr.ibm.com,
Herbert Poetzl <herbert@13thfloor.at>,
Sam Vilain <sam@vilain.net>
Subject: Re: [RFC][PATCH 1/6] prepare sysctls for containers
Date: Mon, 6 Mar 2006 17:01:39 -0800 [thread overview]
Message-ID: <20060307010139.GF27645@sorel.sous-sol.org> (raw)
In-Reply-To: <20060306235249.880CB28A@localhost.localdomain>
* Dave Hansen (haveblue@us.ibm.com) wrote:
> /* If there is no strategy routine, or if the strategy returns
> * zero, proceed with automatic r/w */
> - if (table->data && table->maxlen) {
> + data = sysctl_table_data(table);
> + if (data && table->maxlen) {
> if (oldval && oldlenp) {
> if (get_user(len, oldlenp))
> return -EFAULT;
> if (len) {
> if (len > table->maxlen)
> len = table->maxlen;
> - if(copy_to_user(oldval, table->data, len))
> + if(copy_to_user(oldval, data, len))
> return -EFAULT;
> if(put_user(len, oldlenp))
> return -EFAULT;
> @@ -1241,7 +1261,7 @@ int do_sysctl_strategy (ctl_table *table
> len = newlen;
> if (len > table->maxlen)
> len = table->maxlen;
> - if(copy_from_user(table->data, newval, len))
> + if(copy_from_user(data, newval, len))
> return -EFAULT;
Interesting idea. One piece that's missing is strategy for controlling
creation the new context (assuming the data_access() will always evaluate
into a context sensitive piece of data). Otherwise a user can get out
of the limits imposed by sysadmin (since they may have placed themselves
in a context which differs from admin).
thanks,
-chris
next prev parent reply other threads:[~2006-03-07 0:57 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-03-06 23:52 [RFC][PATCH 0/6] support separate namespaces for sysv Dave Hansen
2006-03-06 23:52 ` [RFC][PATCH 1/6] prepare sysctls for containers Dave Hansen
2006-03-07 0:50 ` Herbert Poetzl
2006-03-07 2:00 ` Dave Hansen
2006-03-07 2:45 ` Herbert Poetzl
2006-03-19 15:54 ` Eric W. Biederman
2006-03-07 1:01 ` Chris Wright [this message]
2006-03-07 2:04 ` Dave Hansen
2006-03-07 2:18 ` Chris Wright
2006-03-07 3:02 ` Sam Vilain
2006-03-07 1:24 ` Al Viro
2006-03-07 1:55 ` Dave Hansen
2006-03-07 1:57 ` Al Viro
2006-03-19 14:50 ` Eric W. Biederman
2006-03-19 15:29 ` Eric W. Biederman
2006-03-06 23:52 ` [RFC][PATCH 2/6] sysvmsg: containerize Dave Hansen
2006-03-07 1:57 ` Chris Wright
2006-03-07 2:08 ` Dave Hansen
2006-03-07 2:34 ` Chris Wright
2006-03-19 15:36 ` Eric W. Biederman
2006-03-20 19:34 ` Chris Wright
2006-03-20 21:29 ` Eric W. Biederman
2006-03-20 21:50 ` Chris Wright
2006-03-06 23:52 ` [RFC][PATCH 3/6] sysvmsg: containerize sysctls Dave Hansen
2006-03-06 23:52 ` [RFC][PATCH 4/6] sysvsem: containerize Dave Hansen
2006-03-07 2:44 ` Chris Wright
2006-03-07 5:08 ` Dave Hansen
2006-03-06 23:52 ` [RFC][PATCH 5/6] sysvshm: containerize Dave Hansen
2006-03-06 23:52 ` [RFC][PATCH 6/6] sysvshm: containerize sysctls Dave Hansen
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=20060307010139.GF27645@sorel.sous-sol.org \
--to=chrisw@sous-sol.org \
--cc=clg@fr.ibm.com \
--cc=frankeh@watson.ibm.com \
--cc=haveblue@us.ibm.com \
--cc=herbert@13thfloor.at \
--cc=linux-kernel@vger.kernel.org \
--cc=sam@vilain.net \
--cc=serue@us.ibm.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
all inboxes | Powered by JetHome®