All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org>
To: Andrew Morgan <morgan-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
Cc: containers-qjLDD68F18O7TbgM5vRIOg@public.gmane.org,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	minslinux-mm-Bw31MaZKKs3YtjvyW6yDsg@public.gmane.org
Subject: Re: [RFC] [PATCH -mm] oom_kill: remove uid==0 checks
Date: Thu, 20 Dec 2007 16:34:42 -0800	[thread overview]
Message-ID: <20071220163442.d93210ea.akpm@linux-foundation.org> (raw)
In-Reply-To: <47606969.6060808-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>

On Wed, 12 Dec 2007 15:06:17 -0800
Andrew Morgan <morgan-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org> wrote:

> Serge E. Hallyn wrote:
> > Andrew, I've cc:d you here bc in doing this patch I noticed that your
> > 64-bit capabilities patch switched this code from an explicit check
> > of cap_t(p->cap_effective) to using __capable().  That means that
> > now being glossed over by the oom killer means PF_SUPERPRIV will
> > be set.  Is that intentional?
> 
> Yes, I switched the check because the old one didn't work with the new
> capability representation.
> 
> However, I had not thought this aspect of this replacement through. At
> the time, it seemed obvious but in this case it actually depends on
> whether you think using privilege (PF_SUPERPRIV) means "benefited from
> privilege", or "successfully completed a privileged operation".
> 
> I suspect, in this case, the correct thing to do is add the equivalent of:
> 
> #define CAPABLE_PROBE_ONLY(a,b)   (!security_capable(a,b))
> 
> and use that in the code in question. That is, return to the old
> behavior in a way that will not break if we ever need to add more bits.

I'm struggling to understand whether the above was an ack, a nack or a
quack.

> Thanks for finding this.

From that I'll assume ack ;)

WARNING: multiple messages have this Message-ID (diff)
From: Andrew Morton <akpm@linux-foundation.org>
To: Andrew Morgan <morgan@kernel.org>
Cc: serue@us.ibm.com, containers@lists.osdl.org,
	linux-kernel@vger.kernel.org, minslinux-mm@kvack.org
Subject: Re: [RFC] [PATCH -mm] oom_kill: remove uid==0 checks
Date: Thu, 20 Dec 2007 16:34:42 -0800	[thread overview]
Message-ID: <20071220163442.d93210ea.akpm@linux-foundation.org> (raw)
In-Reply-To: <47606969.6060808@kernel.org>

On Wed, 12 Dec 2007 15:06:17 -0800
Andrew Morgan <morgan@kernel.org> wrote:

> Serge E. Hallyn wrote:
> > Andrew, I've cc:d you here bc in doing this patch I noticed that your
> > 64-bit capabilities patch switched this code from an explicit check
> > of cap_t(p->cap_effective) to using __capable().  That means that
> > now being glossed over by the oom killer means PF_SUPERPRIV will
> > be set.  Is that intentional?
> 
> Yes, I switched the check because the old one didn't work with the new
> capability representation.
> 
> However, I had not thought this aspect of this replacement through. At
> the time, it seemed obvious but in this case it actually depends on
> whether you think using privilege (PF_SUPERPRIV) means "benefited from
> privilege", or "successfully completed a privileged operation".
> 
> I suspect, in this case, the correct thing to do is add the equivalent of:
> 
> #define CAPABLE_PROBE_ONLY(a,b)   (!security_capable(a,b))
> 
> and use that in the code in question. That is, return to the old
> behavior in a way that will not break if we ever need to add more bits.

I'm struggling to understand whether the above was an ack, a nack or a
quack.

> Thanks for finding this.

>From that I'll assume ack ;)

  parent reply	other threads:[~2007-12-21  0:34 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-12 21:18 [RFC] [PATCH -mm] oom_kill: remove uid==0 checks Serge E. Hallyn
2007-12-12 21:18 ` Serge E. Hallyn
2007-12-12 23:06 ` Andrew Morgan
     [not found]   ` <47606969.6060808-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2007-12-21  0:34     ` Andrew Morton [this message]
2007-12-21  0:34       ` Andrew Morton
2007-12-21 14:46       ` 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=20071220163442.d93210ea.akpm@linux-foundation.org \
    --to=akpm-de/tnxtf+jlsfhdxvbkv3wd2fqjk+8+b@public.gmane.org \
    --cc=containers-qjLDD68F18O7TbgM5vRIOg@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=minslinux-mm-Bw31MaZKKs3YtjvyW6yDsg@public.gmane.org \
    --cc=morgan-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.